News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: What is a MMC Mapper?  (Read 6456 times)

linkncb16

  • Restricted Access
  • Full Member
  • *
  • Posts: 159
  • They actually updated this site. Hallelujah.
    • View Profile
    • Patreon
What is a MMC Mapper?
« on: January 02, 2016, 06:35:18 pm »
I found a hack for FFIII (Famicom) that changes the FFIII mapper from MMC3 to MMC5 which allows for 1MB of PRG ROM data. Can someone please explain what any of this is and why it's important?
Final Fantasy Redux is complete! Download

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: What is a MMC Mapper?
« Reply #1 on: January 02, 2016, 06:50:36 pm »
The mapper is used to circumvent the hardware limitations of the nes. Specifically, how much data can be addressed. Mappers work by translating the memory address the game code provides into an access of a specific area of the cartridge hardware. And the key feature is that the mapper can be reconfigured on the fly by the game, swapping in new content in the old address space.

linkncb16

  • Restricted Access
  • Full Member
  • *
  • Posts: 159
  • They actually updated this site. Hallelujah.
    • View Profile
    • Patreon
Re: What is a MMC Mapper?
« Reply #2 on: January 02, 2016, 07:13:49 pm »
So the mapper is similar to that of RAM?
Final Fantasy Redux is complete! Download

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2921
  • 2 + 2 = 5
    • View Profile
Re: What is a MMC Mapper?
« Reply #3 on: January 02, 2016, 07:45:09 pm »
Quote
So the mapper is similar to that of RAM?

Not exactly. From what I understand the NES says "I can read this far" and the mapper says "okay, NES, I have more information (farther) than you can read so I will help translate all of this stuff into something that you can understand and use". Besides giving the console access to more data than it can normally address, mappers can also do tricks to work around some of the systems other limitations.

I guess without fancy mappers the NES can only handle a 32kb game (if I remember correctly).
War is Peace. Freedom is Slavery. Ignorance is Strength.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6934
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: What is a MMC Mapper?
« Reply #4 on: January 02, 2016, 08:41:44 pm »
Yes, mappers were originally made just so the NES could have more than 32KB PRG-ROM and more than 8KB (one full background+sprite tileset) CHR-ROM. They would split a larger ROM into smaller pieces (known as banks) the NES could understand and only feed it a bank when it needs it.
Fancier stuff like timers and split-screen effects and so on came later.
"My watch says 30 chickens" Google, 2018

joe73ffdq

  • Full Member
  • ***
  • Posts: 195
    • View Profile
Re: What is a MMC Mapper?
« Reply #5 on: January 03, 2016, 02:36:16 am »
I always wondered what exactly MMC's were able to do, but never took the time to look into it fully.

Expanded memory past 32k I already knew.

Do MMc's provide more colors though. The NES uses 52 total w/16 on screen. Castlevania 3 uses MMC5, and appears to be more colorful than most NES games.


As far as memory goes, I recently came to a conclusion. 256k games consist of 16 banks. With how bank swapping works, it appears that NES games could reach up to 4 megabyte, with 256 banks max. Is this correct, or could it even be expanded further to 2 bytes or more for 65536+ banks if the NES hardware was continued and remained relevant.

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2921
  • 2 + 2 = 5
    • View Profile
Re: What is a MMC Mapper?
« Reply #6 on: January 03, 2016, 03:15:33 am »
Quote
Do MMc's provide more colors though. The NES uses 52 total w/16 on screen. Castlevania 3 uses MMC5, and appears to be more colorful than most NES games.

If I remember correctly, it doesn't allow you to use any more colors than you normally would but it (the MMC5) does give you more options as to how the colors can be utilized. Like there's more room for the tiles on screen to use their own individual palettes or something. I don't remember all of it and there's def someone who could explain it better than me. LOL

I guess it's also worth noting that the MMC5 used in Castlevania III is capable of two extra sound channels (two extra squares I believe) that was not utilized (possibly due to the US console being designed specifically NOT to support these sort of features).

I guess different mappers have different tricks they can do to work around the console's stock limitations to make it do things that it would never be able to do on it's own. I've heard of some using fancy bank-swapping at key moments to get a few extra animation tiles and things like that.
War is Peace. Freedom is Slavery. Ignorance is Strength.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: What is a MMC Mapper?
« Reply #7 on: January 03, 2016, 05:19:23 am »
Some mappers support raising an interrupt at a given scanline, allowing for things like swapping banks and changing renderer settings such as the scroll distance.

Bregalad

  • Hero Member
  • *****
  • Posts: 2667
    • View Profile
Re: What is a MMC Mapper?
« Reply #8 on: January 03, 2016, 05:31:56 am »
Quote
Do MMc's provide more colors though.
No. No mapper could ever add more colours to the NES, the PPU has a fixed limitation of 25 accessible colours among a palette of 55 (*) and this can't be changed, ever, no matter how much hardware is put in the mapper.

