Re: [stella] disassemblies and other stuff

Subject: Re: [stella] disassemblies and other stuff
From: Rob <kudla@xxxxxxxxx>
Date: Tue, 09 Jan 2001 00:28:24 -0500
At 10:09 AM 1/8/01 -0800, Glenn Saunders wrote:
>I tried disassembling Super Challenge Football with diStella and it left 
>large patches.

Maybe it gets confused by undocumented opcodes?  I haven't looked at SCF
myself but it wouldn't surprise me if it used some.  That's the M-Network
thing, right?

>SCF won't even run on PCAtari for some reason.  It runs fine on Stella so I 
>have to assume it's the emulator, not the ROM image.

How weird, a game that will run on Stella but not PCAE ;)

>So I'm thinking, what's an easy way to figure out if a number is divisible 
>(evenly) by another number?

As long as it's a power of 2, AND the two numbers (or rather, the first
number and the second number minus one) and if it's zero it's evenly
divisible.  Otherwise, holy cycle wastage Batman.  Seriously, on the 2600
you generally don't have time for non-binary math.

I'm not much further along in all this than you are, but here's my take on
a loop that does one thing every other scanline and another thing every 8
(sorry for the pseudo code, it's late:)

Loop      LDA ScanLine
	        AND #01 ; turn off all bits except 0
          BNE EndOfLine ; if not divisible by 2 then also not by 8
          ; do your every other scanline thing here...
          LDA ScanLine
          AND #07 ; turn off all bits except 0, 1, and 2
          BNE EndOfLine
          ; do your every 8 scanlines stuff here...
EndOfLine ; do your every scanline stuff here...
          STA WSYNC
          ; etc...
          INC ScanLine
          LDA ScanLine
          CMP LastLine
          BNE Loop
          ; overscan starts here...

You could switch the every-other-scanline and every-8-scanline sections
depending on when you need to draw what.  In that case you would need to
hang a label on the every-other-line section and BNE to that rather than
EndOfLine.  I'm sure there's a more efficient way to do this, but this is
the obvious way to me.  (Well, except I'd do it as a DEC loop rather than
an INC/CMP loop, as you imagined, cutting like 5 cycles out of the 68 or
however many you have to spend on a line.)

Rob

kudla@xxxxxxxxx ... http://kudla.org/raindog ... Rob


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

Current Thread