MAD-1, MAD-2, MAD-R differences?

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

MAD-1, MAD-2, MAD-R differences?

Post by Near »

So while dumping memory maps, I've found a difference between two carts with the same PCB ID of SHVC-2A3M-01:

Paladin's Quest
Board: http://i.imgur.com/Oafmh.jpg

Code: Select all

00-7f:8000-ffff = ROM
70-7f:0000-7fff = RAM
80-ff:8000-ffff = ROM
f0-ff:0000-7fff = RAM
(A23 is ignored, but the ROM data is mapped when A23=1)

EVO: Search for Eden
Board: http://i.imgur.com/dD1Gs.jpg

Code: Select all

00-3f:8000-ffff = ROM
70-7f:0000-7fff = RAM
80-bf:8000-ffff = ROM
f0-ff:0000-7fff = RAM
(the ROM is not mapped in when A23=1)

The only differences I can see are the MAD chip, and a small number of variations in which holes have solder filled in. I don't really know what that does.

For Paladin's Quest, it's the MAD-1. For EVO, it's the MAD-R. I can't find any info on the MAD-R, though.

So ... basically just storing PCB IDs is not enough to properly describe maps anymore.
I want to know, for certain, whether also storing the MAD-type (1, 2, R) is enough; or if the chips are otherwise identical, in which case I'll just have to make sub-revision codes for these ...
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: MAD-1, MAD-2, MAD-R differences?

Post by qwertymodo »

No idea about the MAD revisions, but the solder-filled vs un-filled vias shouldn't make any difference whatsoever. The un-filled holes should still be plated through-holes, but you can always check for continuity if you're not sure.
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: MAD-1, MAD-2, MAD-R differences?

Post by Near »

They do appear to be. May I ask what the purpose of the holes are, then?

Why fill most with solder, and leave some empty? And more importantly, fill different holes on different boards? :/

I have a multimeter, but I don't have probes to try and power the MAD-n chips to build a logic table.

This is the best I can do:

Code: Select all

01 = OUT (ROM P1 /CS)
02 = OUT (RAM /CS)
03 = OUT
04 = OUT
05 = OUT (?)
06 = Vcc
07 = Resistor (battery)
08 = GND
09 = /RESET
10 = IN (A15 mode)
11 = IN (/CART)
12 = IN (A22)
13 = IN (A21)
14 = IN (A20)
15 = IN (A15)
16 = OUT (ROM P0 /CS)
Based off neviksti's notes, but only added in verified connections to my boards. 05 is weird.
Not sure why the MAD-1 is handling the battery power.

Seems like the only way to get a guaranteed truth table is going to be to desolder one of each chip type, then wire it up to a breadboard, then test every input and see what each output gives.

Seems there's 64 input configurations. Fun.
magno
Posts: 193
Joined: Tue Aug 15, 2006 5:23 am
Location: Spain
Contact:

Re: MAD-1, MAD-2, MAD-R differences?

Post by magno »

As far as I know, MAD-2 is found in DSP-x boards such as Mario Kart.
I guess that there should be some difference with previous MAD-1 regarding lower part of memory map where DSP is accessed.
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: MAD-1, MAD-2, MAD-R differences?

Post by Near »

Image

Image

And now the down side ...

I have no MAD-2 carts at all in my entire US set (all my DSP1 carts use MAD1, lucky me!), and the only MAD-R I am aware of at the moment is EVO. That's a $100 game, so ... yeah.

Anyone want to donate a MAD-2 or MAD-R to me? :D
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: MAD-1, MAD-2, MAD-R differences?

Post by Near »

Well I'm having no luck here ... I am trying to extract a truth table of my own, so that I can then do the same with the MAD-R and MAD-2.

Image

So this board is powered by a +9V battery, and it runs through a +5V regulator on the left-hand side.

I have six red LEDs (used 220ohm resistors, all I could find), wired up to output pins 1,2,3,4,5,16.
I have +5V on pin 6.
I have GND on pin 8.
I have six spare logic hi (+5V) + logic lo (GND) pins up at the top meant for feeding the MAD-1 specific states. In the picture, 10-15 are connected to lo. And pin 9, /RESET, is set to logic hi.
I've tried /RESET with open, hi and lo, FWIW.

The result is that all six LEDs light up. Nothing I do changes that. Tried all logic lo on inputs, all logic hi, and all open circuit. Same deal.

If I plug a LED into pins 7-15, the LED does not light up, of course.

If the chip is fried (I did have to use a 40w desoldering gun ...), then I'm screwed, because I have no other way to remove the chips from the boards :(
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: MAD-1, MAD-2, MAD-R differences?

