[stella] Supercharger internals...

Subject: [stella] Supercharger internals...
From: bwmott@xxxxxxxxxxxx
Date: Wed, 14 May 1997 16:47:48 -0400 (EDT)
Hi Everyone!

I'm working on version 0.7 of Stella, an atari 2600 emulator, and have
been integrating some code written by Christopher Salomon for
Supercharger support into this version.  I've gotten his code
working and I'm able to play most of the Supercharger games, however,
I'm still a little puzzled about the Supercharger's hardware.

I've been trying to figure out the RAM writing by thinking about
the hardware, but this all seems very strange to me.  For example:

  ldx #$3f
  cmp $f000,x
  lda $f77b

Is suppose to poke 3f into the RAM currently banked into location
f77b.  Isn't it? Or is the following necessary:

  ldx #$3f
  cmp $f000,x
  nop
  lda $f77b

Either way I can't figure out how the hardware knows what an operand
access is as opposed to an intruction fetch?  I mean to the cart they
would look the same wouldn't they?

  F800  ldx #$3f        2 cycles   2 accesses
  F802  cmp $f000,x     4 cycles   4 accesses
  F805  lda $ff7b       4 cycles   4 accesses

After the cmp $f000,x supercharge knows a poke is about to be done
so it should start looking for an address to poke to.  This address
should be $ff7b but why isn't it $f805, $f806, or $f807? Since the
cart sees the accesses in that order.  Or is it the case
that poking code is always in the 2600's RAM?

If it's not always in the 2600's RAM then I guess there's a delay after
the cmp $f000,x before it looks for the poke address on the bus.
For the code above it would have to skip 3 cycles (or is it three acesses?)
But then the other poke method would be a different story:

  F800  ldx #$3f        2 cycles   2 accesses (to cart memory)
  F802  cmp $f000,x     4 cycles   4 accesses
  F805  NOP             2 cycles   1 accesses
  F806  lda $ff7b       4 cycles   4 accesses

And then there's:

  F800  ldx #$3f        2 cycles   2 accesses
  F802  cmp $f000,x     4 cycles   4 accesses
  F805  CMP $(80),y     5/6 cycles 3/4 accesses

Arggg.....  If you've got any insight on the Supercharger's hardware
please let me know.

Thanks,
Brad

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

--
Archives available at http://www.biglist.com/lists/stella/archives/
E-mail UNSUBSCRIBE in the body to stella-request@xxxxxxxxxxx to be removed.

Current Thread