nesdev.com
http://forums.nesdev.com/

MAD-1 Replacement SRAM Battery Backup?
http://forums.nesdev.com/viewtopic.php?f=28&t=15636
Page 2 of 2

Author:  Markfrizb [ Tue Mar 14, 2017 12:38 pm ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Your problem lies with your decoder, not your save circuit.
You can't just copy what Nintendo did and expect it to work. A 1a3b cart is limited to 1mb rom size and yet, you're trying to run a 3mbit game. Your data busses are like boxers - fighting with themselves. A decoder is the traffic-cop of databusses allowing only 1 databuss to talk at a time. You have a rom and a ram - hence two databusses both trying to talk at the same time.... which = crash and black screen.

That's why the game boots and then crashes as soon as it looks to the sram for information.

Well..... the above is my supposition as I don't have a full picture of how you have things connected. So it's my best guess.
Most on this forum are glad to help, but help point you in the right direction so you can find the answers on your own. The joy of learning :)

Author:  Ice Man [ Tue Mar 14, 2017 2:06 pm ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

I'm glad for any help and always love to learn something new. :)

Also, I'm using my own decoder's pinout which has been proven to work for up to 32MBit ROMs. :P

Pinout as follows:

Code:
                  __  __
        SNES #49 |01\/16| +5V
        SNES #40 |02  15| Pin 04
        SNES #40 |03  14| A20
          Pin 15 |04  13| A21
              NC |05  12| NC
              NC |06  11| NC
         ROM /OE |07  10| NC
             GND |08  09| RAM /CE
                  ------


EPROM /OE is connected to Address Decoder
EPROM /CE is connected to GND

Even tried connecting EPROM /CE to RAM /OE and SNES/CE. No difference. Game freezes after Nintendo Logo.

Author:  Markfrizb [ Tue Mar 14, 2017 2:29 pm ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Ice Man wrote:
I'm glad for any help and always love to learn something new. :)

Also, I'm using my own decoder's pinout which has been proven to work for up to 32MBit ROMs. :P

Pinout as follows:

Code:
                  __  __
        SNES #49 |01\/16| +5V
        SNES #40 |02  15| Pin 04
        SNES #40 |03  14| A20
          Pin 15 |04  13| A21
              NC |05  12| NC
              NC |06  11| NC
         ROM /OE |07  10| NC
             GND |08  09| RAM /CE
                  ------


EPROM /OE is connected to Address Decoder
EPROM /CE is connected to GND

Even tried connecting EPROM /CE to RAM /OE and SNES/CE. No difference. Game freezes after Nintendo Logo.


I'm not at my desk so I say this from memory... I don't think pins 2/3 is right. And the /CE should be connected.

When you say A21, A20, are you accounting for skipping A15?

Author:  lidnariq [ Tue Mar 14, 2017 2:41 pm ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Relabeling things a little:
Code:
                 .--\/--.
         /ROMSEL |01  16| +5V
        SNES A15 |02  15| Pin 04
        SNES A15 |03  14| SNES A20
          Pin 15 |04  13| SNES A21
              NC |05  12| NC
              NC |06  11| NC
         ROM /CE |07  10| NC
             GND |08  09| RAM /CE
                 '------'
This is consistent with nocash's description of the MAD-1-

(namely, when jumpered for LoROM, /ROMCE is low when /ROMSEL is low and SNES A15 is high, and /RAMCE is low when /ROMSEL and SNES A15 are low AND SNES A20, A21, and A22 are high)

SNES A22 doesn't explicitly need to be decoded because A22 is necessarily high if /ROMSEL and SNES A15 are low.

Author:  Ice Man [ Wed Mar 15, 2017 3:38 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

@Markfrizb: Since I used that pinout on a modified 1A3B board with a 32 pin MaskROM and tested it successfully on many 2-4MB LoROM games (LoT:ALttP, Super Metroid Hacks, Super Mario World Hacks, etc.) and they all saved and worked fine that way.
But if you happen to have another pinout once you're able to check, I wouldn't mind to try that one either.

I just can't imagine it is the decoder's problem.

Author:  Markfrizb [ Wed Mar 15, 2017 10:19 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Ice Man wrote:
@Markfrizb: Since I used that pinout on a modified 1A3B board with a 32 pin MaskROM and tested it successfully on many 2-4MB LoROM games (LoT:ALttP, Super Metroid Hacks, Super Mario World Hacks, etc.) and they all saved and worked fine that way.
But if you happen to have another pinout once you're able to check, I wouldn't mind to try that one either.

I just can't imagine it is the decoder's problem.


I'm out of town on business so I won't be able to check til later on, but if this decoder on previous 3-4mB builds have worked before, then maybe your save circuit isn't enabling the sram? Maybe It's keeping it disabled all the time....

Author:  Ice Man [ Wed Mar 15, 2017 10:57 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Funny thing is, I changed the capacitor from 100nF to 10nF on my SuperCIC PIC and the game didn't freeze but I got the anti piracy screen. I'm sure I'm using the wrong components or doing something wrong. Even removed the 100nF cap for the EPROM completely, but no difference.

The parts I'm using are:
CR2032
2x 1N4148
1x 1k Ohm
1x 100k Ohm
2x 100nF Ceramic Cap (for EPROM and SuperCIC)


Even while trying to copy the 1A3B logic completely (with original parts found on a 1A3B board), it does not work, while in theory, it should. o_O
Even tried to connect VCC and GND directly to the cart edges with wires instead but it didn't change anything.

I'm kind of lost here. It's the only puzzle left to finish the cart. :'(

Author:  lidnariq [ Wed Mar 15, 2017 11:08 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Could make a trivial batch that bypasses the antipiracy check, I suppose... But I don't think it'll help, I think you'll just get new different exciting bugs.

Author:  Ice Man [ Wed Mar 15, 2017 11:33 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

With the anti piracy screen on I can check if the SRAM is working or not. Quite handy in this case, heh. But sadly it does not work yet. I will check it again tomorrow and check everything there is...hoping to find the mistake.

Author:  Ice Man [ Fri Mar 17, 2017 5:31 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Yeah, so I connected VCC and GND directly to the cart connectors as well as the GND net. Used all parts found in an 1A3B board and connected them the same way. It does not work. I give up for now. I have no idea what's wrong..

Author:  Ice Man [ Thu Mar 23, 2017 12:41 pm ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

After some more testing and finding a mistake in address decoding, still no success.
I accidentally decoded A19/A20 instead of A20/A21 but even with the fix, no SRAM detection.

If I use a MAD-1 on my board the SRAM works like a charm.

Now another question. Did someone actually try to get an identical IC like the MAD-1 or knows where to get any without using any donors?

And how possible is it to actually use a PIC as decoder instead?

Author:  lidnariq [ Thu Mar 23, 2017 2:07 pm ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Ice Man wrote:
After some more testing and finding a mistake in address decoding, still no success.
I accidentally decoded A19/A20 instead of A20/A21 but even with the fix, no SRAM detection.
Have you been using my simple test program?

Quote:
Now another question. Did someone actually try to get an identical IC like the MAD-1 or knows where to get any without using any donors?
I know certain people are making repros using 74'139s, as you were trying to...

Quote:
And how possible is it to actually use a PIC as decoder instead?
One of the modern ones with CLCs could do it; that's basically just a tiny bit of programmable logic glued onto a microcontroller.

Could even stuff it into the same physical IC as has the SuperCIC...

Author:  Ice Man [ Fri Mar 24, 2017 1:21 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Crap, I honestly forgot about that. I will try it later today.
Though, what am I looking for exactly with the memory viewer?
The SRAM will most likely be empty.

Author:  lidnariq [ Fri Mar 24, 2017 11:03 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Open bus looks like a solid region of memory filled with the bank byte (in this program).

(i.e. reading from $6F0000 on your 1A3B-equivalent should show 512 bytes of $6F, and if the RAM works, you should see something other than 512 bytes of $70 at $700000)

Author:  Ice Man [ Tue Mar 28, 2017 3:26 am ]
Post subject:  Re: MAD-1 Replacement SRAM Battery Backup?

Game is saving now!

I connected a 100k resistor between SRAM VCC and CE line as well as connecting 100k + 1N4148 between Batttery+ and SRAM VCC and an additional 1N4148 from VCC to SRAM VCC.
SRAM +CE is connected to VCC
SRAM /OE is connected to Cart #23

All ICs got a 100nF capacitor as well.

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/