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

Contents of /trunk/pcsx2/Vif_Unpack.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 148 - (show annotations) (download)
Fri Sep 10 17:22:32 2010 UTC (9 years, 4 months ago) by william
File MIME type: text/plain
File size: 2108 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.3746 local: v0.9.7.138) in ./trunk
1 /* 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, const u32 *data);
19 typedef int (*UNPACKPARTFUNCTYPESSE)(u32 *dest, const u32 *data, int size);
20
21 #define create_unpack_u_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_U##bits)(u32 *dest, const u##bits *data);
22 #define create_unpack_odd_u_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_ODD_U##bits)(u32 *dest, const u##bits *data, int size);
23 #define create_unpack_s_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_S##bits)(u32 *dest, const s##bits *data);
24 #define create_unpack_odd_s_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_ODD_S##bits)(u32 *dest, const s##bits *data, int size);
25
26 #define create_some_unpacks(bits) \
27 create_unpack_u_type(bits); \
28 create_unpack_odd_u_type(bits); \
29 create_unpack_s_type(bits); \
30 create_unpack_odd_s_type(bits);
31
32 create_some_unpacks(32);
33 create_some_unpacks(16);
34 create_some_unpacks(8);
35
36 struct VIFUnpackFuncTable
37 {
38 UNPACKFUNCTYPE funcU;
39 UNPACKFUNCTYPE funcS;
40
41 u8 gsize; // size of data in bytes used for each write cycle
42 u8 qsize; // used for unpack parts, num of vectors that
43 // will be decompressed from data for 1 cycle
44 };
45
46 extern const __aligned16 VIFUnpackFuncTable VIFfuncTable[32];
47
48 extern int nVifUnpack (int idx, const u8 *data);
49 extern void resetNewVif(int idx);
50
51 template< int idx >
52 extern void vifUnpackSetup(const u32 *data);

  ViewVC Help
Powered by ViewVC 1.1.22