Mercurial > repos > blastem
comparison genesis.c @ 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 | 33ec5df77fac |
children | 8fe162bdb038 51417bb557b6 |
comparison
equal
deleted
inserted
replaced
1765:7b6831305a6a | 1766:1dc718581aac |
---|---|
299 genesis_context * gen = z_context->system; | 299 genesis_context * gen = z_context->system; |
300 #ifdef NEW_CORE | 300 #ifdef NEW_CORE |
301 z_context->int_cycle = vdp_next_vint_z80(gen->vdp); | 301 z_context->int_cycle = vdp_next_vint_z80(gen->vdp); |
302 z_context->int_end_cycle = z_context->int_cycle + Z80_INT_PULSE_MCLKS; | 302 z_context->int_end_cycle = z_context->int_cycle + Z80_INT_PULSE_MCLKS; |
303 z_context->int_value = 0xFF; | 303 z_context->int_value = 0xFF; |
304 z80_sync_cycle(z_context, z_context->sync_cycle); | |
304 #else | 305 #else |
305 z_context->int_pulse_start = vdp_next_vint_z80(gen->vdp); | 306 z_context->int_pulse_start = vdp_next_vint_z80(gen->vdp); |
306 z_context->int_pulse_end = z_context->int_pulse_start + Z80_INT_PULSE_MCLKS; | 307 z_context->int_pulse_end = z_context->int_pulse_start + Z80_INT_PULSE_MCLKS; |
307 z_context->im2_vector = 0xFF; | 308 z_context->im2_vector = 0xFF; |
308 #endif | 309 #endif |
311 static void sync_z80(z80_context * z_context, uint32_t mclks) | 312 static void sync_z80(z80_context * z_context, uint32_t mclks) |
312 { | 313 { |
313 #ifndef NO_Z80 | 314 #ifndef NO_Z80 |
314 if (z80_enabled) { | 315 if (z80_enabled) { |
315 #ifdef NEW_CORE | 316 #ifdef NEW_CORE |
316 z80_next_int_pulse(z_context); | 317 if (z_context->int_cycle == 0xFFFFFFFFU) { |
318 z80_next_int_pulse(z_context); | |
319 } | |
317 #endif | 320 #endif |
318 z80_run(z_context, mclks); | 321 z80_run(z_context, mclks); |
319 } else | 322 } else |
320 #endif | 323 #endif |
321 { | 324 { |