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. Tricky, ; 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 STA GRP0SIZE ; and X no longer = $ff (a neg number, actually what you get when X "rolls" below ; $00?) sprite1 ;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 http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[stella] Help Interpreting Code, Roagie | Thread | Re: [stella] Help Interpreting Code, Roger Williams |
Re: [stella] supercharger good; bus, KirkIsrael | Date | RE: [stella] Help Interpreting Code, Nicolás Olhaberry |
Month |