Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/boards/mmc1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void MMC1CMReset(void) {
for (i = 0; i < 4; i++)
DRegs[i] = 0;
Buffer = BufferShift = 0;
DRegs[0] = 0x1F;
DRegs[0] = 0x0F; // Populous (unreleased) doesn't initialize this and expects 8KB CHR mode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this break other ROMs? What has been tested here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


DRegs[1] = 0;
DRegs[2] = 0; // Should this be something other than 0?
Expand Down