Subject: Re: [stella] 6 digit score display and other ramblings From: Chris Wilkson <cwilkson@xxxxxxxxxxxxx> Date: Wed, 18 Mar 1998 11:39:37 -0800 (PST) |
> This'd work if TABLE is the first byte of a page, and if $81 is set to the > number of that page (JMP ($xx) uses a 16-bit pointer.) If you can't set > up TABLE that way, you'd need to do an add before storing the offset > (which, of course, screws up the carry you already set...) JMP ($0080) ; WASTE 5 CYCLES TABLE NOP ; WASTE 2 CYCLES NOP ; WASTE 2 CYCLES NOP ; WASTE 2 CYCLES NOP ; WASTE 2 CYCLES NOP ; WASTE 2 CYCLES BCC JUMP ; WASTE 2 OR 3 CYCLES END ... I don't think TABLE has to be the first byte. But the table does have to fit inside one page. For instance, if I placed the code above at location $ffe6 (at the end of the page), initialization would place $ff and $e6 in locations $81 and $80 respectively. Then you just have to remember when generating your offset that it's from address $ff00, not from $ffe9 (the address of TABLE). It could get confusing in other areas of the code, but I think it's doable. Your x-coordinate could be referenced from a non zero location on the previous line, or you just do the add before the LSRA instruction. That way the carry bit is fine. Hmmm...actually, I guess the table would need to be contained in the first half of the page because you lose a bit during the shift. -Chris -- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/stella.html Don't post pirate BINs to Stellalist. Be a programmer, not a pirate. Write the best game, win framed autographs of famous Atari alumni!!
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] 6 digit score display , Erik Mooney | Thread | Re: [stella] 6 digit score display , Greg Troutman |
Re: [stella] Sprite Delema, Eckhard Stolberg | Date | Re: [stella] Real or not? Why?, bwmott |
Month |