24#define GX_BITFIELD_SET(field, pos, size, value) (field) = __rlwimi((field), (value), 31 - (pos) - (size) + 1, (pos), (pos) + (size)-1)
25#define GX_BITFIELD_TRUNC(field, pos, size, value) (__rlwimi((field), (value), 0, (pos), (pos) + (size)-1))
27#define GX_BITGET(field, pos, size) ((field) >> (31 - (pos) - (size) + 1) & ((1 << (size)) - 1))
28#define GX_GET_REG(reg, st, end) GX_BITGET(reg, st, (end - st + 1))
29#define GX_SET_REG(reg, x, st, end) GX_BITFIELD_SET(reg, st, (end - st + 1), x)
30#define GX_SET_TRUNC(reg, x, st, end) GX_BITFIELD_TRUNC((reg), (st), ((end) - (st) + 1), (x))
32#define GXCOLOR_AS_U32(color) (*((u32*)&(color)))
34#define INSERT_FIELD(reg, value, nbits, shift) \
35 (reg) = ((u32) (reg) & ~(((1 << (nbits)) - 1) << (shift))) | \
36 ((u32) (value) << (shift));
38#define FAST_FLAG_SET(regOrg, newFlag, shift, size) \
40 (regOrg) = (u32)__rlwimi((int)(regOrg), (int)(newFlag), (shift), (32 - (shift) - (size)), (31 - (shift))); \
44#define GX_LOAD_BP_REG 0x61
60#define GXFIFO_ADDR 0xCC008000
63#define GX_WRITE_U8(data) GXWGFifo.u8 = data;
64#define GX_WRITE_U32(data) GXWGFifo.u32 = data;
65#define GX_WRITE_F32(val) (GXWGFifo.f32 = (f32)val)
67#define GX_CP_LOAD_REG(addr, data) \
68 GXWGFifo.s8 = GX_FIFO_CMD_LOAD_CP_REG; \
69 GXWGFifo.s8 = (addr); \
70 GXWGFifo.s32 = (data);
75#define GX_XF_LOAD_REG_HDR(addr) \
76 GXWGFifo.s8 = GX_FIFO_CMD_LOAD_XF_REG; \
77 GXWGFifo.s32 = (addr);
82#define GX_XF_LOAD_REG(addr, data) \
83 GX_XF_LOAD_REG_HDR(addr); \
84 GXWGFifo.s32 = (data);
89#define GX_BP_LOAD_REG(data) \
90 GXWGFifo.s8 = GX_FIFO_CMD_LOAD_BP_REG; \
91 GXWGFifo.s32 = (data);
96#define GX_XF_LOAD_REGS(size, addr) \
98 u32 cmd = (size) << 16 | addr; \
99 GX_XF_LOAD_REG_HDR(cmd); \
T cLib_calcTimer(T *value)
Definition c_lib.h:74
double x double x
Definition e_atan2.c:58
double x double y
Definition e_atan2.c:58
double u
Definition e_pow.c:163
double v
Definition e_pow.c:163
volatile PPCWGPipe GXWGFifo AT_ADDRESS(GXFIFO_ADDR)
static void GFWriteBPCmd(u32 param_1)
Definition gx.h:194
GXRenderModeObj GXNtsc480Int
Definition GXFrameBuf.c:49
static void GXTexCoord2u8(const u8 s, const u8 t)
Definition gx.h:135
static void GXPosition3s8(const s8 x, const s8 y, const s8 z)
Definition gx.h:157
static void GXPosition3s16(const s16 x, const s16 y, const s16 z)
Definition gx.h:173
static void GXTexCoord1x8(const u8 s)
Definition gx.h:140
static void GXColor4u8(const u8 r, const u8 g, const u8 b, const u8 a)
Definition gx.h:123
static u32 GXReadCPReg(u32 addrLo, u32 addrHi)
Definition gx.h:199
static void GXPosition1x16(const u16 x)
Definition gx.h:149
GXRenderModeObj GXNtsc480IntDf
Definition GXFrameBuf.c:4
static void GXPosition1x8(const u8 x)
Definition gx.h:153
static void GXTexCoord2f32(const f32 s, const f32 t)
Definition gx.h:130
GXRenderModeObj GXPal528IntDf
Definition GXFrameBuf.c:139
static void GXColor1u32(const u32 c)
Definition gx.h:119
static void GXTexCoord2s8(const s8 x, const s8 y)
Definition gx.h:179
static void GXPosition2s8(const s8 x, const s8 y)
Definition gx.h:163
static void GXEnd(void)
Definition gx.h:218
GXRenderModeObj GXMpal480IntDf
Definition GXFrameBuf.c:94
static void GXTexCoord2u16(const u16 x, const u16 y)
Definition gx.h:184
static void GXPosition2s16(const s16 x, const s16 y)
Definition gx.h:168
void GFFill(u16 param_1, u32 param_2)
Definition gx.h:211
GXRenderModeObj GXEurgb60Hz480IntDf
Definition GXFrameBuf.c:184
static void GXPosition2f32(const f32 x, const f32 z)
Definition gx.h:114
static void GXPosition2u16(const u16 x, const u16 y)
Definition gx.h:144
static void GXTexCoord2s16(const s16 u, const s16 v)
Definition gx.h:189
static void GXPosition3f32(const f32 x, const f32 y, const f32 z)
Definition gx.h:102
static void GXNormal3f32(const f32 x, const f32 y, const f32 z)
Definition gx.h:108
signed char s8
Definition types.h:4
unsigned long u32
Definition types.h:10
signed long long s64
Definition types.h:7
float f32
Definition types.h:22
signed short s16
Definition types.h:5
double f64
Definition types.h:23
unsigned short u16
Definition types.h:9
unsigned long long u64
Definition types.h:11
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8
s16 s16
Definition gx.h:53
f64 f64
Definition gx.h:57
f32 f32
Definition gx.h:56
u32 u32
Definition gx.h:50
u16 u16
Definition gx.h:49
s32 s32
Definition gx.h:54
s64 s64
Definition gx.h:55
u64 u64
Definition gx.h:51