Punch Out Mapper

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

User avatar
SaucJedi
Posts: 46
Joined: Wed Jul 27, 2005 9:46 am
Location: Spain

Punch Out Mapper

Post by SaucJedi »

Hi everybody. This may be a noob question but I would like to know why the mapper which we can find in Punc Out was only used for that game and why. It seems to be because of the bif size of the characters in game (I don't thing there are many games with characters that take so many sprites) but don't really grasp the reason.
User avatar
Memblers
Site Admin
Posts: 3901
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers »

That's a good question really, but we can only speculate. I would guess it's for cost reasons. Nintendo really produced a lot of Punch Out carts, so they used it pretty well. MMC1 and MMC3 were probably cheaper to make (for pin count and packaging, respectively). It's also harder to make a small PCB when you have a huge 40-pin through-hole part on it.

However, there's also the MMC4 which uses the same CHR technology. But I think only 3 games used that, none of which were released outside of Japan. So I guess another speculative reason, is that not many games needed the extra graphics capability.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

I think it's because the MMC3 did not yet exist, and the MMC1 wasn't good enough for Punch Out.

The MMC2's main feature is that it can automatically bankswitch whenever it encounters a particular tile (tile FD to switch, then tile FE to switch back).
The game often surrounds text with FD tiles, then uses FE tiles after the text.
The MMC2 has a CHR bank size of 4K. So in order to use both the CHR bank which holds the font, and another CHR bank which holds portrait graphics, it uses this method of automatically switching CHR ROM.

In this game, FD and FE tiles are all blank, they look like a space, but cause the MMC2 to trigger CHR bankswitches.

Examples:
Image
The title screen surrounds the text with FD tiles, and follows the text with FE tiles so it switches back.

Image
The pre-fight screen surrounds the opponent's portrait with FE tiles, then uses FD tiles to return to the graphics for the font and Little Mac portrait graphics.

Image
The fight screen uses FD tiles to select one set of graphics for the top of the screen. Then it switches to another bank of graphics for the bottom half. Every single empty tile below the top part is actually an FE tile, I didn't want to bother annotating them all.
The FD tiles for the top half are actually off the screen, but due to how the NES works, it fetches some extra graphics when drawing its picture, so those trigger a CHR bankswitch anyway.


The auto-bankswitching feature can also be used for sprites. The top half of the boxer could be on one CHR bank, and the bottom half could be on another CHR bank. If there's a FD or FE sprite, it will trigger a CHR bankswitch. I don't know offhand of any animation frames that use two different CHR pages, so I can't think of any illustrations.

Now for the question of why they had to use such an odd way to do graphics switching... They were using 4K CHR bank sizes. If they had used smaller bank sizes, they could have switched graphics in smaller size chunks, and not needed all that circuitry where it watches which tiles get drawn. I suspect that Punch Out could have worked just fine if it was designed for an MMC3.

There are a couple other games that also use a mapper similar to Punch Out: Famicom Wars and Fire Emblem. Except they switch PRG differently, but are otherwise the same thing as the Punch Out mapper.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

In fact all this would have been possible using a normal mapper (such as the MMC1), but they'd have to use very carefully timed code and do multiple CHR bankswitching each scanline.
I think Marble Madness does this by the way, exept it switches pattern tables via $2000 instead of using banskswitching but it's basically exactly the same.

I did a demo some years ago which shows this with a Fire Emblem screenshot. I don't know if it's still arround the net but I can re-upload it if anyone is interested.

Smaller page banskwitching would allow maybe some of the effects in Punch Out but probably not all - it doesn't rid you of the 256 tiles limitation.

Now I don't know why only Punch Out used this mapper. It's a possibility that Nintendo just didn't bother to "sell" it to 3rd party developers. Or maybe Nintendo proposed the MMC2/4 but that nobody ever got interested in it, who knowns.

However, both the firsts MMC1 and MMC3 games ever were not made by Nintendo but by Seta... so yeah it's quite mysterious.
Useless, lumbering half-wits don't scare us.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

And as I recall, MMC3 was originally a Namco design, which Namco's U.S. publisher Tengen used under the name MIMIC-1.

But just about every effect I see here could have been done with a sprite 0-triggered bankswitch.
User avatar
SaucJedi
Posts: 46
Joined: Wed Jul 27, 2005 9:46 am
Location: Spain

Post by SaucJedi »

I'm no expert, but it looks like a pretty complex scheme that could have been solved more elegantly. That may be the reason of not using MMC2 in the future.
User avatar
SaucJedi
Posts: 46
Joined: Wed Jul 27, 2005 9:46 am
Location: Spain

Post by SaucJedi »

Dwedit, thanks for your detailed explanation. I fail to get why this could not be done with a MMC1, besides ease of programming (since it's the MMC2 the one swithching banks as it fetches the 'switch' tiles). Is there any reason besides this?
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

The pre-fight screen may have been difficult to switch chr banks fast enough and get that synced up without using MMC2. During the fight, I'm not really sure what good reason there was if any to not just use a sprite hit zero. I'm sure the game could have been made without it. But they had it and designed it to use it. Really I think Nintendo was just experimenting. I don't think they really thought out how useful or not the MMC2 CHR switching would be.
djcouchycouch
Posts: 97
Joined: Sat May 28, 2011 10:30 am

Post by djcouchycouch »

Just wanted to pop in and say that this thread is real great. I've always wondered this about Punch Out. And now I know!
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

I don't know, design a CMOS chip and getting it producted is definitely very expensive for "just experimented".

Although since PunchOut sold well this probably in the end turned out no problem, but it's weird they made an ASIC for a single game (even if the concept was reused later in the MMC4).

The other one who came to mind is the MMC6, it was basically made for only two games, both using the same game engine and developed in-house at Nintendo.
Even if it's design is a variant of a common mapper it's still weird they designed a chip just for this.
Useless, lumbering half-wits don't scare us.
User avatar
Hamtaro126
Posts: 783
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

The real difference in MMC6 from MMC3 is a waste, as the only difference is WRAM protection.

And the two games, Startropics 1 and 2, are still great games.

but MMC2 and MMC4 still has it's usage as well, and can be cloned (Partial even), although MMC4 is a likely canadate.
AKA SmilyMZX/AtariHacker.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

MMC6 had RAM inside the mapper. Cost cutting measure?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
SaucJedi
Posts: 46
Joined: Wed Jul 27, 2005 9:46 am
Location: Spain

Post by SaucJedi »

Hamtaro126 wrote:The real difference in MMC6 from MMC3 is a waste, as the only difference is WRAM protection.

And the two games, Startropics 1 and 2, are still great games.

but MMC2 and MMC4 still has it's usage as well, and can be cloned (Partial even), although MMC4 is a likely canadate.
WRAM protection? What do you mean? I was under the impression that MMC6 supported WRAM whereas MMC3 did not.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

SaucJedi wrote:I was under the impression that MMC6 supported WRAM whereas MMC3 did not.
Super Mario Bros 3, Kirby's Adventure, and M.C. Kids disagree with you.

MMC6 does not support WRAM chips other than what's inside the mapper chip itself.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
SaucJedi
Posts: 46
Joined: Wed Jul 27, 2005 9:46 am
Location: Spain

Post by SaucJedi »

Point taken. I have been too long far from the NES scene...
Post Reply