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

Annotation of /trunk/pcsx2/Vif_Unpack.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (hide annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (10 years, 4 months ago) by william
File MIME type: text/plain
File size: 2481 byte(s)
committing r3113 initial commit again...
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    
18     typedef void (__fastcall *UNPACKFUNCTYPE)(u32 *dest, u32 *data);
19     typedef void (__fastcall *UNPACKFUNCTYPE_ODD)(u32 *dest, u32 *data, int size);
20     typedef int (*UNPACKPARTFUNCTYPESSE)(u32 *dest, u32 *data, int size);
21    
22     #define create_unpack_u_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_U##bits)(u32 *dest, u##bits *data);
23     #define create_unpack_odd_u_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_ODD_U##bits)(u32 *dest, u##bits *data, int size);
24     #define create_unpack_s_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_S##bits)(u32 *dest, s##bits *data);
25     #define create_unpack_odd_s_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_ODD_S##bits)(u32 *dest, s##bits *data, int size);
26    
27     #define create_some_unpacks(bits) \
28     create_unpack_u_type(bits); \
29     create_unpack_odd_u_type(bits); \
30     create_unpack_s_type(bits); \
31     create_unpack_odd_s_type(bits);
32    
33     create_some_unpacks(32);
34     create_some_unpacks(16);
35     create_some_unpacks(8);
36    
37     struct VIFUnpackFuncTable
38     {
39     UNPACKFUNCTYPE funcU;
40     UNPACKFUNCTYPE funcS;
41    
42     UNPACKFUNCTYPE_ODD oddU; // needed for old-style vif only, remove when old vif is removed.
43     UNPACKFUNCTYPE_ODD oddS; // needed for old-style vif only, remove when old vif is removed.
44    
45     u8 bsize; // currently unused
46     u8 dsize; // byte size of one channel
47     u8 gsize; // size of data in bytes used for each write cycle
48     u8 qsize; // used for unpack parts, num of vectors that
49     // will be decompressed from data for 1 cycle
50     };
51    
52     extern const __aligned16 VIFUnpackFuncTable VIFfuncTable[32];
53    
54     extern int nVifUnpack (int idx, u8 *data);
55     extern void initNewVif (int idx);
56     extern void resetNewVif(int idx);
57    
58     extern __forceinline void vif0UnpackSetup(u32 *data);
59     extern __forceinline void vif1UnpackSetup(u32 *data);

  ViewVC Help
Powered by ViewVC 1.1.22