Mercurial > repos > blastem
changeset 1755:28635b733d97
Add appropriate cycles for IO access
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 15 Feb 2019 23:58:55 -0800 |
parents | 043cf458704c |
children | 093e323dc683 |
files | z80_util.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/z80_util.c Fri Feb 15 23:58:34 2019 -0800 +++ b/z80_util.c Fri Feb 15 23:58:55 2019 -0800 @@ -32,6 +32,7 @@ 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 @@ 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;