It is currently Tue May 22, 2018 9:10 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Tue May 27, 2014 12:44 pm 
Offline
User avatar

Joined: Tue Dec 04, 2012 3:28 pm
Posts: 344
Location: Canada
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?


Attachments:
image (1).jpg
image (1).jpg [ 50.26 KiB | Viewed 2801 times ]
image.jpg
image.jpg [ 59.54 KiB | Viewed 2801 times ]
Top
 Profile  
 
PostPosted: Tue May 27, 2014 12:56 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 2082
Location: WhereverIparkIt, USA
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.

_________________
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers


Top
 Profile  
 
PostPosted: Tue May 27, 2014 1:24 pm 
Offline
User avatar

Joined: Tue Dec 04, 2012 3:28 pm
Posts: 344
Location: Canada
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?


Top
 Profile  
 
PostPosted: Wed May 28, 2014 1:57 am 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 2082
Location: WhereverIparkIt, USA
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.

_________________
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers


Top
 Profile  
 
PostPosted: Wed May 28, 2014 2:27 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7432
Location: Chexbres, VD, Switzerland
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 ?


Top
 Profile  
 
PostPosted: Wed May 28, 2014 3:07 am 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 2082
Location: WhereverIparkIt, USA
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.

Image
see source for more visible text and learning fun.http://wps.prenhall.com/chet_paynter_introduct_7/30/7755/1985386.cw/-/1985389/index.html

_________________
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers


Top
 Profile  
 
PostPosted: Wed May 28, 2014 11:34 am 
Offline
User avatar

Joined: Tue Dec 04, 2012 3:28 pm
Posts: 344
Location: Canada
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?


Top
 Profile  
 
PostPosted: Wed May 28, 2014 11:44 am 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 2082
Location: WhereverIparkIt, USA
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.

_________________
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers


Top
 Profile  
 
PostPosted: Wed May 28, 2014 12:04 pm 
Offline
User avatar

Joined: Tue Dec 04, 2012 3:28 pm
Posts: 344
Location: Canada
Oh ok. Thanks again!


Top
 Profile  
 
PostPosted: Wed May 28, 2014 1:53 pm 
Offline
User avatar

Joined: Tue Dec 04, 2012 3:28 pm
Posts: 344
Location: Canada
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group