Mercurial > repos > blastem
comparison blastem.c @ 602:452ad0b42afa
Set int_cycle to CYCLE_NEVER in sync_z80 so that the interrupt routine isn't taken inappropriately now that the kludge in handle_cycle_limit_int has been removed
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 26 Dec 2014 15:46:53 -0800 |
parents | 5ef3fe516da9 |
children | 39d7d463ed5b |
comparison
equal
deleted
inserted
replaced
601:f0061e3d2ad9 | 602:452ad0b42afa |
---|---|
193 } | 193 } |
194 uint32_t vint_cycle = vdp_next_vint_z80(gen->vdp) / MCLKS_PER_Z80; | 194 uint32_t vint_cycle = vdp_next_vint_z80(gen->vdp) / MCLKS_PER_Z80; |
195 while (z_context->current_cycle < z_context->sync_cycle) { | 195 while (z_context->current_cycle < z_context->sync_cycle) { |
196 if (z_context->iff1 && z_context->current_cycle < (vint_cycle + Z80_VINT_DURATION)) { | 196 if (z_context->iff1 && z_context->current_cycle < (vint_cycle + Z80_VINT_DURATION)) { |
197 z_context->int_cycle = vint_cycle < z_context->int_enable_cycle ? z_context->int_enable_cycle : vint_cycle; | 197 z_context->int_cycle = vint_cycle < z_context->int_enable_cycle ? z_context->int_enable_cycle : vint_cycle; |
198 } else { | |
199 z_context->int_cycle = CYCLE_NEVER; | |
198 } | 200 } |
199 z_context->target_cycle = z_context->sync_cycle < z_context->int_cycle ? z_context->sync_cycle : z_context->int_cycle; | 201 z_context->target_cycle = z_context->sync_cycle < z_context->int_cycle ? z_context->sync_cycle : z_context->int_cycle; |
200 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); | 202 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); |
201 z_context->run(z_context); | 203 z_context->run(z_context); |
202 dprintf("Z80 ran to cycle %d\n", z_context->current_cycle); | 204 dprintf("Z80 ran to cycle %d\n", z_context->current_cycle); |