Jump to content
  • entries
    4,186
  • comments
    2,504
  • views
    1,748,982

Odyssey 2...021

Sign in to follow this  
atari2600land

152 views

Spent the first few hours of the new year trying to work on an Odyssey 2 game. I introduced a new variable and then wanted to set it before the game started. So I started out with bank 3, which is where the Odyssey 2 starts out all roms. I got the keyboard semi working, but the switch to the other bank to start the game was not working on a real Odyssey 2. Try after try happened until I found the reason: I was switching to the wrong bank. Instead of switching to bank 2, I was switching to bank 0. I still don't know what banks 1 and 0 do in a 4k game.

 

I also discovered that the YES button and Y button do the same thing. Same with NO and N button. I am wondering if there is some way to change that. I used those buttons in my game. I made it so any other button press does nothing (well, except for the normal keyboard pressing beep.) This is how the code ended up looking.

waitforbuttonpress

     call gfxon

 

waitforbuttonpress2
    call  013dh
    mov r1,a
    xrl     a,#02dh       ; N key
    jz     no_button_pressed

    mov a,r1
    xrl     a,#02ch       ; Y key
    jz     yes_button_pressed

    jmp waitforbuttonpress2

The "call 013dh" refers to that line of code in the BIOS that reads button presses. I then moved the result in r1 for it to read. If it's not N, NO, Y, or YES, then it loops back. It waits for a button press, so the game just freezes until a button is pressed. I'm also guessing this is why none of the games use the keyboard during game play.

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...