summaryrefslogtreecommitdiff
path: root/ztestrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'ztestrun.c')
-rw-r--r--ztestrun.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/ztestrun.c b/ztestrun.c
index 42c934f..96a3738 100644
--- a/ztestrun.c
+++ b/ztestrun.c
@@ -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) {