Subject: Re: [stella] 6 Digit Routine Cont. From: Thomas Jentzsch <tjentzsch@xxxxxx> Date: Wed, 10 Sep 2003 12:14:53 +0200 |
Chris Larkin wrote: > I would assume the entire graphic > data has to fit on one page to keep cycle counts accurate? Yup! It's *very* important to avoid page penalties here! > ^ How can this always produce the same amount of cycles? Don't worry, I have changed that code so often, that I didn't adjusted the comments always. :-) > ldy MsgTab,x ; 4 > ^??????? Totally lost here |Load height of graphic? No, offset into a table that contains the pointers to the various texts. > lda LetterPtrTab,y ; 4 > sta digitPtr ; 3 > ^LetterPtrTab,Y = Address of first 8x8 Graphic? Yup! (though the height doesn't matter) > sta digitPtr+2 ; 3 > ^digitPtr is in Zero Page... So the graphic data is loaded into RAM... Nono! Not the *data* only the *pointer* to the data. > ^ I have to get this exact cycle count? Don't worry again. The code is heavily optimized and therefore I am entering it at various positions. Just make sure that the following 'dey' ends at cylce 61. > sty GRP0 > sty GRP1 > sty GRP0 > ^Why is GRP0 cleared twice? Because both players are VDELed. The first write to GRP0 clears the shadow register of GRP0. Then sty GRP1 clears the shadow register of GRP1 and copies the shadow register of GRP0 into the visible register. The final sty GRP0 copies the shadow register of GRP1 into the visible one. > So assuming my graphics data is as follows, How do I get this > subroutine to draw it correctly? > > ORG $1200 > Graphic0 .byte $00,$00,$00,$00,$00,$00,$00,$00 > Graphic1 .byte $00,$00,$00,$00,$00,$00,$00,$00 > > Graphic2 .byte $00,$00,$00,$00,$00,$00,$00,$00 > Graphic3 .byte $00,$00,$00,$00,$00,$00,$00,$00 > Graphic4 .byte $00,$00,$00,$00,$00,$00,$00,$00 > > Graphic5 .byte $00,$00,$00,$00,$00,$00,$00,$00 Do something like this six times: lda #<Graphic0 sta digitPtr lda #>Graphic0 sta digitPtr+1 Where are my $10,000? ;-) Have fun! Thomas ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[stella] 6 Digit Routine Cont., Chris Larkin | Thread | Re: [stella] 6 Digit Routine Cont., Christopher Tumber |
Aw: [stella] 6 Digit Routine Cont., cybergoth | Date | Re: [stella] brother can you spare , Thomas Jentzsch |
Month |