summaryrefslogtreecommitdiff
path: root/trans.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-05-28 21:19:55 -0700
committerMichael Pavone <pavone@retrodev.com>2015-05-28 21:19:55 -0700
commitef033e39c170fe272a956b1417f217a0d3cce29c (patch)
tree0ca08ba1614e87cee73f4904ea362928565b2531 /trans.c
parent632c82bd63a13da242c90a5d93dfe7482a0bebe6 (diff)
parent6817ef558d165b50a9b08a337dd93c4f1f46304e (diff)
Merge windows branch with latest changes
Diffstat (limited to 'trans.c')
-rw-r--r--trans.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/trans.c b/trans.c
index 2f98e91..7251cb9 100644
--- a/trans.c
+++ b/trans.c
@@ -25,7 +25,6 @@ int main(int argc, char ** argv)
char disbuf[1024];
unsigned short * cur;
m68k_options opts;
- m68k_context context;
FILE * f = fopen(argv[1], "rb");
fseek(f, 0, SEEK_END);
filesize = ftell(f);
@@ -51,15 +50,15 @@ int main(int argc, char ** argv)
memmap[1].flags = MMAP_READ | MMAP_WRITE | MMAP_CODE;
memmap[1].buffer = malloc(64 * 1024);
memset(memmap[1].buffer, 0, 64 * 1024);
- init_m68k_opts(&opts, memmap, 2);
- init_68k_context(&context, opts.gen.native_code_map, &opts);
- context.mem_pointers[0] = memmap[0].buffer;
- context.mem_pointers[1] = memmap[1].buffer;
- context.target_cycle = context.sync_cycle = 0x80000000;
+ init_m68k_opts(&opts, memmap, 2, 1);
+ m68k_context * context = init_68k_context(&opts);
+ context->mem_pointers[0] = memmap[0].buffer;
+ context->mem_pointers[1] = memmap[1].buffer;
+ context->target_cycle = context->sync_cycle = 0x80000000;
uint32_t address;
address = filebuf[2] << 16 | filebuf[3];
- translate_m68k_stream(address, &context);
- m68k_reset(&context);
+ translate_m68k_stream(address, context);
+ m68k_reset(context);
return 0;
}