don't click here

SegaCD - Using solid state in place of volatle storage?

Discussion in 'Engineering & Reverse Engineering' started by Cyber Akuma, Jul 29, 2017.

  1. Cyber Akuma

    Cyber Akuma

    Member
    12
    0
    1
    I was looking into the Sega CD RAMcart, which from my understanding was essentially just a larger memorycard to save game data to from the internal storage of the SegaCD. The Sega Saturn IIRC had a fairly similar setup as well.

    All the official methods from SEGA for the SegaCD and Saturn used volatile memory, and this required a battery to keep the memory alive (Rather annoying that the Saturn also used this battery to run the Realtime Clock, causing it to run out in about 2-3 years.. while I have carts from the SNES era that still retain their memory). I remember being quite happy when I got my 4-in-1 for the Sega Saturn and saw that it had no battery inside it, the memory was non-volatile.

    I was looking into 3rd party/unofficial Sega CD RAMCarts... and saw that all of them still required a battery. Even newer homebrew carts that can store far more than the official cards did still rely on a battery to keep the save alive. Is there any specific reason for this? I was wondering if anybody had looked into creating one that used non-volatile memory so it would not rely on a battery to keep the savedata alive.

    Speaking of which, I recall even the Everdrives seem to use a battery, I know that some of them do this because you need to reset the system before the Everdrive can sump the SRAM onto the cart, but not all of them do... and I think the Genesis ones are some of the ones that don't need a reset to wrote the save to the SDcard?
     
  2. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    The easiest method would be to use an 8-bit parallel FeRAM (aka FRAM) chip. Parallel FeRAM is interfaced like SRAM, but retains its storage. (Sonic 3 uses an FeRAM chip.)

    The downside is FeRAM chips are expensive. As an example, a 32 KB I²C FeRAM breakout board from Adafruit costs $9.95. (Note that for a Sega CD backup cartridge, you'd need a parallel FeRAM, not I²C.)
     
  3. Cyber Akuma

    Cyber Akuma

    Member
    12
    0
    1
    So, I was doing some research.

    First of all, in terms of prices, FRAM isn't quite AS expensive as you mentioned. Depending on the chip (especially if it's not that old enough to be discontinued long ago) you can get them at a decent price, I found 4Megabit FRAM chips for less than that 1 Megabit chip you mentioned.

    The first thing that caught my eye was that the official carts only came in 1Megabit variants.... but they were designed to be able to go up to 4 Megabit:

    http://segaretro.org/CD_BackUp_RAM_Cart

    Though I admit, I am not sure what to do with that "The memory size is specified by a 3-bit value mapped to Main 68000 address $400001." information. Namely, how to set that value. Would the cart have to write that value to the Genesis's memory? Is that a value that is set in the bios of the RAM cart? There was another post I ran into with schematics on how to build your own that included information on this, but I didn't fully understand it.

    And there are homebrew RAM carts that were designed with this 4 megabit maximum capacity:
    https://db-electronics.ca/product/sega-cd-ultra-backup-ram/

    Though all of them still employ the use of SRAM and require a battery to keep the memory alive.

    Reading up further, apparently people have dome a SRAM to FRAM replacement..... for the Sega Saturn's internal memory:
    https://db-electronics.ca/2017/02/10/sega-saturn-internal-memory-mod-with-fram-no-battery-required/

    Seems it was also extremely easy to do as well once the right FRAM chip was found, literally just soldering it in place of the SRAM chip and putting pin 22 to ground instead of soldering that in place of the surface-mount connector.


    Somehow, I get the feeling that creating a Sega CD Ramcart that uses FRAM is going to be a little trickier than just swapping the SRAM for a FRAM chip though, otherwise others would likely have already done it.

    First thing I would need to do is figure out the pinout of the SRAM chip the Sega CD RAM Cart uses, and then try to find a simlar pinout of a FRAM chip, like the person who modified their Saturn did. Issue is.... I don't know what would be a reliable source for finding such information. Sure, I can Google for a whitepaper or spec sheet on any FRAM chip I run into.... but that would be a lot of random hoping the chip is compatible or has a similar pinout.... plus I wouldn't understand some of the terms that were important to modifying the Saturn in such a way.... such as this excerpt from the above Saturn link:
    I understand about.... half of that, but not funny. I fear I might not have the skills needed to properly decide on the parts I would need to do this.

    And considering I will be experimenting with this, I would likely use a socket and DIP-type IC so I can change them out quickly instead of surface mount, especially since my soldering skills are not that good.

    I would like to see if I can perform such a mod to the Sega CD itself, especially if it's possible to increase the capacity of that as well (is there any information on this?), but that would both be a lot riskier as a failed attempt could mean a destroyed Sega CD system instead of a useless RAM Cart, but the Sega CD operated differently in that it used a rechargeable battery instead of a standard one like the RAM Carts used.

    I would love it if I could just make my own RAM Cart from scratch instead of cannibalize an existing one, and I know such dev boards exist, but I would not know where to even begin. Especially since I have no idea if the RAM Carts had their own RAM and/or bios... or if they were literally just some SRAM on a cart with some sort of identifier so the Sega CD would know it's a RAM cart.

    I did run into this rather useful post:
    http://nfggames.com/forum2/index.php?topic=3383.0

    Schematics on how to build you own, including the part that indicates the size of the RAM cart, but while I do understand some of it, again, I don't fully understand it.

    Sadly, unlike the Saturn, I could not find any other information of anyone attempting to FRAM-mod their SegaCD or create an FRAM cart.

    Does anybody have any other advice they can give me about this?
     
  4. Blastfrog

    Blastfrog

    See ya starside. Member
    Unrelated, but I've wondered; what would be required to get actual SCD hardware running off a disc image from an IDE or SATA solid state or hard drive? Instead of using optical medium and dealing with all of its limitations, you could have faster loading times, any length song (even properly looping), and bigger games.
     
  5. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,612
    417
    63
    ALWAYS Sonic the Fighters
    I assume it would have to be done similar to how the Dreamcast/NAOMI discs are emulated?
     
  6. Flygon

    Flygon

    Member
    There's a thread on Spritesmind that's been doing research into that.

    I'm not enough of an expert to give advice regarding this, but we're not quite there yet.
     
  7. Cyber Akuma

    Cyber Akuma

    Member
    12
    0
    1
    Seems the only place I can even FIND that FM1808 used in that Saturn guide anymore are either from Alibaba/Aliexpress (which I don't trust not to be fake chips) or MASSIVELY overpriced at places that specialize in obsolete chips.

    Luckily though, seems there is a (slightly pricey) modern pin-compatible equivalent from Cypress in the form of the FM18W08, and even one that might be a suitable candidate for the Sega CD's internal SRAM, FM16W08-SG.... but I can't find a pin-compatible one for the RAM Cartridge. All the ones from Cypress are either 44 pin TSOP II or 32 pin TSOP I packages, and the SRAM chip used in the RAM carts is a 32 pin SOP/SOIC package.

    .... though, this is just simply finding pin-compatible parallel FRAM chips, I still need to do additional research on if there are any other specs or issues that would make these FRAM candidates not valid replacements for the original SRAM chip.

    (Also would like to know if it would be possible to increase the internal storage capacity of the Sega CD's internal SRAM, I know people looked into the RAM carts and saw that they allow for this, but I don't think anybody ever looked into the Sega CD itself, unfortunately I don't know enough about circuitry to figure that out myself).
     
  8. Jeffery Mewtamer

    Jeffery Mewtamer

    Blind Bookworm Member
    1,883
    90
    28
    At the risk of talking out my ass, can one expand the range of candidate chips by say, taking a ribbon cable, separating it into individual wires, and wiring slot pins to a different numbered chip pin? Or would such a setup result into much ros talk, connections being too filmsy to be reliable, or some other problem?
     
  9. Cyber Akuma

    Cyber Akuma

    Member
    12
    0
    1
    Hmm... interesting. I was browsing E-bay to see if I could possibly get my hands on a cheap RAM cartridge to experiment on, and I found this:

    http://www.ebay.com/itm/6264-NVRAM-Battery-Eliminator-Stern-DE-Sega-WMS-/201941647903

    While it is intended for a wide variety of Pinball machines..... including ones from SEGA, that "adapter" is designed to replace the SRAM with FRAM on various pinball machines, to eliminate the need to have a battery to keep the storage alive....

    And what's more, the chip.... the FM16W08, is EXACTLY the chip I found that looked like it might be a worthy replacement for the SRAM chip used on the Sega CD.

    Seems extremely likely that the FM16W08 is the kind of chip one could use to upgrade the Sega CD to having battery-less memory.

    That could work, yes, I don't think interference would be an issue as long as the wires are not too long and shielded. Granted, I would want to do this for the purpose of socketing it because I would need to experiment with various chips, it would not be a good idea for a permanent solution.