summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fib.s683
-rw-r--r--m68k_to_x86.c8
-rw-r--r--trans.c2
3 files changed, 11 insertions, 2 deletions
diff --git a/fib.s68 b/fib.s68
index 2b91a6c..665a9b7 100644
--- a/fib.s68
+++ b/fib.s68
@@ -1,4 +1,5 @@
- lea 0, a7
+ dc.l $0, start
+start:
moveq #10, d0
bsr fib
illegal
diff --git a/m68k_to_x86.c b/m68k_to_x86.c
index ab4d286..296f929 100644
--- a/m68k_to_x86.c
+++ b/m68k_to_x86.c
@@ -786,6 +786,14 @@ void start_68k_context(m68k_context * context, uint32_t address)
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;
diff --git a/trans.c b/trans.c
index 0b6e25e..634513d 100644
--- a/trans.c
+++ b/trans.c
@@ -34,6 +34,6 @@ int main(int argc, char ** argv)
//work RAM
context.mem_pointers[1] = malloc(64 * 1024);
translate_m68k_stream(transbuf, transbuf + size, 0, &context);
- start_68k_context(&context, 0);
+ m68k_reset(&context);
return 0;
}