Subject: Re: [stella] new bankswitching scheme ? From: Adam Wozniak <adam@xxxxxxxxxxxxxxxx> Date: Mon, 2 Feb 2004 14:35:48 -0800 (PST) |
On Mon, 2 Feb 2004, Kroko wrote: > I have finally finished my first flashcart prototype and I have a question to > the programming experts :-) > > There is a bit of empty space on the CPLD. There are 128K SRAM on the Cartridge. > I would like this RAM to be available for programming. In theory I could enhance the > 3F bankswitching to support RAM. We could call it 3F+. 128K/256 that would be 256 > blocks of RAM each with a size of 512Bytes which would be mapped into the first 1K > of the cartridges address space. (512 bytes write port and 512 bytes read port). A write > to 3F selects a 2K Rom slice into the first 2K of the cartridge. A write to 3E could select > a 512Byte RAM slice into the first 1K of the cartridge. So the first 1K could be either > ROM or RAM, dependent on what address you were last writing to (3E or 3F). What do > you think about this idea ? > > Would this RAM-Slice size be good, or should I make it smaller, lets say 256 > slices of 256Byte .... Try this: Think of the SRAM as 128 blocks each of 1024 bytes. Let 3F control the first 2K of the cart's addressable space: Writing a value N with the MSB cleared (i.e. from 0 to 127) there maps blocks N and N+1 into the first 2K, read only (i.e. as if it were ROM). Writing a value N with the MSB set (i.e. from 128 to 255) there maps block N as RAM, with the first 1K as read and the second 1K as write. Let 3E control the second 2K in a similar manner: Writing a value N with the MSB cleared (i.e. from 0 to 127) there maps blocks N and N+1 into the second 2K, read only (i.e. as if it were ROM). Writing a value N with the MSB set (i.e. from 128 to 255) there maps block N as RAM, with the third 1K as read and the fourth 1K as write. Did that make sense? Now any part of the 128K SRAM can be mapped as RAM or ROM. -- adam@xxxxxxxxxxxxxxxx http://cuddlepuddle.org/~adam/pgp.html http://cuddlepuddle.org/~adam/resume.html "The dinosaurs are not around today because they did not have a space program." -- Arthur C. Clarke ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[stella] new bankswitching scheme ?, Kroko | Thread | Re: [stella] new bankswitching sche, Kroko |
[stella] new bankswitching scheme ?, Kroko | Date | Re: [stella] new bankswitching sche, Adam Wozniak |
Month |