Skip to content

Newly released Populous ROM has bad graphics #787

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
awjackson opened this issue Mar 24, 2025 · 0 comments · May be fixed by #788
Open

Newly released Populous ROM has bad graphics #787

awjackson opened this issue Mar 24, 2025 · 0 comments · May be fixed by #788

Comments

@awjackson
Copy link
Contributor

awjackson commented Mar 24, 2025

The newly released ROM of the unreleased game Populous has completely garbled graphics in FCEUX.

The game uses MMC1 with CHR RAM--it seems to be intended for a bog standard SNROM PCB. It never initializes either of the first two MMC1 registers, control or CHR bank 0. Instead it writes 0 to the CHR bank 1 register ($C000-DFFF) on reset, then afterwards only ever writes to the PRG register ($E000-$FFFF).

This would work if the MMC1 were to power up either in 8KB CHR bank mode or with the low bit of CHR bank 0 set. However, FCEUX forces the MMC1 to power up in the following state:

static void MMC1CMReset(void) {
        int i;

        for (i = 0; i < 4; i++)
                DRegs[i] = 0;
        Buffer = BufferShift = 0;
        DRegs[0] = 0x1F;

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

This initial state combined with the incomplete mapper initialization Populous does means that the first half of CHR RAM ends up mirrored at both $0000 and $1000 and the second half of CHR RAM ends up not mapped at all. This seems to be the cause of the incorrect graphics.

Simple fix would be to change the power-on state of DRegs[0] to 0x0F (8KB CHR banking mode) which is what other NES emulators like Mesen seem to do. I expect there are very few if any other MMC1 games, either commercial or homebrew, that never initialize this register.

@awjackson awjackson linked a pull request Mar 24, 2025 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant