Re: [stella] Definitive Combat Disassembly

Subject: Re: [stella] Definitive Combat Disassembly
From: Glenn Saunders <cybpunks2@xxxxxxxxxxxxx>
Date: Sat, 02 Mar 2002 16:15:54 -0800
At 05:31 PM 3/2/2002 -0800, you wrote:

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 documentation implies that it does it that way.

; 1. It sets the TIA's reflection flag for that player, taking care of
;    the horizontal aspect rather easily.

; 2. It copies the bytes into memory last-to-first instead of first-to-
;    last, using the carry bit as a flag for which to do.

And the source:

ROT     LDA  #$01               ; The LO byte of CLOCK used to
        AND  CLOCK              ; select alternate players on
        TAX                     ; alternate frames
        LDA  DIRECTN,X
        STA  REFP0,X            ; Step 1 taken care of.
        AND  #$0F

Why does it use REFP0,X when both the left and right half of the players are in the ROM??

Is this just to simplify the rotational logic? It seems inefficient to use the sprite reflect and store both the left and right halves.

The way I do it is to store a set of sprite graphics address pointers for each of the 15 unique sprite rotation settings (the 16th being the same as the 1st). Then I have a simple greater-than less-than check to determine whether to use the reflection bit or not. In other words, rotations 1-7 (right) don't reflect, and 8-15 (left) do.

I guess there is more than one way to do this sort of thing... It just seems like my way is the most straightforward.

Thomas, how did you handle this in Thrust?

---------------------------------------------------------------------------------------------- Archives (includes files) at Unsub & more at

Current Thread