diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-02-07 09:43:25 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-02-07 09:43:25 -0800 |
commit | 201639b58bf8b6c3ebbed8c33778c9c9c0a691ce (patch) | |
tree | f9a20e3d951f5b73f6c7d96d0092ed8848c1a702 /ztestrun.c | |
parent | e32a04deadb4f861efc34ffcd24ac405511bec47 (diff) |
Added init functions to z80_util.c so new Z80 core is closer to a drop in replacement for the old one
Diffstat (limited to 'ztestrun.c')
-rw-r--r-- | ztestrun.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -96,15 +96,9 @@ int main(int argc, char ** argv) exit(1); } fclose(f); + init_z80_opts(&opts, z80_map, 2, port_map, 1, 1, 0xFF); + context = init_z80_context(&opts); #ifdef NEW_CORE - memset(&opts, 0, sizeof(opts)); - opts.gen.memmap = z80_map; - opts.gen.memmap_chunks = 2; - opts.gen.address_mask = 0xFFFF; - opts.gen.max_address = 0xFFFF; - opts.gen.clock_divider = 1; - context = calloc(1, sizeof(z80_context)); - context->opts = &opts; z80_execute(context, 1000); printf("A: %X\nB: %X\nC: %X\nD: %X\nE: %X\nHL: %X\nIX: %X\nIY: %X\nSP: %X\n\nIM: %d, IFF1: %d, IFF2: %d\n", context->main[7], context->main[0], context->main[1], @@ -124,8 +118,6 @@ int main(int argc, char ** argv) context->alt[2], context->alt[3], (context->alt[4] << 8) | context->alt[5]); #else - init_z80_opts(&opts, z80_map, 2, port_map, 1, 1, 0xFF); - context = init_z80_context(&opts); //Z80 RAM context->mem_pointers[0] = z80_ram; if (retranslate) { |