I'm debugging my MMC1 mapper with Final Fantasy. When the game first starts it writes $80 to $9FFF, then to $BFFF, then to $DFFF, then to $FFF9. It appears to me like it thinks there is a reset bit for each register. But as far as I can tell from the NesDev wiki just writing $80 to anywhere in the PRG region (i.e. $8000-$FFFF) will reset the shift register and bitwise-OR the control register with $0C. There is nothing else to reset. So why would FF be trying to reset each register? Am I mis-understanding something about the MMC1 reset?
Thanks!
Jonathon
Quote:
It appears to me like it thinks there is a reset bit for each register.
The coder(s) might have thought that. Although I'm pretty sure that's not the case.
Maybe it was just a "better safe than sorry" measure.
In any event, you understand MMC1 correctly. Final Fantasy is just doing weird things.
Sweet! Thanks!
Watch out for Bill & Ted and Rocket Ranger. They do abusive things to the MMC1, like only keeping the dummy write of an INC XXXX instruction, and ignoring the second write that contains the incremented value.
Yep, Disch had that note about Bill&Ted in his MMC1 mapper doc! But I didn't know about Rocket Ranger doing that also. I'll be sure to test that cart with my emu as well! Thanks for the info!
So I'm debugging my MMC1 mapper and wanted to make sure I'm properly understanding the PRG mapping/swapping.
Just FYI I haven't implemented any of the "variants" of the MMC1 mapper, just the base functionality that is shown on the NesDev Wiki and Disch's mapper doc.
So if the control register bits [3:2] are set upon system reset then that means that the only games that I can test are those with 256KB of PRG data. Because having [3:2] set means that $C000 is fixed to 16KB PRG bank #16 (i.e. $F) and therefore a game _must_ have 256KB of PRG data otherwise there will be no code at the 16KB $C000 bank that the mapper is pointing to at reset. Thus causing the game to not even boot.
I'm not sure if I explained that well enough...haha. Does that seem correct?
You're a bit off on that assumption. While the bits are set, ROMs smaller than 256 KB simply ignore the upper address lines, because they don't have them. You'll get the last 16k bank in the rom, assuming it's <= 256KB and a power of two, which it will be for anything other than those 512KB dragon warrior games.
Ohhhh, OK. Yeah, I was thinking that couldn't be right (addressing memory that did not exist - lol). So that makes perfect sense. Thanks a lot! I will make the fix now!
UPDATE: MMC1 is working baby!!! SWEEEEEEEEET!!!