Post by blargg »

I suggest that you use 1K resistors instead of direct wires, so that if you mistake an output for an input, you won't short it out and cause excessive current draw/heating/damage.
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: MAD-1, MAD-2, MAD-R differences?

Post by Near »

I put on a DIP-8 to prevent accidentally mixing up wires, and to make building the table less error-prone.
Also dropped the socket IC, piece of shit Radio Shack garbage doesn't stay seated. Pops out every ten seconds. You'd think they would test to make sure their legs were long enough, but you'd have thought wrong.

Image

DIP 8 toggles the logic to /RESET.

I'll add 10Kohm pulldown resistors to ensure off = logic lo instead of open only if I can get things working with logic hi first. There should never be a time when pins 1+16 are high at the same time (that would select both ROMs on a board.)

But I'll keep in mind to use 1Kohm resistors instead of wires in the future. I'd be a bit concerned about the wires touching each other, since there is no insulation around resistor wire.
User avatar
whicker
Posts: 228
Joined: Sun Dec 13, 2009 11:37 am
Location: Wisconsin

Re: MAD-1, MAD-2, MAD-R differences?

Post by whicker »

Byuu,

What's going on with PIN 7?

In your photos it is not shown as connected.
Have you tried duplicating the circuit on the circuit board? (1K resistor into this pin from what ordinarily should be the + of the battery, but +5V should be okay).


Any number of reasons as to why I think this would also be an enable pin... so it would fail the test at the factory if the battery was bad, to just the design engineer taking everything so literally. Well, that's not so true either, because a lot of these kind of circuits fail when the battery dies. I think it has something to do with the early backup battery circuits being unable to switch from one power source (the battery) to the other (the system +5V) if {EDIT FOR CLARITY} if the battery voltage is not present.

Also, yes. the socket is unnecessary on a breadboard. Especially if it is a "low profile solder tail" socket. Yeah it won't stay in as it's meant to be soldered.
Last edited by whicker on Sun Nov 11, 2012 3:45 pm, edited 1 time in total.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: MAD-1, MAD-2, MAD-R differences?

Post by qwertymodo »

You might take a look here: viewtopic.php?p=96360#p96360

Should give you a good place to start.
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: MAD-1, MAD-2, MAD-R differences?

Post by nocash »

Didn't knew that there is a MAD-R chip. I wonder what it's intended for.
Maybe it is intentionally changing the memory mapping; does the game require special mapping?
Or maybe it's related to the Mosel SRAM, though I couldn't imagine why it'd require a different battery controller.

Just noticed that (aside from your SHVC-2A3M-01 boards), the SHVC-2A3M-10 is also marked to accept MAD-1 and MAD-R chips. The later SHVC-2A3M-11 version is marked MAD-1 only. Looks as if nintendo has discontinued the MAD-R after soon.

MAD-1 logic table is here:
http://nocash.emubase.de/fullsnes.htm#s ... tsmadchips
it's dumped from a desoldered mad-1 chip, wired to pc parallel port, the adaptor looks like this:
mad1.jpg
mad1.jpg (3.83 KiB) Viewed 7721 times
that way I could output data to the mad-1 inputs, and read-back the outputs, log them to a file, the software (and schematic) is here:
Mad1.zip
(3.76 KiB) Downloaded 244 times
aside from just logging, it's also calculating and verifying the expected results (done to confirm that my logic table conclusions were correct).

If I get a cartridge with MAD-2 or MAD-R I could test it the same way. MAD-2 is probably inverting reset for the DSP chip, or maybe amplifying the clock input.

Desoldering chips works fine with one of those "vacuum pumps" (or how they are called), they are cheap ($2 maybe).
The holes (vias) are important for passing wires from one side of PCB to another. When installing the chips (in a soldering bath) some of the vias are naturally getting soaked with solder too, that's just a don't care dirt effect.
Last edited by nocash on Sun Nov 11, 2012 4:04 pm, edited 1 time in total.
qwertymodo
Posts: 775
Joined: Mon Jul 02, 2012 7:46 am

Re: MAD-1, MAD-2, MAD-R differences?

Post by qwertymodo »

The answer to your question on the solder-filled vias, I'm not sure why they fill them. The holes are already plated. A via is a plated hole which carries a trace between layers on the board. Filling the holes with solder may be done to protect against corrosion, I suppose, but it is not necessary for fulfilling the purpose of creating continuity between board layers. In fact, if the holes were not metal-plated, the solder would not flow into the holes at all. The solder has absolutely zero effect on functionality, so don't try to understand why some are filled and some are not. There is no meaning to this whatsoever, if there are some unfilled it was likely a manufacturing oversight. Also, the reason the MAD-1 is handling the battery power is so that they could simplify the design. Look at the difference between these two boards:

