Mad-1 discrete logic replacement-new thread
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Mad-1 discrete logic replacement-new thread
So are you saying that the mad1 is nothing more than a 139 and SRAM back up .... That's it?
I thought there was more to it than that.....
Mark
I thought there was more to it than that.....
Mark
-
tepples
- Posts: 22993
- Joined: Sun Sep 19, 2004 11:12 pm
- Location: NE Indiana, USA (NTSC)
Re: Mad-1 discrete logic replacement-new thread
The first couple Sunsoft mappers were just a couple 7400 series parts in one package. Perhaps the secret sauce is in the SRAM protection circuit.Markfrizb wrote:So are you saying that the mad1 is nothing more than a 139 and SRAM back up .... That's it?
-
getafixx
- Posts: 373
- Joined: Tue Dec 04, 2012 3:28 pm
- Location: Canada
Re: Mad-1 discrete logic replacement-new thread
Honestly, it doesn't appear to be anything special, just look at its pinout. When you look at the early carts, with the LS139 and the D2145U chip (or other variant), they could technically handle most of the games out there that used standard boards. It just made sense for Nintendo to combine the 2 chips together into one, cutting down on costs and space required in the cart.Markfrizb wrote:So are you saying that the mad1 is nothing more than a 139 and SRAM back up .... That's it?
I thought there was more to it than that.....
So far all the HiROM games that I've tested have worked perfectly (up to 48Mbit), and I anticipate no problems when trying this with a LoROM cart, as it should be basically the same setup (aside from slight rewiring on the '139...yet to be tinkered with).
Now the only thing is to find a more feasible battery controller, as the BA6162 is another one of those obsolete parts. Mark had mentioned the MAX795T chip to me before, which would work perfectly, but it is a little expensive at almost $6 each (sometimes they can be found cheaper on eBay). If I find anything super cheap, and easy to come by, I will necro this post to share it.
-
infiniteneslives
- Posts: 2105
- Joined: Mon Apr 04, 2011 11:49 am
- Location: WhereverIparkIt, USA
Re: Mad-1 discrete logic replacement-new thread
They aren't obsolete, but do apparently have large minimum qty. Digikey PN BA6162-ND (use the PN if the link doesn't work...) There are quite a few other battery backup chips available though if one knew exactly how to deem a chip worthy. Those MAX795T are pretty spendy given the simple function...getafixx wrote:Now the only thing is to find a more feasible battery controller, as the BA6162 is another one of those obsolete parts.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
-
getafixx
- Posts: 373
- Joined: Tue Dec 04, 2012 3:28 pm
- Location: Canada
Re: Mad-1 discrete logic replacement-new thread
Well thats kind of it. How many people would be willing to buy 2000 of those chips at once? I know I wouldn'tThey aren't obsolete, but do apparently have large minimum qty
I will try and experiment with a few different kinds, and see what i find. Now that I know the proof-of-concept works, its just a matter of finding something compatible.
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Mad-1 discrete logic replacement-new thread
The STM795 (equiv of max 795) is a lot cheaper. I think mouser sells them for $2.38 or close to it...
My question about the mad1's is: all the older carts that are 16m (2x8mbit roms) or smaller, they used the 139.
Anything bigger than 16mbit, the mad1 is used. Mario all stars is a good example. While I question if a 139 + max795 = a mad1, I hope this is true.
My question about the mad1's is: all the older carts that are 16m (2x8mbit roms) or smaller, they used the 139.
Anything bigger than 16mbit, the mad1 is used. Mario all stars is a good example. While I question if a 139 + max795 = a mad1, I hope this is true.
-
getafixx
- Posts: 373
- Joined: Tue Dec 04, 2012 3:28 pm
- Location: Canada
Re: Mad-1 discrete logic replacement-new thread
Au contraire. I have a copy of Mario Allstars here, board SHVC-2A3B-01, which uses 2 rom chips, an LS139 chip.Markfrizb wrote:Anything bigger than 16mbit, the mad1 is used. Mario all stars is a good example.
Pic of board here, using no MAD-1 chip:
http://www.snescentral.com/0/8/8/0881/SHVC-H5-0.jpg
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Mad-1 discrete logic replacement-new thread
getafixx wrote:Au contraire. I have a copy of Mario Allstars here, board SHVC-2A3B-01, which uses 2 rom chips, an LS139 chip.Markfrizb wrote:Anything bigger than 16mbit, the mad1 is used. Mario all stars is a good example.
Pic of board here, using no MAD-1 chip:
http://www.snescentral.com/0/8/8/0881/SHVC-H5-0.jpg
That is my point.... All stars is 16m (2x8) and is not using mad1.
Show me a board that is bigger than 16m using a 139 with SRAM......
-
lidnariq
- Site Admin
- Posts: 11803
- Joined: Sun Apr 13, 2008 11:12 am
Re: Mad-1 discrete logic replacement-new thread
Depending on relative costs, something like this simple PNP BJT circuit:might well be cheaper than a "real" battery detection circuit. It could be directly connected to a 6264's +CE input, or an extra 74HC138/9 could be used to convert it for a RAM with only one select.
Power switchover is something I'd need to think about more, but the ba6162 appears fairly simple.
The big difference in behaviors seems to be that the ba6162 provides hysteresis.
Power switchover is something I'd need to think about more, but the ba6162 appears fairly simple.
The big difference in behaviors seems to be that the ba6162 provides hysteresis.
You do not have the required permissions to view the files attached to this post.
-
getafixx
- Posts: 373
- Joined: Tue Dec 04, 2012 3:28 pm
- Location: Canada
Re: Mad-1 discrete logic replacement-new thread
Oh I see, I figured you were saying it uses the MAD-1. Later revisions of that board did use it, once Nintendo started using that decoder in all their boards. Also, in all fairness, the SNES didn't really start releasing games larger than 16M until 93-94 (AFAIK), and by then had already come out with the MAD-1.Markfrizb wrote:That is my point.... All stars is 16m (2x8) and is not using mad1.
Show me a board that is bigger than 16m using a 139 with SRAM......
The functions of the MAD-1, as it looks, is an Address Decoder, SRAM controller, and a (2x) ROM Decoder all built into one. So, if you split the functions between 1 or 2 LS139 decoders and an SRAM controller, all you're doing is using 2-3 chips instead of one...still looks like it was just a space and cost saving measure to me.
Mark, what other functions do you figure the MAD-1 had? Do you see a reason why this setup with the '139 couldn't work?
-
tepples
- Posts: 22993
- Joined: Sun Sep 19, 2004 11:12 pm
- Location: NE Indiana, USA (NTSC)
Re: Mad-1 discrete logic replacement-new thread
Perhaps if people would develop high-quality NES games that are long enough to need battery save, bunnyboy might be willing to keep them in stock on retrousb.com.getafixx wrote:How many people would be willing to buy 2000 of those chips at once? I know I wouldn't
Perhaps the bigger (over 16 Mbit) games were also later games, manufactured after the MAD-1 was designed. And perhaps it had to do with the fact that PRG RAM had to be decoded specially so as not to overlap PRG ROM.
-
infiniteneslives
- Posts: 2105
- Joined: Mon Apr 04, 2011 11:49 am
- Location: WhereverIparkIt, USA
Re: Mad-1 discrete logic replacement-new thread
I know the ba6162 gets more fancy, but shouldn't a pair of Schottky diode should be sufficient?lidnariq wrote: Power switchover is something I'd need to think about more, but the ba6162 appears fairly simple.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
-
whicker
- Posts: 228
- Joined: Sun Dec 13, 2009 11:37 am
- Location: Wisconsin
Re: Mad-1 discrete logic replacement-new thread
No, because of the chip select blocking to avoid data corruption. You want to avoid writes during Reset/powerup and powerdown.infiniteneslives wrote:I know the ba6162 gets more fancy, but shouldn't a pair of Schottky diode should be sufficient?lidnariq wrote: Power switchover is something I'd need to think about more, but the ba6162 appears fairly simple.
Yes anybody can come up with a pullup and pulldown resistor and diode solution, but it would drain the battery much, much faster.
Nintendo learned first-hand of save data corruption on the NES, and I'm sure their management wanted to progress from some boilderplate statement of "hold reset while powering off the unit" to avoid save data corruption. I wonder how many children got into slapping fights because their friend "stupidly" didn't hold reset while powering off
-
Markfrizb
- Posts: 631
- Joined: Sun Dec 02, 2012 8:17 am
- Location: East Texas
Re: Mad-1 discrete logic replacement-new thread
getafixx wrote:Oh I see, I figured you were saying it uses the MAD-1. Later revisions of that board did use it, once Nintendo started using that decoder in all their boards. Also, in all fairness, the SNES didn't really start releasing games larger than 16M until 93-94 (AFAIK), and by then had already come out with the MAD-1.Markfrizb wrote:That is my point.... All stars is 16m (2x8) and is not using mad1.
Show me a board that is bigger than 16m using a 139 with SRAM......
The functions of the MAD-1, as it looks, is an Address Decoder, SRAM controller, and a (2x) ROM Decoder all built into one. So, if you split the functions between 1 or 2 LS139 decoders and an SRAM controller, all you're doing is using 2-3 chips instead of one...still looks like it was just a space and cost saving measure to me.
Mark, what other functions do you figure the MAD-1 had? Do you see a reason why this setup with the '139 couldn't work?
I honestly don't know but I did look at the MAD1 Truth table from NOCASH's site and it didn't look like the 139's truth table.....
-
tepples
- Posts: 22993
- Joined: Sun Sep 19, 2004 11:12 pm
- Location: NE Indiana, USA (NTSC)
Re: Mad-1 discrete logic replacement-new thread
Then perhaps the permanent solution is to find some unused area of flash twice as big as the SRAM, copy that area to SRAM on power-on, and copy SRAM to flash whenever the game saves. I say "twice as big" to work around the possibility of power loss while copying.whicker wrote:Nintendo learned first-hand of save data corruption on the NES, and I'm sure their management wanted to progress from some boilderplate statement of "hold reset while powering off the unit" to avoid save data corruption.