From 0cbc132e807d89562b81cdee20351aeb2bffb467 Mon Sep 17 00:00:00 2001 From: Jean-Paul Mari Date: Mon, 19 Aug 2019 22:07:52 -0400 Subject: [PATCH] Added a specific breakpoint for the M68K address error exception --- docs/vj_HistoryNotes.txt | 2 ++ src/jaguar.cpp | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/vj_HistoryNotes.txt b/docs/vj_HistoryNotes.txt index ecefb68..c427baa 100644 --- a/docs/vj_HistoryNotes.txt +++ b/docs/vj_HistoryNotes.txt @@ -4,6 +4,8 @@ Release 5 (TBA) - This date already appears in the Release 4 executable but was not referenced in his history note 1) Added a specific breakpoint for the M68K illegal instruction exception -- Alert box will display a message and then the code will stop +2) Added a specific breakpoint for the M68K address error exception +-- Alert box will display a message and then the code will stop Release 4a (15th August 2019) ----------------------------- diff --git a/src/jaguar.cpp b/src/jaguar.cpp index 69a22d5..8a12558 100644 --- a/src/jaguar.cpp +++ b/src/jaguar.cpp @@ -15,6 +15,7 @@ // JLH 11/25/2009 Major rewrite of memory subsystem and handlers // JPM 09/04/2018 Added the new Models and BIOS handler // JPM 10/13/2018 Added breakpoints features +// JPM Aug./2019 Fix specific breakpoint for ROM cartridge or unknown memory location writing; added a specific breakpoint for the M68K illegal instruction and address error exceptions // @@ -1424,7 +1425,11 @@ bool m68k_read_exception_vector(unsigned int address, char *text) QString msg; QMessageBox msgBox; - msg.sprintf("$%06x: %s", pcQueue[pcQPtr ? (pcQPtr - 1) : 0x3FF], text); +#if 0 + msg.sprintf("68000 exception\n%s at $%06x", text, pcQueue[pcQPtr ? (pcQPtr - 1) : 0x3FF]); +#else + msg.sprintf("68000 exception\n$%06x: %s", pcQueue[pcQPtr ? (pcQPtr - 1) : 0x3FF], text); +#endif msgBox.setText(msg); msgBox.setStandardButtons(QMessageBox::Abort); msgBox.setDefaultButton(QMessageBox::Abort); @@ -1459,6 +1464,10 @@ unsigned int m68k_read_memory_32(unsigned int address) { switch (address) { + case 0x0c: + m68k_read_exception_vector(address, "Address error"); + break; + case 0x10: m68k_read_exception_vector(address, "Illegal instruction"); break; -- 2.20.1