Re: R: [stella] a thing that doesn't let me sleep...

Subject: Re: R: [stella] a thing that doesn't let me sleep...
From: emooney1@xxxxxxxx (Erik K Mooney)
Date: Mon, 25 Aug 1997 20:46:07 -0400
>> >...how could they put seven aliens per row in Atari Galaxian?

I did some experimenting, and it turns out that I can get up to ten
copies
of one player on one line, though the tenth copy extends past the end of
the
line and overflows to the beginning of the following line.  If you have
NUSIZ
set to either 1 or 3 (two-close or three-close), doing a RESP0 every five
cycles will display multiple objects... the second copy of each RESP0
will be
displayed.  The first RESP0 must begin no earlier than cycle 19, or it
"won't
count". At five cycles per RESP0, the first RESP0 ends at 22, the second
at 27, ... , the ninth one at 62, leaving you time to DEX, BNE, and
WSYNC.
If NUSIZ is 3, the ninth RESP0 displays two objects (the second and third
of its three copies) for a total of ten, though the tenth extends past
the edge
of the screen.  The leftmost object can be no earlier than pixel 88 from
WSYNC
which is pixel 20 from left edge.

That's interesting, but not too useful.. five cycles per RESP0 leaves you
two cycles inbetween each, not enough to do more than DEX or NOP.
You might be able to run the code in RAM, and each frame alter some
of the STA RESP0 lines to something harmless like STA $80... this
would let you turn on and off each graphic individually, but there's no
time to change GRP0 between copies.

What you can do is what Galaxian does, and do a RESP0 every eleven cycles
instead... each RESP0 will display the second and third of its three
copies.  Fewer
than eleven cycles means the next RESP0 will occur before the third copy
gets
displayed; more means the objects get more widely spaced.  This cuts down
the available
number of objects to nine (in the other way, the copies occur every 15
pixels, now it's
two copies per 33 pixels), but gives you eight cycles between each RESP0
to do stuff. 
Unfortunately, that's not enough time to load and store GRP0 for each
copy of the object,
but it is enough to load and store a NUSIZ for each pair of objects.  A
NUSIZ of 1 will
cause the first object of the pair to be displayed, 3 will cause both of
the pair, and 2 or
6 (two-medium or three-medium) cause the second object of the pair.  This
is the way
Galaxian does it.  Also, either way you have 19 cycles before the first
RESP0 during which
you can change COLUP0, GRP0, or both, or (and?) display player 1.

You could run the code in RAM this way, and disable and enable each pair
of objects
by altering the STA RESP0s, and have enough time to change GRP0 for each
*pair*
of objects... allowing four pairs of objects to be drawn with one player.
 Or, leave NUSIZ
equal to 1, and you have five (remember, there were nine total) objects
that can have
different GRP0s, drawn with one player.

You could also use both players, alternating RESP0 and RESP1... this
allows up to 15
objects on one line (plus possible missiles and ball), though you can't
change NUSIZ or
GRP0... you'd have to run the code in RAM and alter the STA RESPx to turn
on and off
each object, but it'd be doable.  This is especially convenient because
it takes three cycles
(nine pixels) for each object, leaving the objects separated by nice neat
one-pixel gaps.

(my brain hurts now :) )

--
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