Re: [stella] Displaying Scores

Subject: Re: [stella] Displaying Scores
From: "Thomas Jentzsch" <tjentzsch@xxxxxx>
Date: Fri, 8 Aug 2003 17:05:18 +0200
Brian Crawford wrote:
> I'm sorry I wasn't clear about this in my orginal post, but I was more 
> interested in the keeping track of the scores. Like how does the program add 
> to a player's score?

There are at least to ways:
1. The common way is to use BCD for the scores. Each byte can only store 100 different values then, so for a maximum score of 999,999 you will need 3 bytes. For adding the scores you will switch to BCD mode (SED/CLD), and for displaying you will have to split each byte into upper and lower nibbles (each containing numbers from 0..9) and access the graphic data using those values.
2. Calculate with pointers! Use the graphic pointers and add the offset differences of the graphic data. Sounds complicated but saves some RAM.

For examples you can check e.g. my disassemblies which you will find at www.neonghost.com/the-dig/. For the 2nd way, check the River Raid disassembly.

Have?fun!
Thomas
_______________________________________________________
Thomas?Jentzsch?????????|?***?Every?bit?is?sacred?!?***
tjentzsch?at?web?dot?de?|



























__________________________________________________________________________
Die sicherste Form der Kommunikation: E-Mails verschluesseln, Spam-Filter,
Adressverifizierung, digitale Unterschrift: http://freemail.web.de

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread