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 21:38:34 -0400
On Monday, June 24, 2002, at 07:35 PM, KirkIsrael@xxxxxxxxxxxxx wrote:
I was looking at Ruffin Bailey's Disassembly of missile.bin, trying
to tweak some things and learn what's going on.  One thing I don't
understand...a couple times it has
  LDA #  ;some postitive value
  STA HMM0;

(once with Y instead of the Accumulator)
when I replace that number with #00 , the missile is still moving to
the right, seemingly at the same speed.  What am I missing here?
(a lot I imagine..."I assume the HMM0 commands are self-explanatory"
my right big toenail! ;-)

Fwiw, the dissembly seems to have come from this URL: http://www.biglist.com/lists/stella/archives/200103/msg00057.html

Just over a year old! That's a spring chicken for one of my cruddy demos!

Here are my guesses for what's going on:
If you want to load zero into Y, you'll need to have this line:
       LDY    #$00

There's an outside chance that you left off the $ before the 00. If you leave out the "#", it'll read from address 00 (does that even exist?). Leaving out the $ -- I'm not sure what that does. :^) I just tried setting both lines to LDY #$00 and the missile doesn't move either direction. Stella 0.7 in Classic in Mac OS X gives weird colors!

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


I'm lost there. I shoulda only done it once. Musta been trying to make it tougher for people to learn using the code later. :^)

Another guess for the error... if you used the right #$00 but you only "zeroed out" one of the sections where I wrote to Y in the joystick reading section (the section after the snippet pasted above), it'd still move either right or left (but only one of those), depending.

Eventually I'd like to make a series of tutorial demos of
increasing complexity...one thing about "how to draw a playfield"
is that I think most newbies are more anxious to get players and
missiles going than the backdrops.  So I'd try to start with a
very clean moving missile, then maybe moving player, or moving
a missle with the joystick, and maybe one or two up from there.

Good luck with the tutorial. That's actually what that code was ultimately supposed to be headed towards. First how to move things, then simple collisions, and finally building up to "Poor Man's Combat". Obviously never got there, but I'm hopeful that some day I'll find the guts to quit the 9-to-6'er and start doing some of the "fun" things I've wanted to do like this.


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