# HG changeset patch # User Michael Pavone # Date 1550684532 28800 # Node ID 1dc718581aac6552b6de3a172a43849addad3799 # Parent 7b6831305a6a8d9e4c2bc71243cc525d5dd54bda Fix Z80 interrupts in Gen/MD mode when using new core. Disable CPU debug log in new Z80 core diff -r 7b6831305a6a -r 1dc718581aac genesis.c --- 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 diff -r 7b6831305a6a -r 1dc718581aac z80.cpu --- 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