MMC1A fixed bank behavior difference

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Post Reply
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

MMC1A fixed bank behavior difference

Post by tepples »

On MMC1A (mapper 155), setting $E000 bit 4 causes causes bit 3 to bypass the fixed bank logic and go straight to the mapper's PRG ROM A17 output.

MMC1B, the common revision of the MMC1 mapper, uses bit 4 of $E000 as a PRG RAM disable bit. MMC1A, an earlier revision, does not disable PRG RAM in response to bit 4. Yet SOFEL's The Money Game, which uses MMC1A, deliberately sets bit 4 (ora #$10) in the value written to this register. So a NESdev Discord server member concluded that it must have some effect.

I wrote a test that steps through all 128 combinations of $8000 bits 3-2 (PRG banking mode) and $E000 bits 4-0 (PRG bank) and displays which PRG bank ends up selected, and then I had KMLbay on the NESdev Discord server run it on an MMC1A devcart. The results in 32K mode match MMC1B. The results in 16K mode differ:

Code: Select all

80:08
 00  00 01 02 03 04 05 06 07
 08  08 09 0a 0b 0c 0d 0e 0f
 10  00 01 02 03 04 05 06 07
 18  88 89 8a 8b 8c 8d 8e 8f  [differs from MMC1B]
80:0C
 00  0f 1f 2f 3f 4f 5f 6f 7f
 08  8f 9f af bf cf df ef ff
 10  07 17 27 37 47 57 67 77  [differs from MMC1B]
 18  8f 9f af bf cf df ef ff
PRG bank select ($E000): RPPPP
  • P: Select PRG ROM A17-A14 when not in the fixed bank
  • R: Effect depends on MMC1 revision.
    MMC1B disables PRG RAM while R=1.
    On MMC1A, R=0 means the fixed bank affects PRG A17-A14 output, and when R=1, the fixed bank affects PRG A16-A14 output, and D3 alone controls PRG A17.
I'm guessing The Money Game might have needed large PRG RAM (like Koei's games on SOROM) earlier in development, and this was optimized out later in development to save on replication cost. In a game with 128 KiB PRG ROM, D3 could have selected between the first half (ora #$10) or second half (ora #$18) of PRG RAM.

Letterless MMC1 and AX5904 haven't been tested yet. (And there's no evidence on NesCartDB that MMC1C even exists.)
Attachments
mmc1atest-0.01.zip
Test ROM with source code
(20.21 KiB) Downloaded 90 times
Post Reply