1.1 diff -r 73caf968b67b -r feee84e0b3bf src/musashi/m68kcpu.c 1.2 --- a/src/musashi/m68kcpu.c Tue Nov 20 23:31:03 2012 +0000 1.3 +++ b/src/musashi/m68kcpu.c Mon Jan 14 09:22:12 2013 +0000 1.4 @@ -641,10 +641,6 @@ 1.5 /* Main loop. Keep going until we run out of clock cycles */ 1.6 do 1.7 { 1.8 - if (BUS_ERROR_OCCURRED){ 1.9 - m68ki_jump_bus_error_vector(); 1.10 - BUS_ERROR_OCCURRED = 0; 1.11 - } 1.12 /* Set tracing accodring to T1. (T0 is done inside instruction) */ 1.13 m68ki_trace_t1(); /* auto-disable (see m68kcpu.h) */ 1.14 1.15 @@ -659,11 +655,18 @@ 1.16 1.17 /* Read an instruction and call its handler */ 1.18 REG_IR = m68ki_read_imm_16(); 1.19 - m68ki_instruction_jump_table[REG_IR](); 1.20 + if (!BUS_ERROR_OCCURRED){ 1.21 + m68ki_instruction_jump_table[REG_IR](); 1.22 + } 1.23 USE_CYCLES(CYC_INSTRUCTION[REG_IR]); 1.24 1.25 /* Trace m68k_exception, if necessary */ 1.26 m68ki_exception_if_trace(); /* auto-disable (see m68kcpu.h) */ 1.27 + 1.28 + if (BUS_ERROR_OCCURRED){ 1.29 + m68ki_jump_bus_error_vector(); 1.30 + BUS_ERROR_OCCURRED = 0; 1.31 + } 1.32 } while(GET_CYCLES() > 0); 1.33 1.34 /* set previous PC to current PC for the next entry into the loop */