Previous:
MMC1
The MMC3 mapper was designed to improve upon MMC1 by supporting even larger cartridge memory sizes to the NES and making raster effects easier. It contains a timer that ticks once for each scanline drawn and triggers an IRQ when it finishes.
$8000: Command
76543210
||||||||
|||||+++- Bankswitch command
||||| 0: switch 2 KB of CHR into PPU $0000 or $1000
||||| 1: switch 2 KB of CHR into PPU $0800 or $1800
||||| 2: switch 1 KB of CHR into PPU $1000 or $0000
||||| 3: switch 1 KB of CHR into PPU $1400 or $0400
||||| 4: switch 1 KB of CHR into PPU $1800 or $0800
||||| 5: switch 1 KB of CHR into PPU $1C00 or $0C00
||||| 6: switch 8 KB of PRG into CPU $8000 or $C000
||||| 7: switch 8 KB of PRG into CPU $A000
||+++---- apparently unused
|+------- PRG switching method
| 0: hardwire $C000 and $E000 to last two banks
| in the cartridge and switch $8000 and $A000
| 1: hardwire $8000 and $E000 to last two banks
| in the cartridge and switch $C000 and $A000
+-------- CHR switching method
0: first column of PPU addresses
1: second column (invert PPU A12)
$8001: Bank
Write a bank number here to switch it into the bank chosen in $8000 D2-D0.
PRG switching is in 8 KB units; CHR switching is in 1 KB units.
$A000: Mirroring
76543210
||||||||
|||||||+- Mirroring select (one setting vertical, the
||||||| other horizontal; I'm not sure which)
+++++++-- apparently unused
$A001: Extra RAM enable
Many cartridges such as Super Mario Brothers 3 have extra CPU RAM
at $6000-$7FFF, and it may be battery-powered so that it can save
its state when the power is off.
76543210
||||||||
|+++++++- apparently unused
+-------- 0: disable; 1: enable 8 KB of RAM at $6000
$C000: Timer counter
The timer's counter is stored here. When it counts down to 0, MMC3
will trigger an IRQ.
$C001: Timer load register
A value stored here will be copied to the IRQ counter
when $E000 is written to.
$E000: Disable timer
Writing here will copy $C001 to $C000 and disable the MMC3's timer.
$E001: Enable timer
Writing here will enable the MMC3's timer.
sources: Firebug's comprehensive mapper document and experiments
with good-quality emulators (NOT NESTICLE!)
Different models of MMC3 have different initial values for the bankswitch registers; make sure your interrupt and reset routines are somewhere in $E000-$FFFF (the last 8 KB bank in the cartridge). On software I develop, I put the reset entry point at $FF00, which sets up all MMC3 banks and jumps to the program's real entry point. I use PRG switching method 1 because it lets me switch the sample area at $C000-$DFFF.
Next:
MMC5