Adjust MMC1 power-on state to fix Populous#788
Adjust MMC1 power-on state to fix Populous#788awjackson wants to merge 1 commit intoTASEmulators:masterfrom
Conversation
| DRegs[i] = 0; | ||
| Buffer = BufferShift = 0; | ||
| DRegs[0] = 0x1F; | ||
| DRegs[0] = 0x0F; // Populous (unreleased) doesn't initialize this and expects 8KB CHR mode |
There was a problem hiding this comment.
Will this break other ROMs? What has been tested here?
There was a problem hiding this comment.
correct reset value should be: DRegs[0] = 0x0C, similar behavior when load register writes value & 0x80 to issue reset which writes to Control Register with (Control OR $0C)
https://www.nesdev.org/wiki/MMC1#Control_(internal,_$8000-$9FFF)
There was a problem hiding this comment.
It is very unlikely that there are other games that depend on MMC1 initial state in the way Populous does. Populous simply never writes to MMC1 register 0 at all, which it can only "get away with" due to a unique combination of being (a) a game with no scrolling whatsoever, (b) that uses CHR RAM, and (c) is an unreleased beta that hasn't gone through Nintendo's checks.
For what it's worth, Mesen initializes this register to a random value | 0x0C.
Fixes #787