My emulator always seems to hang on the MMC3 tests.. all of them. I also know why it does this:
When I start the ROM it initializes the APU with all zeroes. Also port 0x4017 a zero is written. This means Inhibit Interrupt Off and the sequencer mode that generates an interrupt in the last step.
Now it comes.. Because of this my emulator Asserts 0x01 on the IRQ line (0x01 = IRQ_PULSE_APU) at the end of a APU frame.
The following code in the IRQ handler will be executed:
--------
ASL $20
STA $E000
RTI
--------
It seems to acknowledge the MMC3 IRQ. But it does not acknowledge the APU interrupt. therefore my emulator immediately returns to the IRQ handler again. Because IRQ_PULSE_APU is still asserted on the IRQ line. Well then this will go on forever.. Never getting any output.
By manually lowering the IRQ_PULSE_APU using a debug command the test will continue and offcourse fail.
What am I missing? because other emulators do run this? Do I not understand something?
When I start the ROM it initializes the APU with all zeroes. Also port 0x4017 a zero is written. This means Inhibit Interrupt Off and the sequencer mode that generates an interrupt in the last step.
Now it comes.. Because of this my emulator Asserts 0x01 on the IRQ line (0x01 = IRQ_PULSE_APU) at the end of a APU frame.
The following code in the IRQ handler will be executed:
--------
ASL $20
STA $E000
RTI
--------
It seems to acknowledge the MMC3 IRQ. But it does not acknowledge the APU interrupt. therefore my emulator immediately returns to the IRQ handler again. Because IRQ_PULSE_APU is still asserted on the IRQ line. Well then this will go on forever.. Never getting any output.
By manually lowering the IRQ_PULSE_APU using a debug command the test will continue and offcourse fail.
What am I missing? because other emulators do run this? Do I not understand something?