Re: [stella] A new way to bankswitch

Subject: Re: [stella] A new way to bankswitch
From: "Kroko" <Nil.Krokodil@xxxxxxx>
Date: Wed, 9 Mar 2005 17:38:48 -0500
> But I am not 100% sure it works on real hardware. The problem might
> occur when accessing the RTS at $FFF8.

When you are in bank 0 and jump to FFF8, the first time FFF8 is seen on the
bus is when the controller fetches the RTS opcode from that location. Well, 
are already in bank 0 and for that reason we should just stay where we are.
After RTS is fetched, a dummy fetch takes place which brings FFF9 to the 
which then causes the bankswitching logic to switch to bank 1. The RTS then
returns to the location you pushed on the stack, but after the switch to 
bank 1.

When you are in bank 1 and jump to FFF7, nothing happens when you fetch the
RTS opcode from there. But after the RTS fetch, a dummy fetch from FFF8 
place and switches to bank 0. After that, RTS returns to the location after 
the adress
on the stack.

I really can't think how a bankswitching hardware could be made that would 
support the above behaviour. The hardware just watches the bus and switches
banks as soon as it can see one of the hotspots. And the dummy fetch causes 
perfectly valid hotspot adress for one 6507 cycle.

I think it HAS to work ! (unless I missed something obvious :-)


Archives (includes files) at
Unsub & more at

Current Thread