(*) Technically 64, however I count the 8 identical blacks and the two almost identical whites as only one, and I don't count one buggy "blacker than black" colour, which makes a total of 64 - 7 - 1 - 1 = 55. I also do not count colour emphasis as separate colours, because it is not possible to use them for individual pixels on the screen.

Quote
Castlevania 3 uses MMC5, and appears to be more colorful than most NES games.
Castlevania 3 is a port of Akumaj├┤ Densetsu, which used VRC6 mapper. Likely the only reason they used MMC5 is because the bankswitching scheme of VRC6 is so weird they couldn't replicate it with MMC3. I'm pretty confident CV3 would have been technically possible without MMC5, it only uses a small fraction of MMC5's possibilities. To have a more insight of what MMC5 is capable of, look at Just Breed or Metal Slader Glory.

Quote
I found a hack for FFIII (Famicom) that changes the FFIII mapper from MMC3 to MMC5 which allows for 1MB of PRG ROM data. Can someone please explain what any of this is and why it's important?
It is only important if you have plans to use this extra space. If I remember well FF3 is extremely packed and has almost 0 free bytes of ROM, unlike most NES games. MMC5 is however a very poor target for FF3, as it relies heavily on CHR-RAM and MMC5 officially only supports CHR-ROM. I have no idea how they did that, but very likely they uses MMC5+CHR-RAM which has no official support.
Another MMC3 type mapper but that supports up to 1MB or PRG-ROM and CHR-RAM would be a better target for an oversize FF3. I ignore if such a mapper exists, if it does then it's uncommon.

A better / more sensible alternative would be to hack in a compression of graphics, which are currently stored uncompressed. Since FF3 has lots of graphics, loads of ROM could be spared that way. Of course it's way thougher than a simple mapper hack.
« Last Edit: January 04, 2016, 04:36:02 am by Bregalad »

Kea

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: What is a MMC Mapper?
« Reply #9 on: January 03, 2016, 12:06:24 pm »
Mapper 245 is a Chinese MMC3 clone that allows for 1024kB of PRG-ROM by sacrificing bankable CHR-RAM, fixing it to banks 0,2,4,5,6,7. Since FF3 fixes its CHR banks to those values anyway it's a good fit, but personally if you're going to use a pirate mapper you might as well just use oversize MMC3 or MMC5+CHR-RAM - none of those have any official support.

Compressing FF3's graphics would indeed be the better option, as you say.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6934
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: What is a MMC Mapper?
« Reply #10 on: January 03, 2016, 01:38:27 pm »
I always wondered what exactly MMC's were able to do, but never took the time to look into it fully.

Expanded memory past 32k I already knew.

Do MMc's provide more colors though. The NES uses 52 total w/16 on screen. Castlevania 3 uses MMC5, and appears to be more colorful than most NES games.


As far as memory goes, I recently came to a conclusion. 256k games consist of 16 banks. With how bank swapping works, it appears that NES games could reach up to 4 megabyte, with 256 banks max. Is this correct, or could it even be expanded further to 2 bytes or more for 65536+ banks if the NES hardware was continued and remained relevant.

MMC5 is supposed to be capable of assigning palettes to every 8x8 tile, whereas NES can normally only assign palettes in 16x16 (2 tile x 2 tile) regions.
"My watch says 30 chickens" Google, 2018

Disch

  • Hero Member
  • *****
  • Posts: 2758
  • NES Junkie
    • View Profile
Re: What is a MMC Mapper?
« Reply #11 on: January 03, 2016, 04:06:18 pm »
How did I not see this thread!   :'(  It looks like the main question was already answered, so there's not much point in me replying, but I can't resist because I'm a total dork and I love this stuff:

The NES communicates with the cartridge by performing various reads and writes from different addresses.  An 'MMC' is an additional chip on the cartridge which redirects addresses to different places, allowing for more memory to be accessed.  Since they are effectively in control of the read/write line and can determine what the NES 'sees' when it tries to read from the cartridge, they can do a bunch of other neat tricks too, as others have mentioned in this thread.

The term "mapper" is often used interchangeably with "MMC", but a mapper is more like a general description of the entire cartridge layout -- and not just the MMC chip.  For example, mapper 024 and 026 use the exact same MMC, but are different mappers because the cartridge has a very different layout.

As far as memory goes, I recently came to a conclusion. 256k games consist of 16 banks. With how bank swapping works, it appears that NES games could reach up to 4 megabyte, with 256 banks max. Is this correct, or could it even be expanded further to 2 bytes or more for 65536+ banks if the NES hardware was continued and remained relevant.

There's no limit.  The NES has no idea what hardware is on the cartridge, and it doesn't care.  As long as the cart gives the NES data when it tries to read, the NES is happy.

