From d69c8b5a0af2fefa260d8203b6ef60d4c5f7e2c0 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sun, 20 Jan 2013 19:10:29 -0800 Subject: Add support for breaking into the debugger while game is running --- runtime.S | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'runtime.S') diff --git a/runtime.S b/runtime.S index 88ed7c8..8c126fa 100644 --- a/runtime.S +++ b/runtime.S @@ -7,6 +7,7 @@ handle_cycle_limit: do_sync: call m68k_save_context mov %rsi, %rdi + xor %esi, %esi call sync_components mov %rax, %rsi call m68k_load_context @@ -51,7 +52,14 @@ already_supervisor: ret skip_int: cmp 84(%rsi), %eax - jnb do_sync + jb skip_sync_int + call m68k_save_context + mov %rsi, %rdi + mov %ecx, %esi + call sync_components + mov %rax, %rsi + call m68k_load_context +skip_sync_int: ret .global m68k_trap @@ -554,6 +562,7 @@ m68k_native_addr_and_sync: call m68k_save_context push %rcx mov %rsi, %rdi + xor %esi, %esi call sync_components pop %rsi push %rax -- cgit v1.2.3