PS2SDK
PS2 Homebrew Libraries
gif_registers.h
Go to the documentation of this file.
1 
6 #ifndef __GIF_REGISTERS_H__
7 #define __GIF_REGISTERS_H__
8 
9 #include <tamtypes.h>
10 
12 #define GIF_REG_CTRL *(volatile u32 *)0x10003000
13 
14 #define GIF_REG_MODE *(volatile u32 *)0x10003010
15 
16 #define GIF_REG_STAT *(volatile u32 *)0x10003020
17 
18 #define GIF_REG_TAG0 *(volatile u32 *)0x10003040
19 
20 #define GIF_REG_TAG1 *(volatile u32 *)0x10003050
21 
22 #define GIF_REG_TAG2 *(volatile u32 *)0x10003060
23 
24 #define GIF_REG_TAG3 *(volatile u32 *)0x10003070
25 
26 #define GIF_REG_CNT *(volatile u32 *)0x10003080
27 
28 #define GIF_REG_P3CNT *(volatile u32 *)0x10003090
29 
30 #define GIF_REG_P3TAG *(volatile u32 *)0x100030A0
31 
32 #define GIF_SET_CTRL(RST, PSE) \
33  (u32)((RST)&0x00000001) << 0 | (u32)((PSE)&0x00000001) << 3
34 
35 #define GIF_SET_MODE(M3R, IMT) \
36  (u32)((M3R)&0x00000001) << 0 | (u32)((IMT)&0x00000001) << 2
37 
38 typedef struct
39 {
40  u32 m3r : 1;
41  u32 m3p : 1;
42  u32 imt : 1;
43  u32 pse : 1;
44  u32 ip3 : 1;
45  u32 p3q : 1;
46  u32 p2q : 1;
47  u32 p1q : 1;
48  u32 oph : 1;
49  u32 apath : 2;
50  u32 dir : 1;
51  u32 pad0 : 11;
52  u32 fqc : 5;
53  u32 pad1 : 3;
54 } __attribute__((packed)) GIFSTAT;
55 
56 typedef struct
57 {
58  u32 nloop : 15;
59  u32 eop : 1;
60  u32 tag : 16;
61 } __attribute__((packed)) GIFTAG0;
62 
63 typedef struct
64 {
65  u32 tag : 14;
66  u32 pre : 1;
67  u32 prim : 11;
68  u32 flg : 2;
69  u32 nreg : 4;
70 } __attribute__((packed)) GIFTAG1;
71 
72 typedef struct
73 {
74  u32 loregs;
75 } GIFTAG2;
76 
77 typedef struct
78 {
79  u32 hiregs;
80 } GIFTAG3;
81 
82 typedef struct
83 {
84  u32 loopcnt : 15;
85  u32 pad0 : 1;
86  u32 regcnt : 4;
87  u32 vuaddr : 10;
88  u32 pad1 : 2;
89 } __attribute__((packed)) GIFCNT;
90 
91 typedef struct
92 {
93  u32 p3cnt : 15;
94  u32 pad0 : 17;
95 } __attribute__((packed)) GIFP3CNT;
96 
97 typedef struct
98 {
99  u32 loopcnt : 15;
100  u32 eop : 1;
101  u32 pad0 : 16;
102 } __attribute__((packed)) GIFP3TAG;
103 
104 #endif /*__GIF_REGISTERS_H__*/
GIFTAG2
Definition: gif_registers.h:72
GIFTAG3
Definition: gif_registers.h:77
__attribute__
typedef __attribute__
Definition: tlbfunc.c:60
tamtypes.h