Subject: [stella] FE Bankswitching|
From: "Kroko" <Nil.Krokodil@xxxxxxx>
Date: Wed, 26 Feb 2003 19:14:48 +0100
I think its time to ask all of the experts from this list, instead of flooding
the known experts :-)
I have tried to find out, how FE bankswitching works. I have read
everything that was posted on this list. It helped a lot, but there are
still a few things i don't understand.
I will summarize the things i understand first:
FE bankswitching switches banks by the use of JSR and RTS.
Lets talk about RTS first. RTS will pull the return adress from the stack.
first the LO-Byte second the HI-Byte of the return address. So i look
at the Hi Byte from the Return address. Bit 5 in this Byte will tell me,
if i have to stay in the same bank, or if i have to switch to the other bank.
That seems quite clear .. no problem.
But lets talk about JSR now. JSR will push the return address to the stack.
But if I only look at the return address, that won't tell me where to jump, but
only where to return to if the subroutine was executed. The target adress
will not be pushed to the stack. So how the hell could a cartridge know,
where the target adress is, if it cant see bit A13 of the target ?
If you ask me, looking at Bit 5 from the databus after a double stack hit
can not tell me where to jump. I have looked at decathlon. It jumps to
the other bank and within the same bank by using JSR. What am
I missing ?