Re: [stella] Help Interpreting Code

Subject: Re: [stella] Help Interpreting Code
From: "Roagie" <roagie@xxxxxxx>
Date: Sat, 13 Jul 2002 16:10:00 -0700
Well I have just discovered the wonders of the PCAE debugger. Hmm, can
anyone say "godsend"?

Ok, here's where I screwed up.

    CPY GRP0SIZE    ; sets Z = 1 if true
    BNE sprite1     ; branches if Z = 0, meaning Z(result was zero) = false.
                    ; and most likely the work of the devil.
    ;so it winds up branching as long as it does not encounter the sprite

    ;otherwise, if it does encounter the sprite, it does the following:
    LDA #27
    ; and X no longer = $ff (a neg number, actually what you get when X
"rolls" below         ; $00?)

    ;so then it drops down here regardless
    LDX GRP0SIZE ; this will be $ff if sprite was not encountered
    BMI grfx2    ; and since X = $ff it branches

I tell ya, this newbie FAQ is gonna be good! :)
If anyone else can think of some common 6502/general assembly/TIA/etc
"gotchas" that newbies always seem to be asking about, please send them my
way so I may include them in the FAQ.

Here's another quick question while I'm at it. Is there an adavantage to
using hex, for example, when defining player graphics? It seems to be much
easier to use the binary notation. i.e. $20 = %00100000
You can design your sprite right in the code in this manner! There has to be
a downside, what is it?

Thanks all!

Archives (includes files) at
Unsub & more at

Current Thread