Handle delay between the start of opcode execution, and the time at which external bus access is made.

Description

We have a problem preventing a number of games from booting. On the real system, it's quite possible for a pending interrupt to be observed by examining the F flag in the VDP status register, even outside the interrupt handler when interrupts are not masked. Since hardware tests have shown that the F flag is asserted exactly at the time an interrupt is raised, this indicates these loops work because of microcode-level instruction timing, where an interrupt is raised after the opcode to read the status register begins executing. We need to simulate the timing here, for the move instruction in particular.

Environment

None

Activity

Show:

Roger Sanders May 10, 2013 at 12:15 AM

This problem also relates to this bug: "Bugs Bunny in Double Trouble - freezes on title screen" (http://gendev.spritesmind.net/forum/viewtopic.php?p=19484#19484)
in this case, there's actually a bug in the code. At 0x46E, there's a check for the Z80 bus request state. If the bus is not ready, due to a code bug (invalid branch), the game crashes. The bus must always be ready at this point in order for the game to work. This check occurs at numerous points during the startup and in-game process. Note that in this case, the Z80 yielding the bus between bus access operations within an opcode may also be required.

Roger Sanders May 10, 2013 at 12:07 AM

The following user report is related to this bug: "Marvel Land - freezes on pause" (http://gendev.spritesmind.net/forum/viewtopic.php?p=19474#19474)

Details

Assignee

Reporter

Components

Priority

Created May 2, 2013 at 7:05 AM
Updated May 10, 2013 at 12:15 AM