On Wed, Mar 31, 2010 at 04:21:32AM -0400, Kwan Lowe wrote:
I remember some 6502-based systems that used bank switching to access separate 32K windows... Used it mainly for RAM disks.. Was pretty impressive to see apps load within a second when 1 to 2 minutes was the usual wait time.
The BBC Microcomputer (2Mhz 6502) from the early 80s came with 32Kb RAM, 32Kb ROM (16Kb OS ROM, 16Kb paged ROM, for language etc). RAM 0->0x7fff, Paged ROM (aka "Sideways ROM - SWR") 0x8000->0xbfff, OS ROM 0xc000->0xffff.
The language ROM idea was quite clever; it came with BASIC but you could install 3 other ROMS (or with an expansion board, 15 other ROMS) in there and so could have Pascal or a wordprocessor or an interactive assember/debugger or...
So then some clever person thought "what if I put RAM in there". The first use was to be able to load ROM images into it, so effectively letting you change the language ROMs you wanted to use. But with some bank switching it was possible to create a RAMdisk (the BBC was well designed for this sort of expansion). 128Kbyte RAMdisks used 8 of the SWR banks, typically on a expansion daughter board. Since floppy disks at the time ran from 100Kbyte (40track single sided single density) to 720Kbyte (80track double sided double density), a 128Kbyte RAMdisk was nothing to be sneezed at.
Next step was "shadow memory". The BBCs designed shared the program memory with the screen memory. The highest resolution was 20Kb in size (which ran from top of RAM down). Add in OS overheads (3.75Kb) and you didn't have much space for programming! So another form of paging was used to help here; the OS write-character routines were intercepted and banks were switched so the pixels were drawn and then the banks switched back. From a well-written programs perspective this was transparent. A little slow, but it worked :-)
That was a fun machine to use!