Re: [stella] Resetting algorithm

Subject: Re: [stella] Resetting algorithm
From: Erik Mooney <emooney@xxxxxxxxxxxxxxxx>
Date: Fri, 14 Apr 2000 20:01:37 -0400
>	So, I was watching Stella at 20, wolume 2 the other day (which, I might
>add, is a quality video, and a pleasure to have in my collection), and one
>of the guys was talking about his algorithm that he invented for Air-Sea
>Battle, such that someone could pass in a number of pixels for which an
>object was to be placed horizontally, and it placed the object
>appropriately, using a reset, and an hmove.
>	I didn't have time to copy down the code (which was written on a piece of
>paper in the video).  Does anyone know it offhand, and how it works?  I
>just assume that it generates a certain number of NOPs for the resetting,
>and that the HMOVE number can be calculated as well.

Hm?  That wouldn't really make sense, unless he was talking about a
compile-time tool.  You can't generate NOPs at runtime on the 2600 (well,
you _can_ put them in RAM and run them, but that'd be pretty inefficient..)
Most object-positioning routines run a do-nothing loop for the right amount
of time and then hit the sprite-reset register, then use the HMOVE registers
for fine-tuning the position because the do-nothing loop only has a
resolution of five cycles (15 pixels).  I just use a lookup table in my
programs - put in a pixel number and get back the number of times to go
around the loop and the number to write to HMP0.

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

Current Thread