diff m68k_to_x86.c @ 19:4717146a7606

Initial support for M68k reset vector, rather than starting at an arbitrary address
author Mike Pavone <pavone@retrodev.com>
date Tue, 04 Dec 2012 19:25:54 -0800
parents 3e7bfde7606e
children f2aaaf36c875
line wrap: on
line diff
--- a/m68k_to_x86.c	Tue Dec 04 19:13:12 2012 -0800
+++ b/m68k_to_x86.c	Tue Dec 04 19:25:54 2012 -0800
@@ -786,6 +786,14 @@
 	m68k_start_context(addr, context);
 }
 
+void m68k_reset(m68k_context * context)
+{
+    //TODO: Make this actually use the normal read functions
+    context->aregs[7] = context->mem_pointers[0][0] << 16 | context->mem_pointers[0][1];
+    uint32_t address = context->mem_pointers[0][2] << 16 | context->mem_pointers[0][3];
+    start_68k_context(context, address);
+}
+
 void init_x86_68k_opts(x86_68k_options * opts)
 {
 	opts->flags = 0;