Battery circuit : Save game are not holding on SRAM

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

Hi,

Can you help me please.
I dont understand why my SRAM are not holding saves of games?

The game that I test is Legend of "Zelda, The - A Link to the Past" (64 SRAM).
File was expanded to 27C322 EPROM.

I use HM6264ALP-10
Image
https://www.aliexpress.com/item/3297738 ... 4c4dUPnDVz
But no chance to get saves with that SRAM.

Then I tested with HM62256ALP-10.
When I keep cartridge on my SNES and I do save the game, then load saved game = it's work (I see my file).
But when I take my cartridge of and put in again, there is no saved file.

Maybe my circuit is wrong?
Image
Image

Or my 2N2222 A331 are the bad one?
Image
https://www.aliexpress.com/item/3280947 ... 4c4djAxInk


When cartridge is out of SNES, I test voltage on SRAM between pins 14(GND) and 28 (VCC2), its shows 2.428 Volt


Thank's
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Battery circuit : Save game are not holding on SRAM

Post by krzysiobal »

Pin26 of SRAM needs to be HIGH when in batterry retention mode - pull it up to pin 28 with 100k resistor..
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

krzysiobal wrote: Wed Sep 02, 2020 4:10 pm Pin26 of SRAM needs to be HIGH when in batterry retention mode - pull it up to pin 28 with 100k resistor..
Like that ?
Image
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Battery circuit : Save game are not holding on SRAM

Post by lidnariq »

... what? No, +CE should be low during retention, and high during operation. And the 2N2222 fragment should already do that.
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

lidnariq wrote: Wed Sep 02, 2020 4:28 pm ... what? No, +CE should be low during retention, and high during operation. And the 2N2222 fragment should already do that.
:roll: OMG ...
:lol: :lol: :lol:
I already test it and its not works.

So I dont understand why its not working.
DO you have any idea?
Please lidnariq
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Battery circuit : Save game are not holding on SRAM

Post by lidnariq »

What does a voltmeter say pins 28, 26, and 20 are doing when power is removed?
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

lidnariq wrote: Wed Sep 02, 2020 4:43 pm What does a voltmeter say pins 28, 26, and 20 are doing when power is removed?
pin 20 = 0.002v
pins 26= 0v
pins 28 = 2.405v
poorstudenthobbyist
Posts: 252
Joined: Fri Jun 24, 2016 4:20 pm

Re: Battery circuit : Save game are not holding on SRAM

Post by poorstudenthobbyist »

What does your circuit on pin 20 look like?
What's your battery voltage?
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

poorstudenthobbyist wrote: Wed Sep 02, 2020 5:14 pm What does your circuit on pin 20 look like?
What's your battery voltage?
Battery alone = 2.959v
Here is circuit of SRAM decoder where pin 20 of SRAM (/RAM_OE) are connected :
Image

and here is SRAM jumpers to chose size of SRAM:
Image
Last edited by Kayumba on Wed Sep 02, 2020 6:10 pm, edited 1 time in total.
poorstudenthobbyist
Posts: 252
Joined: Fri Jun 24, 2016 4:20 pm

Re: Battery circuit : Save game are not holding on SRAM

Post by poorstudenthobbyist »

Do you have both 139s in the board?
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

poorstudenthobbyist wrote: Wed Sep 02, 2020 5:48 pm Do you have both 139s in the board?
No.
I put only one,
and solder jumpers for LoROM decoder
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Battery circuit : Save game are not holding on SRAM

Post by lidnariq »

Kayumba wrote: Wed Sep 02, 2020 2:14 pm I use HM6264ALP-10
Then I tested with HM62256ALP-10.
This schematic is only for a 64 kibit RAM. It will not work with a 256 kibit RAM: pin 26 became an address line, no longer an enable.

For a 256 kibit RAM, you must use a schematic that gently pulls pin 20 high when power is removed.
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

lidnariq wrote: Wed Sep 02, 2020 6:38 pm
Kayumba wrote: Wed Sep 02, 2020 2:14 pm I use HM6264ALP-10
Then I tested with HM62256ALP-10.
This schematic is only for a 64 kibit RAM. It will not work with a 256 kibit RAM: pin 26 became an address line, no longer an enable.

For a 256 kibit RAM, you must use a schematic that gently pulls pin 20 high when power is removed.
I found my mistake !
I forgot to solder jumper pin 23 for 6264 RAM that make connection to A11.
So now its works, it keep save data !

It's work with LoROM game.
I tried with HiROM and its not working...why?

About 256 kibit RAM.
I use the same schematic for 16, 64, 256 RAM.
By selecting Jumpers I configure what exactly RAM size i'am using.
Image
lidnariq wrote: Wed Sep 02, 2020 6:38 pm For a 256 kibit RAM, you must use a schematic that gently pulls pin 20 high when power is removed.
Like that?
Image

Question.
If my game need 64kb SRAM, can I use 256?
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

Strange, strange...
I tried to make on same board some saves of games.
I take « Mario All stars » LoROM game (64kb RAM).
ROM files was also expanded to 27C322 EPROM.
When i take of and put it again, i see file name created. So its holds Data inside.
But when I load game with this file, Game starts from the beginning. :|
It's work with Zelda ROM but not working with Mario All stars (both files extended to 27C322)...
Why, why , why :?: :?: :?:
:roll:
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: Battery circuit : Save game are not holding on SRAM

Post by Kayumba »

I still confuse.
I found that I probably made some mistakes on my circuit for SRAM decoder 74HC139.
if I compare with poorstudenthobbyist
https://thepoorstudenthobbyist.com/2019 ... #memorymap
Image

Pin2 (1A) and pin3 (1B).

The mistake is that,
for HiROM pin2 should be connected to A13 (and not to A14 like on my circuit).
Image

For pin3 (1B),
if HiROM, its should be connected to A14 (and not to A13 like on my circuit).
Can you confirm me please.

Paradoxically,
Saves works with my old diagram (wrong one) for HiROM game.
But it doesn't keep save data for LoROM game.
Post Reply