diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-02-19 22:51:33 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-02-19 22:51:33 -0800 |
commit | a7792f6ea9784f9a085ecb50861f32082aa53518 (patch) | |
tree | e64293a6810c08026697c807843c8e8c3f6e3c98 /z80_util.c | |
parent | 405fd7b0318a6982339ef89ef1c066754adab1ee (diff) |
Store sync_cycle in context rather than in a local in CPU DSL. Fix the timing of a number of instructions in new Z80 core
Diffstat (limited to 'z80_util.c')
-rw-r--r-- | z80_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -91,7 +91,7 @@ z80_context * init_z80_context(z80_options *options) return context; } -uint32_t z80_sync_cycle(z80_context *context, uint32_t target_cycle) +void z80_sync_cycle(z80_context *context, uint32_t target_cycle) { if (context->iff1 && context->int_cycle < target_cycle) { if (context->cycles > context->int_end_cycle) { @@ -103,7 +103,7 @@ uint32_t z80_sync_cycle(z80_context *context, uint32_t target_cycle) if (context->nmi_cycle < target_cycle) { target_cycle = context->nmi_cycle; } - return target_cycle; + context->sync_cycle = target_cycle; } void z80_run(z80_context *context, uint32_t target_cycle) |