1 /* Pcsx - Pc Psx Emulator
2 * Copyright (C) 1999-2003 Pcsx Team
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA
26 int psxCP2time[64] = {
27 2, 16 , 1 , 1, 1, 1 , 8, 1, // 00
28 1 , 1 , 1 , 1, 6 , 1 , 1 , 1, // 08
29 8 , 8, 8, 19, 13 , 1 , 44 , 1, // 10
30 1 , 1 , 1 , 17, 11 , 1 , 14 , 1, // 18
31 30 , 1 , 1 , 1, 1, 1 , 1 , 1, // 20
32 5 , 8 , 17 , 1, 1, 5, 6, 1, // 28
33 23 , 1 , 1 , 1, 1, 1 , 1 , 1, // 30
34 1 , 1 , 1 , 1, 1, 6 , 5 , 39 // 38
39 static void rec##f() { \
40 if (pc < cop2readypc) idlecyclecount += (cop2readypc - pc)>>2; \
42 LIW(0, (u32)psxRegs.code); \
43 STW(0, OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); \
45 CALLFunc ((u32)gte##f); \
46 cop2readypc = pc + psxCP2time[_fFunct_(psxRegs.code)]<<2; \
49 #define CP2_FUNCNC(f) \
51 static void rec##f() { \
52 if (pc < cop2readypc) idlecyclecount += (cop2readypc - pc)>>2; \
54 CALLFunc ((u32)gte##f); \
56 cop2readypc = pc + psxCP2time[_fFunct_(psxRegs.code)]; \