Jump to content
IGNORED

Where is the score stored in Defender?


Recommended Posts

Bit unusual, stored at $142F and $1430 as hybrid decimal/binary -- pairs of digits in binary 0-99, with the high two digits in $1430 and low two digits in $142F. To trace on screen, use the command: wx db($1430)*100+db($142f)

 

The way I usually track these down is to set a memory breakpoint on whatever draws the score on screen and work backwards from there. Ctrl+Alt+click when stopped in the debugger will give you the display list and memory scan counter addresses of the line.

 

  • Like 1
Link to comment
Share on other sites

37 minutes ago, phaeron said:

Bit unusual, stored at $142F and $1430 as hybrid decimal/binary -- pairs of digits in binary 0-99, with the high two digits in $1430 and low two digits in $142F. To trace on screen, use the command: wx db($1430)*100+db($142f)

 

The way I usually track these down is to set a memory breakpoint on whatever draws the score on screen and work backwards from there. Ctrl+Alt+click when stopped in the debugger will give you the display list and memory scan counter addresses of the line.

 

Yup, I found it about 15 mins ago too. Very unusual, there are actually two more bytes. 

image.thumb.png.eae7291d444dc690d55e10cb90d7bf11.png

I'll whip up a routine tomorrow to convert this into screen codes, and then the High Score Enabled Defender will be ready! :)

 

(as part of digging into this, I now see exactly why Defender's graphics performance is so good. Pre shifted tables galore.)

 

(Also, oh sweet jesus, control-alt-click is useful!!!!)

 

-Thom

 

Edited by tschak909
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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