[stella] Supercharger internals...

Subject: [stella] Supercharger internals...
From: bwmott@xxxxxxxxxxxx
Date: Thu, 7 May 1998 17:35:12 -0400 (EDT)
Well I got some time to play with the supercharger support for Stella
some more today.  Here's something I noticed from the previous posts
and looking and some source code:

Assume $80 = 00, $81 = ff, Y = 0 and X = 5

-- Here's one way to write to RAM:

f800 lda $f000,y
f803 lda ($80),y

f800 lda
f801 00
f802 f0
f803 lda
f804 80

Now from the cartridge port the following addresses would be seen:

f800
f801
f802
f000 So here's the value we're trying to poke $00
f803
f804
0080
0081 
ff00 And 5 accesses later is the location to poke $ff00


-- Here's another way to write to RAM:

f800 lda $f000
f803 nop
f804 sta $ff00

f800 lda
f801 00
f802 f0
f803 nop
f804 sta
f805 00
f806 ff

Now from the cartridge port the following addresses would be seen:

f800
f801
f802
f000 Here's the value to poke $00
f803
f804
f805
f806
ff00 And here 5 accesses later is the location to poke $ff00


-- Here's some code that I'm not sure if it writes to RAM or not:

f800 lda $f000
f804 sta ($80,x)

f800 lda
f801 00
f802 f0
f803 sta
f804 80

Now from the cartridge port the following addresses would be seen:

f800
f801
f802
f000 Here's the value to poke $00
f803
f804
0080
0085
0086
ff00 And here 6 :-( accesses later is the location to poke $ff00 


So after looking at this I decided to code up the Supercharger support
so that it pokes 5 memory ACCESSES after an access to f000 to f0ff. 
To my surprise all of the Starpath games worked :-)  Now, I guess it 
could be that these games only use the first two code sequences to write 
to RAM or it could be that this is the way the Supercharger really works.

I also fix a bug in the Supercharger emulation so that Bob Colbert's
Stell-a-Sketch and Multi game work.  I wasn't poking on writes only
on reads :-)

Later,
Brad

--------------------------------------------------------------------------
Bradford W. Mott (bwmott@xxxxxxx)          Computer Science Department
http://www4.ncsu.edu/~bwmott/www           North Carolina State University
--------------------------------------------------------------------------

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

Current Thread