summaryrefslogtreecommitdiff
path: root/blastem.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2014-06-19 08:14:35 -0700
committerMichael Pavone <pavone@retrodev.com>2014-06-19 08:14:35 -0700
commite8e8075b59f9e4a6a8e9b1cc96f2fcb447fa508e (patch)
tree8971665973661edd926c5162fb5f9e9927c2f77b /blastem.c
parente97e4c2823337d68efdc8191f73d15b532a2130e (diff)
Slight cleanup of vint handling on the Z80
Diffstat (limited to 'blastem.c')
-rw-r--r--blastem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/blastem.c b/blastem.c
index 83c2c23..15f7932 100644
--- a/blastem.c
+++ b/blastem.c
@@ -192,11 +192,11 @@ void sync_z80(z80_context * z_context, uint32_t mclks)
}
uint32_t vint_cycle = vdp_next_vint_z80(gen->vdp) / MCLKS_PER_Z80;
while (z_context->current_cycle < z_context->sync_cycle) {
- if (z_context->iff1 && z_context->current_cycle < (vint_cycle + Z80_VINT_DURATION)) {
+ if (z_context->iff1 && z_context->int_cycle == CYCLE_NEVER && z_context->current_cycle < (vint_cycle + Z80_VINT_DURATION)) {
z_context->int_cycle = vint_cycle < z_context->int_enable_cycle ? z_context->int_enable_cycle : vint_cycle;
}
z_context->target_cycle = z_context->sync_cycle < z_context->int_cycle ? z_context->sync_cycle : z_context->int_cycle;
- dprintf("Running Z80 from cycle %d to cycle %d. Native PC: %p\n", z_context->current_cycle, z_context->sync_cycle, z_context->native_pc);
+ dprintf("Running Z80 from cycle %d to cycle %d. Int cycle: %d\n", z_context->current_cycle, z_context->sync_cycle, z_context->int_cycle);
z80_run(z_context);
dprintf("Z80 ran to cycle %d\n", z_context->current_cycle);
}