minor 68k timing tuning
authornotaz <notasas@gmail.com>
Sat, 10 Aug 2013 14:58:23 +0000 (17:58 +0300)
committernotaz <notasas@gmail.com>
Sat, 10 Aug 2013 14:58:23 +0000 (17:58 +0300)
cpu/fame/famec.c
pico/32x/memory.c
pico/pico_cmn.c

index 616027c..1aba794 100644 (file)
@@ -929,6 +929,7 @@ famec_Exec:
                        u32 line;\r
                        m68kcontext.io_cycle_counter = cycles_needed;\r
                        cycles_needed = 0;\r
+                       if (m68kcontext.io_cycle_counter <= 0) goto famec_End;\r
                        line=interrupt_chk__();\r
                        if (line>0)\r
                        {\r
index fd6ff45..11b0462 100644 (file)
@@ -198,7 +198,7 @@ static u32 p32x_reg_read16(u32 a)
       Pico32x.comm_dirty_sh2 &= ~comreg;
     else if (m68k_poll_detect(a, cycles, P32XF_68KCPOLL)) {
       SekSetStop(1);
-      SekEndTimeslice(16);
+      SekEndRun(16);
     }
     dr2 = SekDar(2);
     goto out;
index 3383b13..2b558c1 100644 (file)
@@ -46,7 +46,7 @@ static __inline void SekRunM68k(int cyc)
 #elif defined(EMU_M68K)
   SekCycleCnt+=m68k_execute(cyc_do);
 #elif defined(EMU_F68K)
-  SekCycleCnt+=fm68k_emulate(cyc_do+1, 0, 0);
+  SekCycleCnt+=fm68k_emulate(cyc_do, 0, 0);
 #endif
 
 out: