PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
vif_codes.h
Go to the documentation of this file.
1
6
#ifndef __VIF_CODES_H__
7
#define __VIF_CODES_H__
8
9
#include <
tamtypes.h
>
10
12
#define VIF_CMD_NOP 0x00
14
#define VIF_CMD_STCYCL 0x01
16
#define VIF_CMD_OFFSET 0x02
18
#define VIF_CMD_BASE 0x03
20
#define VIF_CMD_ITOP 0x04
22
#define VIF_CMD_STMOD 0x05
24
#define VIF_CMD_MSKPATH3 0x06
26
#define VIF_CMD_MARK 0x07
28
#define VIF_CMD_FLUSHE 0x10
30
#define VIF_CMD_FLUSH 0x11
32
#define VIF_CMD_FLUSHA 0x13
34
#define VIF_CMD_MSCAL 0x14
36
#define VIF_CMD_MSCNT 0x17
38
#define VIF_CMD_MSCALF 0x15
40
#define VIF_CMD_STMASK 0x20
42
#define VIF_CMD_STROW 0x30
44
#define VIF_CMD_STCOL 0x31
46
#define VIF_CMD_MPG 0x4A
48
#define VIF_CMD_DIRECT 0x50
50
#define VIF_CMD_DIRECTHL 0x51
51
52
53
#define PACK_VIFTAG(Q, W0, W1, W2, W3) \
54
Q->sw[0] = (u32)(W0), \
55
Q->sw[1] = (u32)(W1), \
56
Q->sw[2] = (u32)(W2), \
57
Q->sw[3] = (u32)(W3)
58
60
#define VIF_CMD_UNPACK(M, VN, VL) \
61
(u32)((VL)&0x00000003) << 0 | (u32)((VN)&0x00000003) << 2 | \
62
(u32)((M)&0x00000001) << 4 | (u32)((3) & 0x00000003) << 5
63
64
#define STCYCL_IMDT(CL, WL) \
65
(u32)((CL)&0x000000FF) << 0 | (u32)((WL)&0x000000FF) << 8
66
67
#define OFFSET_IMDT(OFFSET) \
68
(u32)((OFFSET)&0x000003FF)
69
70
#define BASE_IMDT(BASE) \
71
(u32)((BASE)&0x000003FF)
72
73
#define ITOP_IMDT(ADDR) \
74
(u32)((ADDR)&0x000003FF)
75
76
#define STMOD_IMDT(MODE) \
77
(u32)((MODE)&0x00000003)
78
79
#define MSKPATH3_IMDT(MASK) \
80
(u32)((MASK)&0x00000001) << 15
81
82
#define MARK_IMDT(MARK) \
83
(u32)((MARK)&0x0000FFFF)
84
85
#define MSCAL_IMDT(EXECADDR) \
86
(u32)((EXECADDR)&0x0000FFFF)
87
88
#define MSCALF_IMDT(EXECADDR) \
89
(u32)((EXECADDR)&0x0000FFFF)
90
91
#define MPG_IMDT(LOADADDR) \
92
(u32)((LOADADDR)&0x0000FFFF)
93
94
#define MPG_NUM(SIZE) \
95
(u32)((SIZE)&0x000000FF) << 16
96
97
#define DIRECT_IMDT(SIZE) \
98
(u32)((SIZE)&0x0000FFFF)
99
100
#define DIRECTHL_IMDT(EXECADDR) \
101
(u32)((EXECADDR)&0x0000FFFF)
102
103
#define UNPACK_IMDT(ADDR, USN, FLG) \
104
(u32)((ADDR)&0x000003FF) << 0 | (u32)((USN)&0x00000001) << 14 | \
105
(u32)((FLG)&0x00000001) << 15
106
107
#define UNPACK_NUM(SIZE) \
108
(u32)((SIZE)&0x000000FF) << 16
109
110
#define VIF_CODE(IMDT, NUM, CMD, IRQ) \
111
(u32)((IMDT)&0x0000FFFF) << 0 | (u32)((NUM)&0x000000FF) << 16 | \
112
(u32)((CMD)&0x000000FF) << 24 | (u32)((IRQ)&0x00000001) << 31
113
114
#endif
/* __VIF_CODES_H__ */
tamtypes.h
common
include
vif_codes.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8