#endif\r
\r
if (!initialised)\r
- fm68k_emulate(0, 0, 0);\r
+ fm68k_emulate(0, 0);\r
\r
#ifdef FAMEC_DEBUG\r
puts("FAME initialized.");\r
int fm68k_reset(void)\r
{\r
if (!initialised)\r
- fm68k_emulate(0, 0, 0);\r
+ fm68k_emulate(0, 0);\r
\r
// Si la CPU esta en ejecucion, salir con M68K_RUNNING\r
if (m68kcontext.execinfo & M68K_RUNNING)\r
// main exec function\r
//////////////////////\r
\r
-int fm68k_emulate(s32 cycles, int dualcore, int idle_mode)\r
+int fm68k_emulate(s32 cycles, int idle_mode)\r
{\r
#ifndef FAMEC_NO_GOTOS\r
u32 Opcode;\r
}\r
\r
#ifdef PICODRIVE_HACK\r
- if (dualcore) goto dualcore_mode;\r
if (idle_mode == 1) goto idle_install;\r
else if (idle_mode == 2) goto idle_remove;\r
-famec_restart:\r
#endif\r
\r
// won't emulate double fault\r
printf("pc: 0x%08x\n",m68kcontext.pc);\r
#endif\r
\r
-#ifdef PICODRIVE_HACK\r
- if (!dualcore)\r
-#endif\r
- return cycles - m68kcontext.io_cycle_counter;\r
-\r
-#ifdef PICODRIVE_HACK\r
-dualcore_mode:\r
-\r
- while (1)\r
- {\r
- extern int SekCycleAim, SekCycleCnt, SekCycleAimS68k, SekCycleCntS68k;\r
- #define PS_STEP_M68K ((488<<16)/20) // ~24\r
- if (dualcore == 1)\r
- {\r
- dualcore = (488<<16); // ~ cycn in Pico.c\r
- // adjust for first iteration\r
- g_m68kcontext = &PicoCpuFS68k;\r
- cycles = m68kcontext.io_cycle_counter = 0;\r
- }\r
- if (g_m68kcontext == &PicoCpuFS68k)\r
- {\r
- SekCycleCntS68k += cycles - m68kcontext.io_cycle_counter;\r
- // end?\r
- dualcore -= PS_STEP_M68K;\r
- if (dualcore < 0) return 0;\r
- // become main 68k\r
- g_m68kcontext = &PicoCpuFM68k;\r
- if ((cycles = SekCycleAim-SekCycleCnt-(dualcore>>16)) > 0)\r
- {\r
- if ((m68kcontext.execinfo & FM68K_HALTED) && m68kcontext.interrupts[0] <= (M68K_PPL))\r
- SekCycleCnt += cycles; // halted\r
- else goto famec_restart;\r
- //else { printf("go main %i\n", cycles); goto famec_restart; }\r
- }\r
- cycles = m68kcontext.io_cycle_counter = 0;\r
- }\r
- if (g_m68kcontext == &PicoCpuFM68k)\r
- {\r
- int cycn_s68k = (dualcore + dualcore/2 + dualcore/8) >> 16;\r
- SekCycleCnt += cycles - m68kcontext.io_cycle_counter;\r
- // become sub 68k\r
- g_m68kcontext = &PicoCpuFS68k;\r
- if ((cycles = SekCycleAimS68k-SekCycleCntS68k-cycn_s68k) > 0)\r
- {\r
- if ((m68kcontext.execinfo & FM68K_HALTED) && m68kcontext.interrupts[0] <= (M68K_PPL))\r
- SekCycleCntS68k += cycles; // halted\r
- else goto famec_restart;\r
- }\r
- cycles = m68kcontext.io_cycle_counter = 0;\r
- }\r
- }\r
-#endif\r
+ return cycles - m68kcontext.io_cycle_counter;\r
\r
init_jump_table:\r
{\r
#elif defined(EMU_M68K)\r
SekCycleCnt+=m68k_execute(1);\r
#elif defined(EMU_F68K)\r
- SekCycleCnt+=fm68k_emulate(1, 0, 0);\r
+ SekCycleCnt+=fm68k_emulate(1, 0);\r
#endif\r
}\r
\r
CycloneInitIdle();\r
#endif\r
#ifdef EMU_F68K\r
- fm68k_emulate(0, 0, 1);\r
+ fm68k_emulate(0, 1);\r
#endif\r
}\r
\r
CycloneFinishIdle();\r
#endif\r
#ifdef EMU_F68K\r
- fm68k_emulate(0, 0, 2);\r
+ fm68k_emulate(0, 2);\r
#endif\r
while (idledet_count > 0)\r
{\r