how to put PC10 Punch Out on a NES cart

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

FrankWDoom
Posts: 243
Joined: Mon Jan 23, 2012 11:27 pm

how to put PC10 Punch Out on a NES cart

Post by FrankWDoom » Fri Oct 12, 2012 3:59 pm

The PC10 version of Mike Tyson's Punch-Out has a record keeping feature for fastest times. I would like to have that feature on a regular NES cart.

I have established that I can put pc10 prg and chr on a punch out test cart and the game will run. i skipped ahead to the tyson fight and won, and then the game froze. I assume it's due to there not being anything in the wram space to update for record keeping.

donor issues:
no battery
no wram

I think I can work out the battery so let's skip that part for now.

How would I go about wiring wram to a punch out donor board? the wiki entry for mmc2 does not mention wram support, but based on what photos of the pc10 board I could find, it uses some version of the chip labeled as mmc2.

tepples
Posts: 22077
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: how to put PC10 Punch Out on a NES cart

Post by tepples » Fri Oct 12, 2012 4:07 pm

You can add WRAM to any mapper that doesn't already put something in $6000-$7FFF with a 74HC20.

lidnariq
Posts: 9766
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: how to put PC10 Punch Out on a NES cart

Post by lidnariq » Fri Oct 12, 2012 5:56 pm

Apparently the PC10 Punchout module explicitly added battery-backed memory: webarchive of gamersgraveyard.

