Subject: Re: [stella] Sprites - AAAAARGH! From: KirkIsrael@xxxxxxxxxxxxx Date: 30 Jan 2004 21:06:28 -0000 |
> > > Does this code assume that when it's called as a subroutine > > Accumulator is set to the position, and X is 0 or 1 based on > > which player you're trying to move, or what? > > Yup! And you can also position both missiles and the ball with that. Are they contiguous in memory, then, that you just keep incrementing X? > > > In short, what > > are the preconditions for this routine, and/or does it involve > > something w/ the stack? > > a contains x-position (0..159) > x contains object index (0..4) Guess so! > And there is an important *post*condition. After all objects have been > *coarse* positioned you have to do this once: > > sta WSYNC > sta HMOVE ah, right. That should definately be mentioned. Also, it's important to note that it gobbles one WSYNC per object, plus one more for the bunch. > > And if you store all x-positions in consecutive RAM locations, you can > make this a loop (without any JSR) too. Heh. Are there any caveats with this, illegal-OPcodes or anything, or does it work as well as the more conservative math-centric version I posted to the list? Of course, my REAL challenge is getting back into 16 bit math and making sure I take care of the carry bit and all that... I'm a little bit frightened, because every time I even tried to do a simple 8-bit numerical comparison "from scratch", it never worked and I always had to go back to cut and paste previous code...my understanding of what registers to clear when is fuzzy to say the least :-( -- KirkIsrael@xxxxxxxxxxxxx http://kisrael.com "Sometimes your shallowness is so thorough, it's almost like depth."--Daria ---------------------------------------------------------------------------------------------- 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 -> |
---|---|---|
Re: [stella] Sprites - AAAAARGH!, Thomas Jentzsch | Thread | Re: [stella] Sprites - AAAAARGH!, Glenn Saunders |
Re: [stella] Sprites - AAAAARGH!, Thomas Jentzsch | Date | Re: [stella] Releasing my unfinishe, Thomas Jentzsch |
Month |