menu: add reset hotkey
[picodrive.git] / cpu / musashi / m68kcpu.c
index 7564c11..38469f3 100644 (file)
@@ -808,7 +808,7 @@ int m68k_execute(int num_cycles)
                // notaz\r
                m68ki_trace_t1();\r
 \r
-               while(GET_CYCLES() >= 0)\r
+               while(GET_CYCLES() > 0)\r
 //             do\r
                {\r
                        /* Set tracing accodring to T1. (T0 is done inside instruction) */\r
@@ -825,13 +825,15 @@ int m68k_execute(int num_cycles)
 \r
                        /* Read an instruction and call its handler */\r
                        REG_IR = m68ki_read_imm_16();\r
-                       USE_CYCLES(CYC_INSTRUCTION[REG_IR]); // notaz\r
                        m68ki_instruction_jump_table[REG_IR]();\r
+                       USE_CYCLES(CYC_INSTRUCTION[REG_IR]); // moving this up may cause a deadlock\r
 \r
                        /* Trace m68k_exception, if necessary */\r
                        m68ki_exception_if_trace(); /* auto-disable (see m68kcpu.h) */\r
 \r
                        m68ki_trace_t1(); /* notaz */\r
+\r
+                       m68ki_cpu_p->not_polling = 1;\r
                } // while(GET_CYCLES() > 0); // notaz\r
 \r
                /* set previous PC to current PC for the next entry into the loop */\r