Mercurial > repos > blastem
diff z80_util.c @ 1759:6e4faa10f9ee
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
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 19 Feb 2019 22:51:33 -0800 |
parents | 28635b733d97 |
children | 72540af9c90a |
line wrap: on
line diff
--- a/z80_util.c Sat Feb 16 13:15:09 2019 -0800 +++ b/z80_util.c Tue Feb 19 22:51:33 2019 -0800 @@ -91,7 +91,7 @@ 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 @@ 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)