Whatever hardware you can attach to a cartridge is fair game.  On the SNES, they even started adding additional processors on the carts.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6934
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: What is a MMC Mapper?
« Reply #12 on: January 03, 2016, 07:13:50 pm »
Color Dreams (I think it was) announced some kind of NES "Super Cartridge" with an enhancement chip.

Though I have to wonder just how far along it would've gotten as I question how profitable it would've been due to: Nintendo's attempts to stop retailers from selling unlicensed games and CD's crappy reputation, plus being a movie-license (Hellraiser) game would've cut further into their profit potential.

Though Nintendo did make the WideBoy (a Game Boy adapter not for the public, only approved developers and game reviewers), probably the most extreme mapper on the NES. :)
"My watch says 30 chickens" Google, 2018

Jorpho

  • Hero Member
  • *****
  • Posts: 4211
  • The cat screams with the voice of a man.
    • View Profile
Re: What is a MMC Mapper?
« Reply #13 on: January 03, 2016, 08:07:31 pm »
Color Dreams (I think it was) announced some kind of NES "Super Cartridge" with an enhancement chip.

Though I have to wonder just how far along it would've gotten as I question how profitable it would've been due to: Nintendo's attempts to stop retailers from selling unlicensed games and CD's crappy reputation, plus being a movie-license (Hellraiser) game would've cut further into their profit potential.
I remember reading about that.
http://lostmedia.wikia.com/wiki/Hellraiser_%28Unreleased_1990_Video_Game%29
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: What is a MMC Mapper?
« Reply #14 on: January 03, 2016, 08:17:43 pm »
Extra sound channels, anyone?  :)

Quote
The [NES] has a fixed limitation of 25 accessible colours among a palette of 51 (*)

LOL, everyone counts a different number of "unique" colors. (Mine's 56.)

Bregalad

  • Hero Member
  • *****
  • Posts: 2667
    • View Profile
Re: What is a MMC Mapper?
« Reply #15 on: January 04, 2016, 04:38:36 am »
Extra sound channels, anyone?  :)

LOL, everyone counts a different number of "unique" colors. (Mine's 56.)
Indeed, I messed up and substracted 3 black columns instead of 2. So my new count is 55 colours. Your  count is 56 probably because you count $20 and $30 as separate colours, but I consider them indistinguishly white.

It wouldn't be completely wrong to remove the $xd colour column entirely, as those are seldom used and almost equivalent with the $x0 colour shifted. In that case the total number of different colours would be 64 - 12 - 1 + 1 = 52 colours

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: What is a MMC Mapper?
« Reply #16 on: January 05, 2016, 03:54:16 am »
Quote
Your  count is 56 probably because you count $20 and $30 as separate colours, but I consider them indistinguishly white.

Indeed! I figure if I can't tell Pure Black #0D from Off-Black #0F, I can't equate Pure White #30 with Off-White #20.

Moreover, I avoid the "Bastard Grays" #2D and #3D like the plague due to their becoming Black on Playchoice-10 PPU's. That said, I readily admit #2D to be lighter than #00, and #3D to be lighter than #10.

dougeff

  • Sr. Member
  • ****
  • Posts: 359
    • View Profile
Re: What is a MMC Mapper?
« Reply #17 on: January 08, 2016, 01:09:20 am »
Quote from: Bregalad
  I also do not count colour emphasis as separate colours, because it is not possible to use them for individual pixels on the screen.

You could have the top part of the screen use a different color emphasis than the bottom, you would essentially have 50 different colors on screen at once.

The only practical use, would be to have water simulated by color emphasizing blue just for the water portion.

I suppose some very clever timed code could do other tricks with color emphasis, maybe. Allowing 8x25 = 200 colors on screen at once, in theory (8 possible color emphasis states.) A lot of those colors would be very similar, or visually identical, so maybe 150 is a more realistic (theoretical) total.
nesdoug.com -- blog/tutorial on programming for the NES

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: What is a MMC Mapper?
« Reply #18 on: January 08, 2016, 06:15:16 am »
Does emulators even support that? There is so much debate on what base palette to use.

MontyMole

  • Sr. Member
  • ****
  • Posts: 381
  • No fun in the USA.
    • View Profile
Re: What is a MMC Mapper?
« Reply #19 on: January 08, 2016, 10:16:32 am »
Quote
You could have the top part of the screen use a different color emphasis than the bottom, you would essentially have 50 different colors on screen at once.

The only practical use, would be to have water simulated by color emphasizing blue just for the water portion.

I suppose some very clever timed code could do other tricks with color emphasis, maybe. Allowing 8x25 = 200 colors on screen at once, in theory (8 possible color emphasis states.) A lot of those colors would be very similar, or visually identical, so maybe 150 is a more realistic (theoretical) total.
Shame the NES never had a demoscene as that sounds like just the sort of thing they would do.
A log of some kind.
. Videuss (Youtube)
it's not the official way and relies on luck\randomized placement of bears. USC