From 7c86f756ec8493eecb71bb58a0321e38284d7a7f Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 22 Apr 2018 13:35:32 +0300 Subject: [PATCH] Fix debugger fa-command, fix crash if statefile without FPU is loaded and then FPU instruction is disassembled. --- debug.cpp | 2 +- newcpu.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debug.cpp b/debug.cpp index e25e71e9..d6f40cc3 100644 --- a/debug.cpp +++ b/debug.cpp @@ -5069,7 +5069,7 @@ static void find_ea (TCHAR **inptr) dea = 0xffffffff; m68k_disasm_ea (addr, NULL, 1, &sea, &dea, 0xffffffff); if (ea == sea || ea == dea) { - m68k_disasm (addr, NULL, 1, 0xffffffff); + m68k_disasm (addr, NULL, 0xffffffff, 1); hits++; if (hits > 100) { console_out_f (_T("Too many hits. End addr = %08X\n"), addr); diff --git a/newcpu.cpp b/newcpu.cpp index ddbf4323..967ebfea 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -7410,7 +7410,7 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int cn if (!table68k) return; while (cnt-- > 0) { - TCHAR instrname[100], *ccpt; + TCHAR instrname[256], *ccpt; TCHAR segout[256], segname[256]; int i; uae_u32 opcode; @@ -8259,6 +8259,8 @@ static void fill_prefetch_quick (void) void restore_cpu_finish (void) { + if (!currprefs.fpu_model) + fpu_reset(); init_m68k (); m68k_setpc_normal (regs.pc); doint (); -- 2.47.3