Mercurial > repos > blastem
comparison z80_util.c @ 1735:ca2336469397
Get new Z80 core running in CPM harness
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 03 Feb 2019 11:05:40 -0800 |
parents | 4fd84c3efc72 |
children | 48a43dff4dc0 |
comparison
equal
deleted
inserted
replaced
1734:88fbc4e711fd | 1735:ca2336469397 |
---|---|
11 write_byte(context->scratch2, context->scratch1, NULL, &context->opts->gen, context); | 11 write_byte(context->scratch2, context->scratch1, NULL, &context->opts->gen, context); |
12 } | 12 } |
13 | 13 |
14 void z80_io_read8(z80_context *context) | 14 void z80_io_read8(z80_context *context) |
15 { | 15 { |
16 uint32_t tmp_mask = context->opts->gen.address_mask; | |
17 memmap_chunk const *tmp_map = context->opts->gen.memmap; | |
18 uint32_t tmp_chunks = context->opts->gen.memmap_chunks; | |
19 | |
20 context->opts->gen.address_mask = context->io_mask; | |
21 context->opts->gen.memmap = context->io_map; | |
22 context->opts->gen.memmap_chunks = context->io_chunks; | |
23 | |
24 context->scratch1 = read_byte(context->scratch1, NULL, &context->opts->gen, context); | |
25 | |
26 context->opts->gen.address_mask = tmp_mask; | |
27 context->opts->gen.memmap = tmp_map; | |
28 context->opts->gen.memmap_chunks = tmp_chunks; | |
16 } | 29 } |
17 | 30 |
18 void z80_io_write8(z80_context *context) | 31 void z80_io_write8(z80_context *context) |
19 { | 32 { |
33 uint32_t tmp_mask = context->opts->gen.address_mask; | |
34 memmap_chunk const *tmp_map = context->opts->gen.memmap; | |
35 uint32_t tmp_chunks = context->opts->gen.memmap_chunks; | |
36 | |
37 context->opts->gen.address_mask = context->io_mask; | |
38 context->opts->gen.memmap = context->io_map; | |
39 context->opts->gen.memmap_chunks = context->io_chunks; | |
40 | |
41 write_byte(context->scratch2, context->scratch1, NULL, &context->opts->gen, context); | |
42 | |
43 context->opts->gen.address_mask = tmp_mask; | |
44 context->opts->gen.memmap = tmp_map; | |
45 context->opts->gen.memmap_chunks = tmp_chunks; | |
20 } | 46 } |