News: 11 March 2016 - Forum Rules

Author Topic: MMC3 Mapper Question  (Read 2251 times)

RetroRain

  • Sr. Member
  • ****
  • Posts: 287
    • View Profile
MMC3 Mapper Question
« on: May 08, 2012, 12:36:56 pm »
Okay, two games that have MMC3, Super Mario Bros. 3 and Mega Man 3.

The length of both games is 0x6000F.

Taken from FireBug's Mapper Document, the Notes Section of MMC3:

"Two of the 8K ROM banks in the PRG area are switchable. The other two are "hard-wired" to the last two banks in the cart. The default setting is switchable banks at $8000 and $A000, with banks 0 and 1 being swapped in at reset. Through bit 6 of $8000, the hard-wiring can be made to affect $8000 and $E000 instead of $C000 and $E000. The switchable banks, whatever their addresses, can be swapped through commands 6 and 7."

Okay, so at the default setting, banks 0 and 1 are loaded into $8000 and $A000 respectively.  I get that.

That means that at first, 0x10 - 0x400F is loaded into $8000, and 0x4010 - 800F is loaded into $A000.

What I don't get, is which banks are hardwired to $C000 and $E000?

I opened up Super Mario Bros. 3 and Megaman 3, and being that they are both 0x6000F in lengh, I've noticed that the very last bank $E000, 0x3E010 - 0x4000F is loaded in.

Now, being that the MMC3 mapper loads the PRG in 8k chunks (2000 bytes), if you divide 0x6000F by 0x2000, you get 0x30.  Yet, the last bank that is hard-wired (0x3E010 - 0x4000F) is at 0x1F (divide 0x3E010 by 0x2000).  It doesn't make sense to me, because I can't figure out the logic behind it.  0x3E010 is more than halfway through the ROM.  What if a game is less than 6000F, like 4000F?

While I suppose it is possible, are the last two banks the ones that are two-thirds into the ROM?

What I'm getting at, is if a game uses a MMC3 mapper, which 8K PRG banks are thrown into the last two banks of the ROM?  How do you determine those banks based on the size of the ROM?

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7260
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: MMC3 Mapper Question
« Reply #1 on: May 08, 2012, 02:50:50 pm »
You have to consider PRG and CHR as separate ROMs.

I'm guessing both have 256KB PRG-ROM (32 banks, $40000 bytes) and 128KB CHR-ROM (16 banks, $20000 bytes).
"My watch says 30 chickens" Google, 2018