X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/blobdiff_plain/f6eb33e689fbe0fd88d910b23b62a4e64ecf87cb..0029c5072f864788020340eab0ed9600ac0f8f4a:/src/jaguar.cpp?ds=sidebyside diff --git a/src/jaguar.cpp b/src/jaguar.cpp index 69a22d5..6e4b04a 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 & unimplemented instruction, unknown exceptions 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,9 +1464,21 @@ 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; + + case 0x2c: + m68k_read_exception_vector(address, "Unimplemented instruction"); + break; + + default: + m68k_read_exception_vector(address, "Exception not referenced"); + break; } } else