This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

write FF to MMC1

write FF to MMC1
by on (#96052)
Hi -- I'm trying to get the MMC1 mapper working in my emulator.

It looks like the game I'm testing with (Metroid) starts by sending FF to all four registers. I am not 100% sure what state the mapper is supposed to be in after that point. In my emulator, for example, the reset bit resets all the bits associated with the control register to 0 so the MMC1 thinks it is in 32kb prg-rom switching mode and 8kb chr-rom switching mode.

Can someone verify if that is correct or set me straight?

by on (#96053)
Writing 1 to the high bit of any of the four registers makes these two changes to the mapper's state:
  • PRG ROM bankswitching mode set to fixed-$C000, as opposed to fixed-$8000 or 32 KiB mode
  • Shift register ready to accept a first write

This happens no matter where in $8000-$FFFF the write occurs. If Metroid is resetting four times, that's no different in effect from resetting once.

by on (#96054)
I am confused by some of the language in the MMC1.txt document from this site. It says:

Quote:
The "reset" signal is generated by writing a byte value whose high bit is a 1 to any of the four MMC1 registers. This signal affects the bits of reg0 as
follows:

bit 0 - unknown
bit 1 - unknown
bit 2 - reset to logic 1
bit 3 - reset to logic 1
bit 4 - unaffected


What does it mean by "reset to logic 1"? I was understanding it to mean that the mapper was set to 16kb prg-rom mode, as though 1 had been written to bit 2 and 3 of reg0.

by on (#96055)
Precisely. And fixing $c000-$ffff to the last bank.