Skip to content

MMC3 IRQ Issues #30

Open
Open

Description

@davignola

There is some issues with MMC3 on some games, might be related to different revisions of the chip.
For example, Kirby's adventure (MMC3C) does not render the status bar properly.

Looking at the implementation, it seems to be the correct "new/normal" behavior.
I tried fiddling with IRQs while nIRQReload == 0, but same result. My C# port has the exact same problem
It kind of displays if I force IRQ on some cycles, but it messes up other things.

Anyone has any idea what might be off ?

Thanks !

Activity

  1. Amathlog commented on Jan 10, 2022

    @Amathlog

    Hi! I'm also following this wonderful series and I'm trying to a step further, to have a more complete emulator.
    I also encountered the same bug as you, and from my understanding it comes to the IRQ signal.
    Those games (like Kirby and SMB3) are using IRQ to know at which scanlines the PPU is currently at to change the rendering behavior. For Kirby/SMB3 it's the status bar, but in SMB3 there is also the Spade game, where you need to match 3 lines.

    After diving a bit deeper on the internals of the CPU, I noticed that when the IRQ is requested by the Mapper, the I flag in the the status register in the CPU was always 1, and therefore IRQ were ignored.

    In Kirby, it seems the PPU will trigger an NMI, and in the NMI function, it will clear the I flag.
    But in the olc implementation, there is something not right done. And rightfully it seems someone noticed:
    #33

    By moving the set flag after writing to the stack is solving the problem.
    I'll open a Pull request to fix this :)

    PS: Didn't see it was from 2020, sorry if I chimed in too late :D

    PS2: It's here: #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions