From 6a996613a90dd9fa584f1b8d2f3f9eaabec6efff Mon Sep 17 00:00:00 2001 From: kub Date: Sat, 15 Jun 2024 09:25:42 +0000 Subject: [PATCH] 68k, minor debug fix for fame --- cpu/fame/famec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cpu/fame/famec.c b/cpu/fame/famec.c index 18839c71..b0ee0f07 100644 --- a/cpu/fame/famec.c +++ b/cpu/fame/famec.c @@ -228,7 +228,7 @@ #define ROR_33(A, C) (LSR_32(A, C) | LSL_32(A, 33-(C))) #ifndef FAMEC_NO_GOTOS -#define NEXT do { \ +#define NEXT { \ FETCH_WORD(Opcode); \ goto *JumpTable[Opcode]; \ } @@ -799,6 +799,8 @@ int fm68k_emulate(M68K_CONTEXT *ctx, int cycles, fm68k_call_reason reason) case fm68k_reason_emulate: break; } + PC = ctx->PC; + BasePC = ctx->BasePC; #endif // FAMEC_NO_GOTOS // won't emulate double fault @@ -932,6 +934,10 @@ famec_Exec: famec_End: ctx->sr = GET_SR; ctx->pc = GET_PC; +#ifndef FAMEC_NO_GOTOS + ctx->PC = PC; + ctx->BasePC = BasePC; +#endif ctx->execinfo &= ~M68K_RUNNING; -- 2.39.5