INES Mapper 012
This mapper is an MMC3 variant with a simple twist. Writing to $4020-5FFF will set an additional bit for each half of CHR to allow an extra 256K of ROM to be addressed. For example, the mapped page for the left half would be %Lxxxxxxxx where %xxxxxxxx is the result of the typical MMC3 logic.
Otherwise all operations appear to be typical for MMC3A.
Maybe the only game that uses this mapper is Dragon Ball Z 5. It depends on this mapper operating as MMC3A variant. Choosing otherwise will result in the game hanging at boot-up as it gets stuck in an infinite loop with the IRQ reload set to 0 and continually getting re-triggered.
Write Registers: --------------------------- Range: $4020-5FFF $4020: [...R ...L] L = 256K CHR block for left (low) half of CHR (<$1000) R = 256K CHR block for right (high) half of CHR (>=$1000)
Note1: FCEUX instead uses the range $4100-$5FFF. DBZ5 itself seems to always write to $4132.
If the CHR ROM is 256K or smaller, CHR A18 isn't connected to anything, and thus this behaves as an ordinary MMC3A.
Note2: The above explanation is not what FCEUX does. Instead, it treats this register as an intermediate latch (just like register $5130 in MMC5). When game writes to CHR registers via $8001, bit from above register is used as additional CHR bank bit:
When $8000.7 = 0: L is used for CHR0 and CHR1 and R is used for CHR2, CHR3, CHR4, CHR5, CHR6
When $8000.7 = 1: R is used for CHR0 and CHR1 and L is used for CHR2, CHR3, CHR4, CHR5, CHR6
For Dragon Ball Z5 it does not matter, because it does change $4020 between writes to CHR regs. But there exists another game (Ultimate Mortal Kombat III (Pit v+1 + Fat v+2) v7.5) that change $4020 between writes to CHR registers. This game works correctly in FCEUX but does not in other emulators (like BizHawk). The difference in implementation of those mappers can be seen when selecting a middle fighter character from the bottom row - the sprites for one of the fighters will not be displayed properly.
Which implementation reflcts how real hardware works is unknown. Though, DBZ5 is a cartridge game that uses PCB with that mapper, while UMK3 v7.5 is one of homebrew hacks that just was ported from MMC3 to mapper 12 to get more CHR rom banks (latter versions switched to MMC5)
Read Registers: --------------------------- Range: $4020-5FFF $4020: [.... ...D] D = value of PCB jumper (0 = English version of game, 1 = Chinese version of game)
Note: FCEUX uses the range $4100-$5FFF. DBZ5 itself seems to always read from $4132. There exist different ROM of the game ('Dragon Ball Z 5 - Dragon Ball Z Super (Unl) (Ch) [!]), which has the the routine that reads above register replaced with a menu.
Mapper 12 is also used for FFE disk images. See Mapper 6 for some additional details. (FIXME: does the FFE usage comply with the above info, or is there a conflict between different mapper 12 definitions?)
See also: Forum thread about adding parts to an MMC3A board to make this mapper