Re: [stella] variations on a theme

Subject: Re: [stella] variations on a theme
From: emooney@xxxxxxxxxxxxxxxx (Erik Mooney)
Date: Wed, 21 Jan 1998 00:03:32 GMT
>>> I think that it would be better to convert the code to the standard format,
>>> as this would allow other things like diagonal moving bombs.
>>
>>Can you do this, or do you want me to try?
>
>I think it would be enough if you could post here some hints, especially
>the parts of the code to be modified.

Problem here is that I don't remember myself what needs to be changed :)  I
think what you'd need to change is the generate-bomb routine: about eight
lines before label NoBomb, remove the JSR Hconvert.  This will store the
bomb as a regular X-coordinate rather than in FC_X.  You also need to
change the position-bomb routine: before label BP0, the FC_X value is
loaded, then it does a DEX-BPL loop... add a JSR Hconvert after the load
and before the loop (you'll probably want to do the JSR before the WSYNC.)
If you replaced Hconvert with a lookup table (this was on my list of things
to do for extra cycles but I never did it), use that instead.

That was a lot simpler than I was thinking... I tried it on my version of
the code, and it worked fine... inspecting the values with PCAE's debugger
shows that the X-coordinates do appear to be stored correctly.

Let me know if this works and I'll put together a bombs-destroy-shields
routine.

>>Don't the collision registers activate even when COLUPF is zero?  I'm
>>pretty sure they do.  The collision-detection hardware only checks PFx,
>>ENAMx, ENABL, and GRPxx, not the color registers.
>
>Sure?! It would be great... a matter of a few bytes of code. To make things
>work just like in Atari SI, the playfield (the invaders) should be turned
>on for the duration of the missile explosion.

Actually, it would... the *only* thing you need to change in the kernel is
the LDY CurrColor / LDA [colortable],Y about fifteen lines before label
MD0.  You'll need to move them before that WSYNC (the one with the comment
line that says "begin scanlines 53, 65, 77, 89, 101") to get the cycles,
but there's at least 30 free cycles on that scanline, so you're fine there.

I changed the first byte of CurrColor to zero, making the bottom line
black... the collisions and score worked as they should, and inspecting
memory in PCAE's debugger shows that the invaders do get killed as they
should.

--
Stella list is Administered by krishna@xxxxxxxxxxxx <Glenn Saunders>
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/stella.html
+-shameless plugs-------------------------------------------------------+
| Stella documentary at http://www.primenet.com/~krishna                |
| Nick's VCS links via http://www.primenet.com/~nickb/atariprg.htm      |
| Write the best game, win framed autographs of famous Atari alumni!!   |
+-----------------------------------------------------------------------+

Current Thread