Re: [stella] Ruffin Bailey's Disassembly of missile.bin

Subject: Re: [stella] Ruffin Bailey's Disassembly of missile.bin
From: Ruffin Bailey <rufbo1@xxxxxxxxxxx>
Date: Mon, 24 Jun 2002 22:00:38 -0400
On Monday, June 24, 2002, at 09:38 PM, Ruffin Bailey wrote:

Not sure why I use the accumulator to initialize HMM0 and then immediately use the Y register to do the same thing in this code:
LDA #$00 ;2
STA HMM0 ;3
LDA SWCHA ;4 SWCHA dissection
BMI LF065 ;2 Player 0 | Player 1
LDY #$00 ;2 ===============|===============
STY HMM0 ;3 D7 D6 D5 D4 | D3 D2 D1 D0



Oh for heaven's sake, I'm an idiot. This is the code where I was trying to do what you were asking about. Sheesh. The above code will stop the missile from going to the right.


This is what shoulda originally been there, before I set things equal to zero:
LDA    #$00    ;2
       STA    HMM0    ;3
       LDA    SWCHA   ;4  SWCHA dissection
       BMI    LF065   ;2  Player 0       | Player 1
       LDY    #$F0    ;2  ===============|===============
       STY    HMM0    ;3  D7  D6  D5  D4 | D3  D2  D1  D0
LF065: ROL            ;2  rt  lt  dn  up | rt  lt  dn  up

So I initially load zero into HMM0 with the accum, then I load SWCHA into A to check on the joystick in the next line (which means I can't use A anymore for loading up a value to stick into HMM0), then I check to see if the user is moving the joystick right, and if not I skip past putting #$F0 into HMM0 and the missile doesn't go right.


etc etc

Sorry for any confusion my confusing myself caused you. :) Better go to sleep now.

Ruffin Bailey
http://myfreakinname.blogspot.com

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


Current Thread