Hi guys,
I come to you on my knees, I've been fighting with this for quite a few days and I'm at a bit of a loss, I have looked at other threads on the issue and nothing has really helped. When going ingame on Battletoads i just get a black screen, I did have another rom which had kinda bust 2d logos at the start and went ingame but the screen shook, but the clean NTSC rom seems to hang on a black screen as you come down from your ship.
What I have discovered so far:
I can get the game to work by delaying my NMI by 5 CPU Cycles, this seems to work pretty successfully.
What about the tests?
Well all the Sprite Zero and Overflow tests pass, as well as the NMI control and Timing test, the NMI-on and NMI-off tests do not, but they are related to switching the "generate NMI" flag on and off, so I assume unimportant here?
I have also implemented enough of the APU (using blarggs timings for the frame counters since they are slower than the ones on nesdev wiki and his tests pass) to do the CPU timing tests and that passes perfectly apart from 2 Unofficial ops which apparently are only used during test roms.
Further to this, my PPU is done with the shifters and updates according to the NTSC timing chart
How do I sync everything?
Well I operate a PPU catchup system, my CPU cycles are counted in 2 or 3 (for awkward different ops) chunks, 2 cycles are counted when the Opcode is fetched, then the rest of the cycles (in 99% of situations) are counted when the memory read is done, this is where I'm using to get the timing right. When the cycles are incremented, it is at this point the PPU plays catch up, so the PPU can catch up 2-3 times every CPU op.
So yeah, here I am, stuck with my NMI being too fast for the CPU, despite passing all the essential tests, and I don't know how to proceed from here. Are there any "gotcha's" with interrupts that I need to account for in battletoads? is there a delay in the PPU starting on reset? I really hope you guys can help..
If you need to see my code (please don't laugh ) it's available at https://github.com/refractionpcsx2/RefNES
Thanks in advance!
I come to you on my knees, I've been fighting with this for quite a few days and I'm at a bit of a loss, I have looked at other threads on the issue and nothing has really helped. When going ingame on Battletoads i just get a black screen, I did have another rom which had kinda bust 2d logos at the start and went ingame but the screen shook, but the clean NTSC rom seems to hang on a black screen as you come down from your ship.
What I have discovered so far:
I can get the game to work by delaying my NMI by 5 CPU Cycles, this seems to work pretty successfully.
What about the tests?
Well all the Sprite Zero and Overflow tests pass, as well as the NMI control and Timing test, the NMI-on and NMI-off tests do not, but they are related to switching the "generate NMI" flag on and off, so I assume unimportant here?
I have also implemented enough of the APU (using blarggs timings for the frame counters since they are slower than the ones on nesdev wiki and his tests pass) to do the CPU timing tests and that passes perfectly apart from 2 Unofficial ops which apparently are only used during test roms.
Further to this, my PPU is done with the shifters and updates according to the NTSC timing chart
How do I sync everything?
Well I operate a PPU catchup system, my CPU cycles are counted in 2 or 3 (for awkward different ops) chunks, 2 cycles are counted when the Opcode is fetched, then the rest of the cycles (in 99% of situations) are counted when the memory read is done, this is where I'm using to get the timing right. When the cycles are incremented, it is at this point the PPU plays catch up, so the PPU can catch up 2-3 times every CPU op.
So yeah, here I am, stuck with my NMI being too fast for the CPU, despite passing all the essential tests, and I don't know how to proceed from here. Are there any "gotcha's" with interrupts that I need to account for in battletoads? is there a delay in the PPU starting on reset? I really hope you guys can help..
If you need to see my code (please don't laugh ) it's available at https://github.com/refractionpcsx2/RefNES
Thanks in advance!