X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/blobdiff_plain/0cbc132e807d89562b81cdee20351aeb2bffb467..c4fe5864602982ced026178abdfe862eb2c5e1c5:/src/jaguar.cpp diff --git a/src/jaguar.cpp b/src/jaguar.cpp index 8a12558..da06a96 100644 --- a/src/jaguar.cpp +++ b/src/jaguar.cpp @@ -15,7 +15,8 @@ // 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 +// 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 +// JPM Aug./2019 Fix potential emulator freeze after an exception has occured // @@ -23,8 +24,8 @@ #include "jaguar.h" -#include -#include +//#include +#include #include #include #include "SDL_opengl.h" @@ -126,6 +127,7 @@ uint32_t bpmAddress1; S_BrkInfo *brkInfo; size_t brkNbr; +bool frameDone; // // Callback function to detect illegal instructions @@ -1471,7 +1473,17 @@ unsigned int m68k_read_memory_32(unsigned int address) 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; } + + frameDone = true; // Hack to avoid the freeze of the emulator } else { @@ -2571,7 +2583,6 @@ uint8_t * GetRamPtr(void) // New Jaguar execution stack // This executes 1 frame's worth of code. // -bool frameDone; void JaguarExecuteNew(void) { frameDone = false;