Re: [stella] Does this look right? (clock)

Subject: Re: [stella] Does this look right? (clock)
From: emooney@xxxxxxxxxxxxxxxx (Erik Mooney)
Date: Thu, 02 Oct 1997 16:41:35 GMT
>>Try this.  Frames, seconds, minutes, and hours count down instead of up.
>>You can deal with this later.  Days count up.
>
>A problem with this clock is that it counts seconds, minutes and hours in
>hex and this means a conversion to BCD in case you want to display it.

So simply store the numbers in BCD and use the 6502's BCD-math flag to
process them.  I did this for the scores in my invaders game.  It takes one
byte per field (frames, seconds, minutes, hours, days) in either hex or
BCD.

Simply put a SED at the beginning and a CLD at the end of the routine I
posted, and change the #60 to #$60 and #24 to #$24.

--
Archives updated once/day at http://www.biglist.com/lists/stella/archives/
Unsubscribing and other info at http://www.biglist.com/lists/stella/stella.html

Current Thread