Mercurial > repos > blastem
changeset 1766:1dc718581aac
Fix Z80 interrupts in Gen/MD mode when using new core. Disable CPU debug log in new Z80 core
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 20 Feb 2019 09:42:12 -0800 |
parents | 7b6831305a6a |
children | 8a29c250f352 |
files | genesis.c z80.cpu |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/genesis.c Wed Feb 20 00:34:52 2019 -0800 +++ b/genesis.c Wed Feb 20 09:42:12 2019 -0800 @@ -301,6 +301,7 @@ z_context->int_cycle = vdp_next_vint_z80(gen->vdp); z_context->int_end_cycle = z_context->int_cycle + Z80_INT_PULSE_MCLKS; z_context->int_value = 0xFF; + z80_sync_cycle(z_context, z_context->sync_cycle); #else z_context->int_pulse_start = vdp_next_vint_z80(gen->vdp); z_context->int_pulse_end = z_context->int_pulse_start + Z80_INT_PULSE_MCLKS; @@ -313,7 +314,9 @@ #ifndef NO_Z80 if (z80_enabled) { #ifdef NEW_CORE - z80_next_int_pulse(z_context); + if (z_context->int_cycle == 0xFFFFFFFFU) { + z80_next_int_pulse(z_context); + } #endif z80_run(z_context, mclks); } else
--- a/z80.cpu Wed Feb 20 00:34:52 2019 -0800 +++ b/z80.cpu Wed Feb 20 09:42:12 2019 -0800 @@ -84,7 +84,7 @@ add 1 pc pc z80_run_op - printf "Z80: %X @ %d\n" pc cycles + #printf "Z80: %X @ %d\n" pc cycles #printf "Z80: %X - A: %X, B: %X, C: %X D: %X, E: %X, H: %X, L: %X, SP: %X, IX: %X, IY: %X @ %d\n" pc a b c d e h l sp ix iy cycles z80_op_fetch dispatch scratch1