Re: [stella] nop and wrap around

Subject: Re: [stella] nop and wrap around
From: Mark De Smet <desmet@xxxxxxxxxxxx>
Date: Wed, 13 Jan 1999 00:16:37 -0600 (CST)
> Cool... where do I buy one? :)

Not done yet...  

> There is not a common startup address, but there is a startup vector at
> $FFFC - on powerup, the 6507's PC is set to the word stored at locations
> $FFFC and $FFFD.

Is the vector stored in the lo, hi format the same as in a jmp?(from a
quick search through existing roms, it seems so) If so, how about having a
rom like this:(system relative addresses, not rom relative)

$1000 - $1FFA = EA  (nop)
$1FFB         = 4C  (first part of a jmp, i think)
$1FFC         = FB  (startup vector lo)(shouldn't actually be used)
$1FFD         = 1F  (startup vector hi)(shouldn't actually be used)

Assuming that I have hardware that switches from this rom to the new game
after the address $1FFB appears and the ROM becomes deselected($0XXX)(i.e.
after the 4C was loaded into the 6507).  If I hot-swapped into the rom
above(swapped in the middle of a games execution), would the system start
up with the new game?  

I would think that the processor would proceed to execute nops until it
got to $1FFB, where it would start a jmp, and then load the vector from
the new game.

Of course the screen update would be neglected, but I think that it would
be much smoother a transition than power cycling the VCS.

> Try experimenting with swapping in a ROM full of BRK instructions.  I
> *think* the BRK instruction acts as a soft reset, resetting the PC to the
> startup vector.

Anyone else know about the BRK?


> As for wrapping around the PC... that's very unlikely to work.  Within the
> 2600's address space, $1000-$1fff is ROM space, then the very next byte at
> $2000 wraps back around to $0, which is TIA input/output registers -
> trying to execute code out of those registers is unpredictable, to say the
> least. :)

oops, forgot about that.


Just curious, if the startup vector is at 1FFD:1FFC, then what is at 1FFE
and 1FFF?

Mark




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

Current Thread