diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-12-14 20:20:34 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-12-14 20:20:34 -0800 |
commit | 89c0bad42f218afd9e4e7719dd3da65f1fe3ff55 (patch) | |
tree | 0d1a56e7eab049983b306bc70b0b97b5e6251f9a /genesis.c | |
parent | 54e71ce54fe55606ab62d7db53ab8f63f2514ca3 (diff) |
Fix Z80 interrupt pulse duration. Fixes inconsistent music playback speed in Sonic 2 introduced in 0.4.1
Diffstat (limited to 'genesis.c')
-rw-r--r-- | genesis.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -97,14 +97,13 @@ void adjust_int_cycle(m68k_context * context, vdp_context * v_context) #define dputs #endif -#define Z80_VINT_DURATION 128 - void z80_next_int_pulse(z80_context * z_context) { - genesis_context * gen = z_context->system; + genesis_context * gen = z_context->system; z_context->int_pulse_start = vdp_next_vint_z80(gen->vdp); - z_context->int_pulse_end = z_context->int_pulse_start + Z80_VINT_DURATION * MCLKS_PER_Z80; - } + //Notes in the Genesis Plus GX code suggest this is asserted for one line + z_context->int_pulse_end = z_context->int_pulse_start + MCLKS_LINE; +} void sync_z80(z80_context * z_context, uint32_t mclks) { |