http://www.snescentral.com/pcbboards.ph ... VC-1A3B-20
http://www.snescentral.com/pcbboards.ph ... VC-1A3M-20

All of the additional resistors, capacitors, and diodes found on the 1A3B board make up the power management circuit used to handle proper power handoff to the battery at shutdown, as well as driving the RAM /CS line high during power on/off to avoid writing garbage to SRAM during those undefined and unstable periods. This is true of all non-MAD boards vs their MAD counterparts (SHVC-XXXB vs SHVC-XXXM) Once Nintendo decided to manufacture an ASIC for the memory mapping, it just became more reasonable to add power management transistor logic into that same chip and handle it all in one simple package, rather than using several passive components.
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: MAD-1, MAD-2, MAD-R differences?

Post by nocash »

10 = IN (A15 mode)
11 = IN (/CART)
12 = IN (A22)
13 = IN (A21)
14 = IN (A20)
15 = IN (A15)
Are you sure there? Or did you just copy-paste that part from specs for other PCBs?
If your MAD chips aren't connected to A23, then they could hardly change the mapping in relation to A23.

Would be possible that it's actually like so (maybe the ROMs on the "MAD-R" board are having an extra chip-select pin, wired to A23; in that case the mapping differences would be related to the ROM chips, nothing to do with the MAD chips).
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: MAD-1, MAD-2, MAD-R differences?

Post by Near »

> Have you tried duplicating the circuit on the circuit board? (1K resistor into this pin from what ordinarily should be the + of the battery, but +5V should be okay).

I just tried it now, no luck, nothing has changed :(

One thing is that if I only power pin 7 and leave pin 6 open, then when pins 9-16 are grounded, I get only LEDs 2&5 lit up. If I turn any pin from 9-16 on, then all six LEDs light up again. The LEDs go to full brightness with pin 10 (well, of course it's a bit dimmer than with pin 6 power due to the extra 1K resistor.)

To be more specific: with pin 6 wired to +5V bat, the LEDs are getting +3.5V input. With only pin 7 wired to +5V bat, the LEDs are getting +2V. That's before the resistors further reduce their power. With only pin 7 wired, and all inputs grounded, only LEDs 2&5 are getting only +1.9V

Any others ideas? ;_;

> Should give you a good place to start.

Well, the MAD-1 schematic doesn't really help me. I'm wanting to make my own MAD-1 schematic, so that I can then be sure I can make a MAD-R schematic before I destroy a more valuable cart (the MAD-1 came off a dead board with line corrosion, worth $2 so not worth fixing.)

I need to know if MAD-1 and MAD-R have different logic tables before I can proceed with cart dumping.

> If I get a cartridge with MAD-2 or MAD-R I could test it the same way.

Right now I only know of the really expensive EVO cart that has MAD-R, and I've heard Seiken Densetsu 2 has one as well.

> Desoldering chips works fine with one of those "vacuum pumps" (or how they are called), they are cheap ($2 maybe).

I tried that, it doesn't work. It gets the solder out of the holes, but the chip still won't budge off the board without crazy force. Which is basically how I got my MAD-1 off at all.

> If your MAD chips aren't connected to A23, then they could hardly change the mapping in relation to A23.

The difference in mapping is

$00-3f,80-bf:8000-ffff MAD-R
$00-7f,80-ff:8000-ffff MAD-1

So A22 is what is behaving differently here. I tested, and A22 on the cartridge bus goes to pin 12 on the MAD-1 and pin 12 on the MAD-R, no difference.
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: MAD-1, MAD-2, MAD-R differences?

Post by nocash »

> I tried that, it doesn't work. It gets the solder out of the holes, but the chip still won't budge off
If the solder is already out: Try using pincers to center the pin in the middle of the hole (so it won't be held fixed by last remains of solder), sometimes you can get it loosened that way even without needing to heat up the solder point again.
The other trick (if the solder doesn't come out) is to put some fresh solder on each soldering point before trying to remove the old/sticky solder. And finally it depends on patience, and on the tools - I have two such vacuum pumps, one cheap lightweight plastic/aluminium one that works perfectly - and a more robust full-metal one that looks like heavy good old workmanship, but works like crap.

> $00-3f,80-bf:8000-ffff MAD-R
> $00-7f,80-ff:8000-ffff MAD-1
> So A22 is what is behaving differently here.
Oops, yes. Now I feeling stupid :-/
Your comment saying "(the ROM is not mapped in when A23=1)" got me there :-)
Post Reply