/[pcsx2_0.9.7]/trunk/pcsx2/VUops.h
ViewVC logotype

Annotation of /trunk/pcsx2/VUops.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (hide annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (9 years, 11 months ago) by william
File MIME type: text/plain
File size: 2344 byte(s)
Auto Commited Import of: pcsx2-0.9.7-r3738-debug in ./trunk
1 william 31 /* PCSX2 - PS2 Emulator for PCs
2     * Copyright (C) 2002-2010 PCSX2 Dev Team
3     *
4     * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5     * of the GNU Lesser General Public License as published by the Free Software Found-
6     * ation, either version 3 of the License, or (at your option) any later version.
7     *
8     * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9     * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10     * PURPOSE. See the GNU General Public License for more details.
11     *
12     * You should have received a copy of the GNU General Public License along with PCSX2.
13     * If not, see <http://www.gnu.org/licenses/>.
14     */
15    
16     #pragma once
17     #include "VU.h"
18     #include "VUflags.h"
19    
20     #define float_to_int4(x) (s32)((float)x * (1.0f / 0.0625f))
21     #define float_to_int12(x) (s32)((float)x * (1.0f / 0.000244140625f))
22     #define float_to_int15(x) (s32)((float)x * (1.0f / 0.000030517578125))
23    
24     #define int4_to_float(x) (float)((float)x * 0.0625f)
25     #define int12_to_float(x) (float)((float)x * 0.000244140625f)
26     #define int15_to_float(x) (float)((float)x * 0.000030517578125)
27    
28     #define MAC_Reset( VU ) VU->VI[REG_MAC_FLAG].UL = VU->VI[REG_MAC_FLAG].UL & (~0xFFFF)
29    
30 william 62 struct _VURegsNum {
31     u8 pipe; // if 0xff, COP2
32     u8 VFwrite;
33     u8 VFwxyzw;
34     u8 VFr0xyzw;
35     u8 VFr1xyzw;
36     u8 VFread0;
37     u8 VFread1;
38     u32 VIwrite;
39     u32 VIread;
40     int cycles;
41     };
42    
43     #define __vuRegsCall __fastcall
44     typedef void __vuRegsCall FnType_VuRegsN(_VURegsNum *VUregsn);
45     typedef FnType_VuRegsN* Fnptr_VuRegsN;
46    
47     extern __aligned16 const Fnptr_Void VU0_LOWER_OPCODE[128];
48     extern __aligned16 const Fnptr_Void VU0_UPPER_OPCODE[64];
49     extern __aligned16 const Fnptr_VuRegsN VU0regs_LOWER_OPCODE[128];
50     extern __aligned16 const Fnptr_VuRegsN VU0regs_UPPER_OPCODE[64];
51    
52     extern __aligned16 const Fnptr_Void VU1_LOWER_OPCODE[128];
53     extern __aligned16 const Fnptr_Void VU1_UPPER_OPCODE[64];
54     extern __aligned16 const Fnptr_VuRegsN VU1regs_LOWER_OPCODE[128];
55     extern __aligned16 const Fnptr_VuRegsN VU1regs_UPPER_OPCODE[64];
56    
57 william 31 extern void _vuTestPipes(VURegs * VU);
58     extern void _vuTestUpperStalls(VURegs * VU, _VURegsNum *VUregsn);
59     extern void _vuTestLowerStalls(VURegs * VU, _VURegsNum *VUregsn);
60     extern void _vuAddUpperStalls(VURegs * VU, _VURegsNum *VUregsn);
61     extern void _vuAddLowerStalls(VURegs * VU, _VURegsNum *VUregsn);

  ViewVC Help
Powered by ViewVC 1.1.22