CD Backup RAM Cart

Ask anything your want about Mega/SegaCD programming.

Moderator: Mask of Destiny

Charles MacDonald
Very interested
Posts: 292
Joined: Sat Apr 21, 2007 1:14 am

CD Backup RAM Cart

Post by Charles MacDonald »

I took one of these apart. It has two locations for 128Kx8 RAM, but only one is populated. A shame they didn't use the other for 256K of savegame memory.

The memory map looks like this:

400000-4FFFFF : Cart ID; reads return 0x04 on D7-D0 only.
680000-6BFFFF : 1st 128Kx8 RAM chip; data on D7-D0 only.
6C0000-6FFFFF : 2nd 128Kx8 RAM chip; data on D7-D0 only. (not used)
700000-7FFFFF : Writes by /LWR latch D0; 0=RAM write enabled, 1=disabled

So the RAMs span 128K words (256K space) at D7-D0 only using /LWR for the write strobe.

The RAMs are protected from spurious activity on /LWR by the BA6162 chip which controls CS2 of both chips, and also handles the +5V/+3.3V power supply switching instead of using diodes.

/MRES (not /VRES) resets the latched D0 value to zero, so by default after switching the system on RAM will be write-enabled. Hitting the reset button won't do anything to change the state of latched D0.

The cart uses a soldered-in CR2450 battery which is _much_ larger than a CR2032.
HardWareMan
Very interested
Posts: 753
Joined: Sat Dec 15, 2007 7:49 am

Post by HardWareMan »

Put the pictures!
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

Very cool, :D

and I second HardWareMan, pictures please :)
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
KanedaFr
Administrateur
Posts: 1154
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr »

cool !
I was waiting for a cheap one to open and scan the board!
so I second that : can you share with us the picture of the inside ? :)
thanks
Charles MacDonald
Very interested
Posts: 292
Joined: Sat Apr 21, 2007 1:14 am

Post by Charles MacDonald »

KanedaFr wrote:cool !
I was waiting for a cheap one to open and scan the board!
so I second that : can you share with us the picture of the inside ? :)
thanks
Haha, glad there's so much interest in this thing. I was worried I was repeating efforts. :D

Image

There's nothing on the back side. Chips are:

U1 - CXK581000AM-70LL
U2 - CXK581000AM-70LL (unpopulated)
U3 - 6162
U4 - 74HC139
U5 - 74HC74
U6 - 74HC32
U7 - 74HC244
BAT - Sony CR2450

If you added a second 128Kx8 RAM it would work directly The OR gate is used to restrict the range decoded by the '139 to the upper 512K (which is why the RAM is at 680000-6FFFFF) but if you undid that you could possibly add up to 512K of memory with some modifications. Not sure how many the Sega CD BIOS / backup RAM libraries support.

All address decoding uses CE0#, VA21-VA18, so if you were going to ground the CART# pin, just subtract $400000 from the addresses listed to access the RAM and ID/write protect register.
Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy »

Actually, the "ID" is the amount of BRAM, where 4 is 128K, 3 is 64K, 2 is 32K, and 1 is 16K. I guess 5 would be 256K.

That was a bug in the MD Myth menu... the BRAM was reported as 4 because Dr.neo thought the size was the SPACE occupied, not the number of bytes. Since BRAM is a byte wide, it occupies every other byte, with the even bytes being ignored, so 128K is 256K of space. Anywho, the GBA carts used by the Myth are incapable of more than 64K without bank selecting, so they need to be set to 64K, not 128. The latest MD Myth menu does so, and when you dump the save ram later to save it, you can see the format info at the top of the 64K (formatting the BRAM writes at the top of BRAM an ID string and a block map that is marked all free). Some emulators allows you to set the size of the BRAM as one of the options... others just hardcode it to 128K.
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

One friend of mine built a 512KB cart, and some certain BIOSes only support it IIRC...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
l_oliveira
Very interested
Posts: 53
Joined: Mon Mar 07, 2011 12:58 am

Post by l_oliveira »

Hello ! I am the "friend" mentioned by TmEE.

Back in 2000 or 2001 I contacted Steve Snake and he provided me with some information regarding how this works.

I even remind vaguely trying to contact Charles MacDonald about this as well.

So I rigged this up back in 2001 (or 2002):

Memory map:
Image
Write protection:
Image
SRAM (this part could use some improvement)
Image
Size control latch:
Image

And finally how it behaves on the real thing:
Image

When I build this thing I had no idea how the official SEGA cartridge was built. I was surprised that I was capable of making one out of the instructions on how the BIOS would detect and use it.
The parts, I choose based on what I had available here at the time.

Oh and the only bios that cannot work with carts bigger than 1024 blocks are the JPN bios v1.00.
Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy »

Nice! The only problem I see is you labeled A1-15 as D1-15 in the sram diagram.
sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 »

I wounder just an idea.What if you made a similar cartridge with sdram (for example) For example with this 64m chip http://www.jameco.com/webapp/wcs/stores ... _699448_-1
so it would be megabytes=megabits/8 or kilobytes=megabits/8*1024
so either way it would be cool to have 8 megabytes of ram on the sega CD.So would this be possible.
l_oliveira
Very interested
Posts: 53
Joined: Mon Mar 07, 2011 12:58 am

Post by l_oliveira »

Chilly Willy wrote:Nice! The only problem I see is you labeled A1-15 as D1-15 in the sram diagram.
Good point. 10 years later and I never noticed I did that typo... :(
sega16 wrote:I wounder just an idea.What if you made a similar cartridge with sdram (for example) For example with this 64m chip http://www.jameco.com/webapp/wcs/stores ... _699448_-1
so it would be megabytes=megabits/8 or kilobytes=megabits/8*1024
so either way it would be cool to have 8 megabytes of ram on the sega CD.So would this be possible.
About the RAM expansion, there's an supported standard for an work ram expansion cartridge and I believe it also uses the ID register, but instead of a 8 bit RAM bank, it has full RAM (I.E.: 16 bits memory) on that range. So instead of 512KB it would be 1MB... ;)
Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy »

There's not enough space in the CD memory map for that much ram. Actually, the save cart is in the MD space, but you know what I mean. I think 1MB is the most if you follow that "standard" design. If you simply take all the empty space, you can have at most 4MB of ram with the SCD.
KanedaFr
Administrateur
Posts: 1154
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr »

l_oliveira wrote: Oh and the only bios that cannot work with carts bigger than 1024 blocks are the JPN bios v1.00.
May I ask what happen in this case ?
JPN bios v1 only see the first 1024 blocks or nothing ?


personnaly I'll be more interested with a RAM Cart with a bank selector (a multi pos switch), so I could avoid 1 cart for ShiningForceCD, 1 for XXX... etc...
HardWareMan
Very interested
Posts: 753
Joined: Sat Dec 15, 2007 7:49 am

Post by HardWareMan »

Can't se pictures! I don't use any google service. :3
Image
sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 »

Chilly Willy wrote:There's not enough space in the CD memory map for that much ram. Actually, the save cart is in the MD space, but you know what I mean. I think 1MB is the most if you follow that "standard" design. If you simply take all the empty space, you can have at most 4MB of ram with the SCD.
Still 4mb is alot of ram (for a sega cd).Also I forgot to post that I was asking If it could just be used as regular ram and not just ram for game saves.I think a ram cartridge like that would have alot of uses for example if you want to play a movie you could have a 4mb buffer and 2mb decompressed of the movie could be stored while the other 2mb is being decompressed so in turn that would allow better compressed movies because it has more time to decompress it.
Post Reply