The nesdev wiki says:
Well, my emu is suffering that, the image appears too high and in "Battletoads and Double Dragon" too.
I have been Reading the wiki and according to the "render" diagram/picture:
- Vblank is set on scanline 241 cycle 1? (counting from 0-340)
- Is NMI pulled low (triggered) in that moment?
According to blargg's ppu tests nmi timing throws me error "3) NMI occurred 2 PPU clocks too early".
For that reason i do a hack:
That way the NMI timming test throw me error #8, but this this time "BattleToads and Double Dragon" is playable and "Battletoads" hangs ramdomly in the second level.
Any advice? thxs.
Quote:
Battletoads requires fairly precise CPU and PPU timing and a fairly robust sprite zero implementation. It leaves rendering disabled for a number of scanlines into the visible frame to gain extra VRAM manipulation time and then enables it. If the timing is off so that the background image appears too high or too low at this point, a sprite zero hit will fail to trigger, hanging the game. This usually occurs immediately upon entering the first stage if the timing is off by enough, and might cause random hangs at other points otherwise.
Well, my emu is suffering that, the image appears too high and in "Battletoads and Double Dragon" too.
I have been Reading the wiki and according to the "render" diagram/picture:
- Vblank is set on scanline 241 cycle 1? (counting from 0-340)
- Is NMI pulled low (triggered) in that moment?
According to blargg's ppu tests nmi timing throws me error "3) NMI occurred 2 PPU clocks too early".
For that reason i do a hack:
Code:
if (scanline == 241 && cycle == 1)
{
on_vblank = 1;
if (nmi_onvblank)
nmi_pending = 1;
}
if (scanline == 241 && cycle == 15)
{
if (nmi_pending)
{
SetCpuNMIPending();
nmi_pending = 0;
}
}
{
on_vblank = 1;
if (nmi_onvblank)
nmi_pending = 1;
}
if (scanline == 241 && cycle == 15)
{
if (nmi_pending)
{
SetCpuNMIPending();
nmi_pending = 0;
}
}
That way the NMI timming test throw me error #8, but this this time "BattleToads and Double Dragon" is playable and "Battletoads" hangs ramdomly in the second level.
Any advice? thxs.