--- tme/ic/m68k/m68k-execute.c 2018/04/24 16:43:47 1.1.1.5 +++ tme/ic/m68k/m68k-execute.c 2018/04/24 16:45:39 1.1.1.6 @@ -1,4 +1,4 @@ -/* $Id: m68k-execute.c,v 1.1.1.5 2018/04/24 16:43:47 root Exp $ */ +/* $Id: m68k-execute.c,v 1.1.1.6 2018/04/24 16:45:39 root Exp $ */ /* ic/m68k/m68k-execute.c - executes Motorola 68k instructions: */ @@ -33,7 +33,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -_TME_RCSID("$Id: m68k-execute.c,v 1.1.1.5 2018/04/24 16:43:47 root Exp $"); +_TME_RCSID("$Id: m68k-execute.c,v 1.1.1.6 2018/04/24 16:45:39 root Exp $"); /* includes: */ #include "m68k-auto.h" @@ -112,6 +112,9 @@ do { \ #endif /* TME_THREADS_COOPERATIVE */ } + if (ic->_tme_m68k_mode == TME_M68K_MODE_DIE) + return; + #ifdef _TME_M68K_EXECUTE_FAST /* get our instruction TLB entry and reload it: */ @@ -152,6 +155,14 @@ do { \ /* the execution loop: */ for (;;) { +#if 0 + extern int _m68k_dead; + if (_m68k_dead) { + extern void tme_m68k_kill_cpu(struct tme_m68k *ic); + tme_m68k_kill_cpu(ic); + } +#endif + /* reset for this instruction: */ #ifdef _TME_M68K_EXECUTE_FAST fetch_fast_next = tlb->tme_m68k_tlb_emulator_off_read + ic->tme_m68k_ireg_pc; @@ -830,6 +841,21 @@ do { \ /* an instruction has ended: */ tme_m68k_verify_end(ic, func); +#if 1 + if ((int)ic->tme_m68k_ireg_pc < 0x80000) + { + extern int printf(const char *format, ...); + //printf("finished %08x\n", (int)ic->tme_m68k_ireg_pc); + + if ((int)ic->tme_m68k_ireg_pc == 0x3c3c0) { +#ifdef _TME_M68K_EXECUTE_FAST +#else + printf("blammo; old %x\n", (int)exceptions); + exceptions |= TME_M68K_EXCEPTION_BERR; +#endif + } + } +#endif /* update the PC: */ ic->tme_m68k_ireg_pc = ic->tme_m68k_ireg_pc_next; TME_M68K_SEQUENCE_START;