diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-02-15 23:58:55 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-02-15 23:58:55 -0800 |
commit | 4784cb411803b79cdfdf49d3c248c6f69229a913 (patch) | |
tree | 6c0521fd1e674b2f70aa485cfd4d5425dbb53f94 /z80_util.c | |
parent | 9ddf999c06c6a24ab425130de7f01a01f6fa14fa (diff) |
Add appropriate cycles for IO access
Diffstat (limited to 'z80_util.c')
-rw-r--r-- | z80_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -32,6 +32,7 @@ void z80_io_read8(z80_context *context) context->opts->gen.memmap = context->io_map; context->opts->gen.memmap_chunks = context->io_chunks; + context->cycles += 4 * context->opts->gen.clock_divider; context->scratch1 = read_byte(context->scratch1, (void **)context->mem_pointers, &context->opts->gen, context); context->opts->gen.address_mask = tmp_mask; @@ -49,6 +50,7 @@ void z80_io_write8(z80_context *context) context->opts->gen.memmap = context->io_map; context->opts->gen.memmap_chunks = context->io_chunks; + context->cycles += 4 * context->opts->gen.clock_divider; write_byte(context->scratch2, context->scratch1, (void **)context->mem_pointers, &context->opts->gen, context); context->opts->gen.address_mask = tmp_mask; |