Posts: 297
Threads: 25
Joined: Nov 2006
Can anyone explain (or point to an explanation) how the
bank switching in the Advantage module is done? Presumably
there is a mechanism in the module that recognizes which
bank it should be returning and does the selection. I would
like to be able to emulate the module in a FLASH/RAM box
that I am designing. I know how to do regular modules and
X memory but can't find a reference to this functionality.
Thanks in advance.
Monte Dalrymple
Posts: 1,162
Threads: 26
Joined: Aug 2005
There's some information on bank switching in the ZenROM and/or ZEPROM manuals.
Basically, there are 2 instructions that are NOPs to the Nut processor, but which the bank-switched ROM chip recognises and acts upon. They select the primary or secondary bank of the 4K ROM they're executed from. There's
also a conventiuon that there are short routines at the top end of each bank-switched 4K chip to select the primary or secondary bank of that chip and then return.
I can look up more details if you're interested.
Posts: 297
Threads: 25
Joined: Nov 2006
Ahh, that was the clue I needed. No mention of this in the Emery book, which is what threw me. Found it in the source code of Warren Furlow's emulator. For anyone interested, ENBANK1 is 100 hex, ENBANK2 is 180, ENBANK3 is 140 and ENBANK4 is 1C0. Now I'm off to the ROM images to see exactly how it's done. Thank you Tony.
Monte Dalrymple