Sunday, January 14, 2007

Plus4 memory

Ever since my static RAM arrived I've been toying with how to do the Plus4 RAM expansion, and after yesterdays revalation about using PIC's as decoders, I think I've hit on a nice way of doing it. The piccy shown is the current design which also has the advantage of being pretty cheap (well...as much as it can be). While PIC's are CPU's, the 16F628A is only around £1, which is still cheaper than all the logic chips I was using to just decode the address lines last time and while I could probably lose a chip from that, its still cheaper and can be upgraded due to the fact its programable. The only thing Im not sure about is if the program running will test/set the lines quick enough. Its 4Mhz by default, but you can ramp it up to 20Mhz if you need to, but as I currently use all the control lines, I can't do that. I could buy a larger PIC (for £2) and then have plenty of space for this stuff, but I've a stack of these so I'll see how it goes first.

This design allows for 16, 16K banks of RAM located at $8000 although bank 0 will also reside at $c000->$ffff. Its kind of like a Spectrum 128 deisgn I guess, where you have a single area that can page in lots of banks of RAM. However, theres still the 32K of RAM from $0000->$7fff where you can copy stuff around if you need to. The normal RAM from $8000->$ffff will just be rubbish (more or less) as its written to at the same time as the expansion, but that shouldn't matter.

You probably won't be able to put character sets etc. there (as I have no idea what will happen when it "banks", but any other kinds of data should be fine...I think. This is all guess work at the moment and I still have no idea if this will actually work...but its worth a try as all current memory expansions require you to solder onto you Plus/4 motherboard!

6 comments:

Solder said...

Hi Mike,

I think it works like my sRAM-card. I use a GAL to decode the logic. But register is a HC273. I use adress from $4000 to $bfff for writing the sRAMs, because it's compatible with existing burn-files. My card uses only 2 chips, one for every ROM-bank (a, f). With chips 628512 (~3€) you can get 1MB capacity.
If you use HC245 (or similar) you can read your register back. Solder

Mike said...

Was you's for a C16 only? I've never seen a Plus/4 external RAM expansion before....

I've just recieved (yesterday!) a stack of these chips along with a few GAL's and PAL's, although I still have to try and get a program to compile the logic into something I can burn onto them....

The idea is to do something like this and then add an MMC+EPROM(or flash), and possibly a SID card. The SRAM takes up a lot of space though so I'll probably piggyback it and I haven't played with increasing voltages like you do on your SID card.

So that'll be fun :)

Chicken said...

Since SOLDER hasn't replied, yet, I guess I can answer that question. His sRAM extension works on plus/4 as well (in fact, I'm a proud owner of a 1MB version. Thanks, Santa ;) ).

So if your idea is similar to SOLDER's card, it's not really a RAM expansion but rather an emulated cartridge.

Mike said...

If its anything to do with cartridges, how does it start at $4000? Carts all start at $8000 and run to $ffff....?

Although I plan to start with 16K banks, I want to go down to 4K ones (or at least 8K) at some point as its far more flexible.

solder said...

Hi Mike,

the adresses from $4000 to $bfff are for compatibility with existing software. The card is from $8000 to $ffff in bank a or bank f (except I/O) while reading. This cards emulates (sRAM instead EPROM) Modules while using existing modules (Script/+, Game-Modules etc.) The burnfiles from this modules are from $4000 to $bfff for existing plus/4-EPROM-burners. My modulgenerator also produces these burnfiles. You can now activate writing to the sRAM-card and directly load the files from floppy to the card. Then switch writing off and you have a module loaded to $8000-$ffff. You can't load single files directly to $8000-$ffff because you will overwrite I/O with this.
My card is software-controlled (Register). You can write without loss of RAM-data if you save every value before writing to sRAM-card. Then switch writing so sRAM off and restore RAM-data. I will send you the schematic and the logic-equations for the GAL.
My sRAM-card can be used together with SID-card because it needs the expansionport-splitter (3 Slots).

Solder

Mike said...

Ahhh...it all becomes clear.... I looked up your site an saw a picture, complete with battery. So its basically an software EPROM - before FLASH rom's came out - I get it.

Well, mine is pretty similar, except its a pure RAM expansion. If you remember a while back you told me that you couldn't add external RAM as the plus/4 doesn't export the DMA line. Well, I figured this was a possible way to get around that since the Plus/4 does have memory management when dealing with ROM's.

Anyway, I'll give it a go and see if it works, it would be great to have extra RAM without having to open up your machine.