Jump to content
  • entries
    4,958
  • comments
    2,719
  • views
    1,809,874

Password screen work 2


atari2600land

198 views

I knew I had some sort of code somewhere that told the computer what to do if a number was higher than 9 in hexadecimal. I found it in my snake game. I tweaked it a little and applied it to the Quest of the Cranberry game. Now the game doesn't accept the code if the health % number is invalid. Just to make sure, I put in a number which was invalid ($7A) and it worked. It rejected the passcode. But I spied something I forgot to do the last time: I forgot to reset the passcode to 0 if it was invalid! So I did that. And it works okay now. If you type in an invalid passcode, and then type in a valid passcode, it reads it correctly and does the game right.

 

In case you're wondering what that code is, (ha!) it's here:


    ; set the ISAR
    lisu    7
    lisl    4

    ds s
    lr a, s

; Decreased timer value is now in Accumulator.

    sl 4                ; keep only lower nibble
    ci $F0            ; Is the originally lower number an F?
    bz  changeFto9        ; It is, change it...
    br .subTimerEnd        ; We're done, go to end

Of course, this was when I was subtracting, so all I had to do is change $F0 to $99 and it worked fine. I also had to get rid of that "ds s" line since that tells it to subtract one from the number I'm checking. And what's more, it didn't take very long to put that code in the game. <20 minutes!

I put a video on YouTube about the game, showing it. Thus my need to ask about the comment I got in my last status update. You can view level 1 of the game here:

In case you're wondering, I put that black border around it just to look like it was something being displayed on a TV (and to hide the non-game stuff my screen capture software captured. When you pick a program to capture, it likes to make the part it captures bigger than the window itself for some stupid reason. And I tried to adjust it, but to no avail.)

Version 30 (which I talked about earlier) is now on the game's website.

 

 

 

  • Like 1

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...