Re: [stella] Definitive Combat Disassembly

Subject: Re: [stella] Definitive Combat Disassembly
From: "Roger Williams" <mer02@xxxxxxxxxxxxx>
Date: Sat, 2 Mar 2002 17:31:50 -0800
From: Glenn Saunders <cybpunks2@xxxxxxxxxxxxx>

> Roger, I noticed that the sprite shapes contain data in both halves (i.e
> the top 180') and yet earlier in the code you state that it takes
advantage
> of the sprite mirror function in hardware.  If that's the case, wouldn't
> you only need to store the left or right half?

You could theoretically get away with only 90 degrees, by using both the
vertical flip trick (this costs COMBAT 16 bytes of RAM) and the
hardware left-to-right mirror, but the game doesn't do it that way.

The kernal functions were actually pretty well documented in NBCOMBAT
so much of that isn't my work.  I suspect that LW must have felt the cost
in cycles and code did not justify the ROM saved in the sprite table.

The relevant routine is ROT, where the appropriate sprite shapes are copied
either right-side-up or upside-down into the RAM buffer.

> In Death Derby I only store the right 180' of rotation and since I don't
> copy to RAM, I have to store both the top and bottom half of the right
> 180'.  if I stored just the top right corner and copied to RAM in normal
or
> reverse direction then I could have saved more ROM.
>
> Could you elaborate a bit on why Combat's sprite shapes are stored that
way?

I suspect the original plan was to use sprite shapes out of ROM and not
have the buffer, but they ran out of cycles in the kernal.  Rendering the
sprites
from RAM saves critical levels of indirection in the kernal.

Of course, later programmers developed the techniques to do this.  Nobody
uses the infamous Combat Stack Trick any more...

--Roger Williams

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


Current Thread