summaryrefslogtreecommitdiff
path: root/z80_to_x86.c
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-06-02 20:14:27 -0700
committerMike Pavone <pavone@retrodev.com>2013-06-02 20:14:27 -0700
commit33231cf8278cc271c129f4ee5c0a29e639b7873a (patch)
tree9a62af4d84ba584ed2386df9d46c4315bf91ebd2 /z80_to_x86.c
parent5a5a2c5df628197a5ab4dcce7124d8c0cb9a7d68 (diff)
Bunch of Z80 debugger improvements
Diffstat (limited to 'z80_to_x86.c')
-rw-r--r--z80_to_x86.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c
index bd9892f..2b8c7ed 100644
--- a/z80_to_x86.c
+++ b/z80_to_x86.c
@@ -1995,7 +1995,10 @@ void zinsert_breakpoint(z80_context * context, uint16_t address, uint8_t * bp_ha
dst = cmp_rr(dst, ZCYCLES, ZLIMIT, SZ_D);
uint8_t * jmp_off = dst+1;
dst = jcc(dst, CC_NC, dst + 7);
- dst = call(dst, (uint8_t *)z80_handle_cycle_limit_int);
+ dst = pop_r(dst, SCRATCH1);
+ dst = add_ir(dst, check_int_size - (native-start_native), SCRATCH1, SZ_Q);
+ dst = push_r(dst, SCRATCH1);
+ dst = jmp(dst, (uint8_t *)z80_handle_cycle_limit_int);
*jmp_off = dst - (jmp_off+1);
//jump back to body of translated instruction
dst = pop_r(dst, SCRATCH1);