#define CPU_HALT_PCI_CONFLICT 8
#define CPU_HALT_CPU_STUCK 9
#define CPU_HALT_SSP_IN_NON_EXISTING_ADDRESS 10
+#define CPU_HALT_INVALID_START_ADDRESS 11
void cpu_semaphore_get(void);
void cpu_semaphore_release(void);
event_wait = true;
unset_special(SPCFLAG_MODE_CHANGE);
+ if (!regs.halted) {
+ // check that PC points to something that looks like memory.
+ uaecptr pc = m68k_getpc();
+ addrbank *ab = get_mem_bank_real(pc);
+ if (ab == NULL || ab == &dummy_bank || (!currprefs.cpu_compatible && !valid_address(pc, 2)) || (pc & 1)) {
+ cpu_halt(CPU_HALT_INVALID_START_ADDRESS);
+ }
+ }
if (regs.halted) {
cpu_halt (regs.halted);
if (regs.halted < 0) {