Working on a NES dev cart for MMC1, have been experimenting with games that will need save functionality. I know that Nintendo used a diode-resistor setup for managing the SRAM battery, so I took a look at some boards I've got. What kind of diodes are found on NES boards for controlling the battery?
I looked at 2 different games I have and they seemed to use different kinds (or different values, rather) than the other...see the pics for reference.
I know INL uses a similar method for his carts, and it seems to work well. Are there any values that would be ideal for a low-power 64K SRAM? Are there any downsides to using this method?
They're
Schottky Diodes. They have a lower forward biased voltage drop, and switch quickly compared to standard rectifier/switching diodes. So they're ideal for uses like this where you want to maximize the voltage supply to the sram and switch quickly. If you're curious, I use BAT54C on my designs.
Thanks for the suggestion! So yours are 30V 200ma diodes. Is there any issues with changing those values? Also, I notice that all NES carts with a battery seem to have 2 of those diodes before the SRAM, whereas yours only has the one. How is it that yours provides the same function using only 1 diode?
Those ratings just happen to have been the lowest cost ones I could find. 30V is plenty as you're only going to see at most ~5V. SRAMs should consume far less than 200mA, so 200mA is plenty, and you could go higher, but I'd watch out for ones that are too big. Ones rated for an amp or something like that are probably too big. I doubt you'll find one with a current rating too low to supply the SRAM.
Mine aren't one diode, but two diodes configured with common cathode. So there are 3 pins for 2 diodes. Two anode pins, and one common cathode pin for both diodes (aka BAT54C configuration). This is slightly different than the configuration of original NES carts which have a resistor between the two cathodes. I've yet to have an issue with that, and can't come up with any reason the resistor can't go on the anode side of the battery diode. I'm not even sure why the resistor is needed to be honest, probably smoother switching. Someone had me thinking it kept from attempting to charge the battery while playing in the NES, but these diode can easily take several volts of reverse bias without leaking much.
I recommend the common anode config as it reduces part count, cost, and makes the boards easier to place compared to single diodes.
On a somewhat-related question, since Shotky diodes have a lower dropoff voltage and switch off faster than regular diodes, how comes they haven't replaced them completely, since they are superior in all fields ? Price ?
Bregalad wrote:
Price ?
That and they have a lower breakdown voltage and higher reverse bias leakage. No one diode is ideal for all applications. We don't care much about reverse bias operation for battery backing, if you care more about reverse bias operations Schottky probably isn't your guy.
see source for more visible text and learning fun.
http://wps.prenhall.com/chet_paynter_introduct_7/30/7755/1985386.cw/-/1985389/index.html
Awesome that helps clear things up. Paul, I notice on your NES boards that the #2 anode from that chip goes to another chip below it labelled "2Gb2w". What is that? A transistor maybe?
I think you're talking about the 3.3v regulator. Although the only reason it's connected to that chip is because they're both connected to NES Vcc (5volts). The 3.3v regulator powers the CPLDs, that's it's only use, doesn't have anything todo with battery backing.
I seem to be having issues getting this method to work. I have harvested the parts (diodes and resistors) from a NES cart and tried using them in a SNES cart. It's a custom SNES cart that normally uses a power supervisor (BA6162) to control the battery, which works perfectly. I don't have my NES boards made yet so I only have SNES to test with currently...
I connected everything as it is on a NES cart, and tried a game (BS Zelda) and the game crashes at the Record Select screen. I even tried jumpering off of an INL SNES board using his diode setup, just in case my diodes weren't enough, and it gives the same result. I've tied CE2 from the SRAM (pin 26) to GND, as it is on a NES cart. Tried with and without a battery, same result.
Not sure why it keeps crashing...*Sometimes* I can get it into the game if I press start rapidly, but then upon reset it crashes to a black screen when you press START at the title screen.
Any ideas?
EDIT: Figured it out, it seems like for 64K srams a transistor is needed on the CE2 line. Seems to be working ok now...that or I just fluked out. Does this make sense to anyone, and would I need a transistor for 256K Srams as well?