As far as I can tell by this picture, the skinny DIP on the top right (U2) is probably a RAM, either the shorter DIP in the middle (U7) or lower right (U8) is the RAM decoding IC (equivalent to a 74'20), and U6 is... um... that looks like it should be an 8-pin SPI or I2C EEPROM given its sticker, but that doesn't make sense. A battery controller would make more sense.

FrankWDoom
Posts: 243
Joined: Mon Jan 23, 2012 11:27 pm

Re: how to put PC10 Punch Out on a NES cart

Post by FrankWDoom » Thu Oct 18, 2012 8:06 am

so using a 74-20, the inputs all connect back to the cart edge like so?

A = Phi2 (M2) pin 38
B = /ROMSEL (PRG /CE) pin 50
C = A14 pin 41
D = A13 pin 40

A13 and A14 are PRG right?

and for the 8K RAM it looks like

pin 20 (/CE1) = 7420 Y
pin 22 (/OE) = any GND
pin 26 (CE2) = M2 again ? (see kevtris post)
pin 27 (R/W) = pin 14 (PRG R/W)

all the other A* and D* lines on the RAM can go to the respective pins on the PRG ROM?

lidnariq
Posts: 9766
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: how to put PC10 Punch Out on a NES cart

Post by lidnariq » Thu Oct 18, 2012 10:20 am

combining wiki: Cartridge connector, wiki:PRG RAM circuit, wiki:6264 static ram: everything you've said looks good.

User avatar
infiniteneslives
Posts: 2100
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: how to put PC10 Punch Out on a NES cart

Post by infiniteneslives » Thu Oct 18, 2012 11:19 am

FrankWDoom wrote: pin 26 (CE2) = M2 again ? (see kevtris post)


all the other A* and D* lines on the RAM can go to the respective pins on the PRG ROM?
You've already decoded all four signals so you may as well tie ce2 to Vcc. Kevtris was suggesting you would only have to decode PRG /CE, a14,13 if you connected m2 to ce2.


And yes, all address and data lines match up with PRG rom. Although if its easier for routing you REALLY only need to make sure an address line is connected to an a0-12 address line on the PRG rom, and similarly with data. You can mix any address pin with any address pin, and any data pin with any other data pin. And it'll all be the same.

Also one trick you can do is bend all the pins up and place the SRAM underneath the PRG rom on the BOTTOM of the pcb. Just make sure you keep the CE/we signals separate...
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers

FrankWDoom
Posts: 243
Joined: Mon Jan 23, 2012 11:27 pm

Re: how to put PC10 Punch Out on a NES cart

Post by FrankWDoom » Thu Oct 18, 2012 11:57 am

so if I run M2 for CE2, that would leave an input open on the 7420, which I wouldn't want to do, correct?. I would jump that pin over to the next input pin so it has proper hi/lo signals right?

Just so I'm sure I understand, we can mix up A lines (and D lines) and it's fine because as long as the signals are the same we always get the same byte back?

I think i'll try to mount the ram to the underside of the board first, since that saves a lot of effort cutting wires. It looks like it'll be tight in the cart but I'll give that a shot.

I guess now I wait for my 7420's to show up in the mail. Thanks for the help everyone.

lidnariq
Posts: 9766
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: how to put PC10 Punch Out on a NES cart

Post by lidnariq » Thu Oct 18, 2012 12:15 pm

FrankWDoom wrote:so if I run M2 for CE2, that would leave an input open on the 7420, which I wouldn't want to do, correct?
There is no harm (although no benefit either) to having M2 on both the 7420 and the 6264. If you hadn't already bought them, I might suggest you try buying a 7410 (3-input NAND) instead. But yes, avoid floating inputs.

And yes, for a RAM you can completely scramble the A lines with other A lines, and D lines with other D lines. But the order for A12..A0 and D0..D7 should be the same between a 6264 and the PRG ROM in your cartridge, so that should be unnecessary.

FrankWDoom
Posts: 243
Joined: Mon Jan 23, 2012 11:27 pm

Re: how to put PC10 Punch Out on a NES cart

Post by FrankWDoom » Fri Nov 02, 2012 3:15 pm

alrighty, I'm getting closer to assembly. Just want to make sure I have everything prepared.

I'm looking at the donor board for a place to connect the ram R/W pin, which is supposed to end up at connector pin 14. The trace runs under the MMC2 and I can't follow it. Does it go to MMC2 pin 15, labeled as CPU R/W?

http://wiki.nesdev.com/w/index.php/MMC2_pinout


also going back and reading the 7420 method, there is this statement:

...second gate could be used to invert r/w to prevent bus conflicts...

what would the output of that gate connect to? ram /OE ?

lidnariq
Posts: 9766
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: how to put PC10 Punch Out on a NES cart

Post by lidnariq » Fri Nov 02, 2012 7:26 pm

FrankWDoom wrote:[...] ram R/W pin [... goes] to MMC2 pin 15, labeled as CPU R/W?
Yes, the 6264 /WE should be connected to CPU R/W (http://wiki.nesdev.com/w/index.php/6264_static_ram)
FrankWDoom wrote:
http://wiki.nesdev.com/w/index.php/PRG_RAM_circuit wrote:...second gate could be used to invert r/w to prevent bus conflicts...
what would the output of that gate connect to? ram /OE ?
Yes, precisely. If you have an actual 6264, or the datasheet for your RAM explicitly mentions supporting it, then you should be able to also tie RAM /OE to ground. The datasheet I have for the HM6264A calls this latter mode "Write cycle 2 (/OE low fix)"

FrankWDoom
Posts: 243
Joined: Mon Jan 23, 2012 11:27 pm

Re: how to put PC10 Punch Out on a NES cart

Post by FrankWDoom » Sun Nov 04, 2012 12:07 pm

hooray it works! I put the pieces together minus the battery circuit and it works great.

the assembly is kind of messy. I used a skinny M8464 chip for ram as that gave me room to put the ram chip flat on the back of the board behind the PRG. I used with a 7420 and tied the 4 signal lines to it, and then tied the ram chip CE2 right to 5v. I think for the next build I would try to use M2 for CE2 as suggested above to save a wire. I also started with a (Mr. Dream) Punch Out for a donor. I'm pretty sure there is only 1 CHR file for all versions of MTPO, so if you started with a MTPO donor you wouldn't have to replace the CHR chip.

I took a pic of the record screen after beating Glass Joe. Without the ram chip, the game will freeze up when going from the ring scene to the record screen. This was actually the second fight where I got the 9th place score (FWD). The top score is from the 1st fight where I got a 1 punch knock out.

So far my only disappointment is that I don't know how to bring up the best times for Tyson. If you skip right to him, it asks for your initials (like it would starting a normal game), but the "win" sequence plays out the same. I'm pretty sure the time gets recorded, since the game without ram will freeze after beating Tyson. I tried leaving the game on the title screen to see if it shows up in attract mode anywhere, but it doesn't look like it.

So anyway I'm overall happy. Thanks for the help everyone!
Attachments
glass joe records
glass joe records
assembled pcb
assembled pcb

User avatar
infiniteneslives
Posts: 2100
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: how to put PC10 Punch Out on a NES cart

Post by infiniteneslives » Sun Nov 04, 2012 7:50 pm

One thing to keep in mind is those 0.3" DIP SRAMs are usually not low power while in stby. They typically draw drastically more than the 0.6" versions that draw less than a microamp usually. You can measure the current draw with 10K resistor in series to figure out how much current it's actually drawing while in stby. If you've got the part number you can also see what the datasheet says. My guess is your battery will only last a few months vice several years...
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers

FrankWDoom
Posts: 243
Joined: Mon Jan 23, 2012 11:27 pm

Re: how to put PC10 Punch Out on a NES cart

Post by FrankWDoom » Mon Nov 05, 2012 12:14 pm

yeah, I thought about that when planning this out. I went ahead with this build to verify I could make it work.

The chip I used was MB8464A-15L. There actually is an ultra-low power version of that chip found in NES carts, MB8464A-80LL. But from what I can tell it's only used as wram for Batman Return of the Joker. Batman doesn't have a battery so I could harvest that chip and replace it with one that you sometimes find as chr-ram (the one I used here). I just didn't want to pull one and then wreck it due to never having done this.
Attachments
MB8464A.pdf
datasheet
(532.11 KiB) Downloaded 485 times

FrankWDoom
Posts: 243
Joined: Mon Jan 23, 2012 11:27 pm

Re: how to put PC10 Punch Out on a NES cart

Post by FrankWDoom » Mon Jun 03, 2013 10:04 pm

[quote="FrankWDoom"][quote="http://wiki.nesdev.com/w/index.php/PRG_RAM_circuit"]...second gate could be used to invert r/w to prevent bus conflicts...[/quote]what would the output of that gate connect to? ram /OE ?[/quote]Yes, precisely. If you have an actual 6264, or the datasheet for your RAM explicitly mentions supporting it, then you should be able to also tie RAM /OE to ground. The datasheet I have for the HM6264A calls this latter mode "Write cycle 2 (/OE low fix)"[/quote]

alright I'm still new to the logic chips - how do I use the 7420 to invert the R/W signal for ram /OE? 7420 is an AND gate, so how do I get high output with a low input ( /W ) ?

I'm trying to build another one of these and I'm running into issues. The main difference is I'm using an early MTPO cart with a lower pcb revision, and what looks like an earlier version of the MMC2. With everything wired up in equal configuration to the first working cart, I get just a black screen. It appears the ram is interfering, as I can hard-disable the ram and the game runs fine up until it actually needs the ram (after you beat glass joe, for instance). Right now I have ram /OE right to GND, and looking back through this thread, the bit about inverting R/W for ram enable is something I wasn't doing. I figured I would give that a shot before I tear it down again and try on a newer PO cart.

User avatar
infiniteneslives
Posts: 2100
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: how to put PC10 Punch Out on a NES cart

Post by infiniteneslives » Mon Jun 03, 2013 10:17 pm

The different PCB version shouldn't matter, although I can't be certain.

You can tie the WRAM /OE pin to ground. I've never seen a SRAM that doesn't allow you to do that, although one could exist I suppose.

The wiki is talking about preventing bus conflicts on the PRG ROM /OE line. You don't have to worry about this though, the MMC2 will prevent bus conflicts for you.

So in short the whole bus conflict thing you're wondering about being the problem is probably not the actual issue...

Check, check, check your connections. That's about the only advise to give if you got the first cart working.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers

Post Reply