mirror of
https://github.com/SMGCommunity/Petari.git
synced 2025-02-17 04:28:15 +00:00
GXPixel progress
This commit is contained in:
parent
ef53db1eae
commit
b21cab598f
@ -75,7 +75,8 @@ def main(compile_non_matching, use_ninja, clean_ninja, link):
|
||||
flags = flags + " -DNON_MATCHING "
|
||||
|
||||
runtime_path = pathlib.Path("../Runtime/include")
|
||||
includes += f"-i {runtime_path } "
|
||||
msl_path = pathlib.Path("../MSL_C/include")
|
||||
includes += f"-i {runtime_path } -I- -i {msl_path} "
|
||||
flags += includes
|
||||
|
||||
tasks = list()
|
||||
|
@ -153,17 +153,17 @@ GXSetZTexture,GXTev.o,gx.a,false
|
||||
GXSetTevOrder,GXTev.o,gx.a,false
|
||||
GXSetNumTevStages,GXTev.o,gx.a,false
|
||||
GXSetFog,GXPixel.o,gx.a,false
|
||||
GXSetFogRangeAdj,GXPixel.o,gx.a,false
|
||||
GXSetBlendMode,GXPixel.o,gx.a,false
|
||||
GXSetColorUpdate,GXPixel.o,gx.a,false
|
||||
GXSetAlphaUpdate,GXPixel.o,gx.a,false
|
||||
GXSetZMode,GXPixel.o,gx.a,false
|
||||
GXSetZCompLoc,GXPixel.o,gx.a,false
|
||||
GXSetPixelFmt,GXPixel.o,gx.a,false
|
||||
GXSetDither,GXPixel.o,gx.a,false
|
||||
GXSetDstAlpha,GXPixel.o,gx.a,false
|
||||
GXSetFieldMask,GXPixel.o,gx.a,false
|
||||
GXSetFieldMode,GXPixel.o,gx.a,false
|
||||
GXSetFogRangeAdj,GXPixel.o,gx.a,true
|
||||
GXSetBlendMode,GXPixel.o,gx.a,true
|
||||
GXSetColorUpdate,GXPixel.o,gx.a,true
|
||||
GXSetAlphaUpdate,GXPixel.o,gx.a,true
|
||||
GXSetZMode,GXPixel.o,gx.a,true
|
||||
GXSetZCompLoc,GXPixel.o,gx.a,true
|
||||
GXSetPixelFmt,GXPixel.o,gx.a,true
|
||||
GXSetDither,GXPixel.o,gx.a,true
|
||||
GXSetDstAlpha,GXPixel.o,gx.a,true
|
||||
GXSetFieldMask,GXPixel.o,gx.a,true
|
||||
GXSetFieldMode,GXPixel.o,gx.a,true
|
||||
GXBeginDisplayList,GXDisplayList.o,gx.a,false
|
||||
GXEndDisplayList,GXDisplayList.o,gx.a,false
|
||||
GXCallDisplayList,GXDisplayList.o,gx.a,false
|
||||
|
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "SDK",
|
||||
"message": "0.49061167493703717%",
|
||||
"message": "0.6439667855272673%",
|
||||
"color": "blue"
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
| [exi](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/exi.md) | 0.0% |
|
||||
| [fs](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/fs.md) | 0.0% |
|
||||
| [gd](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/gd.md) | 0.0% |
|
||||
| [gx](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/gx.md) | 0.0% |
|
||||
| [gx](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/gx.md) | 3.0502169869807814% |
|
||||
| [ipc](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/ipc.md) | 0.0% |
|
||||
| [mem](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/mem.md) | 0.0% |
|
||||
| [mtx](https://github.com/shibbo/RVL_SDK/blob/main/docs/lib/mtx.md) | 0.0% |
|
||||
|
@ -18,7 +18,7 @@
|
||||
| GXTexture.o | 0.0% | 0 / 31 | 0.0% | :x:
|
||||
| GXBump.o | 0.0% | 0 / 10 | 0.0% | :x:
|
||||
| GXTev.o | 0.0% | 0 / 16 | 0.0% | :x:
|
||||
| GXPixel.o | 0.0% | 0 / 12 | 0.0% | :x:
|
||||
| GXPixel.o | 63.896103896103895% | 11 / 12 | 91.66666666666666% | :eight_pointed_black_star:
|
||||
| GXDisplayList.o | 0.0% | 0 / 3 | 0.0% | :x:
|
||||
| GXTransform.o | 0.0% | 0 / 19 | 0.0% | :x:
|
||||
| GXPerf.o | 0.0% | 0 / 3 | 0.0% | :x:
|
||||
@ -231,17 +231,17 @@
|
||||
| Symbol | Decompiled? |
|
||||
| ------------- | ------------- |
|
||||
| GXSetFog | :x: |
|
||||
| GXSetFogRangeAdj | :x: |
|
||||
| GXSetBlendMode | :x: |
|
||||
| GXSetColorUpdate | :x: |
|
||||
| GXSetAlphaUpdate | :x: |
|
||||
| GXSetZMode | :x: |
|
||||
| GXSetZCompLoc | :x: |
|
||||
| GXSetPixelFmt | :x: |
|
||||
| GXSetDither | :x: |
|
||||
| GXSetDstAlpha | :x: |
|
||||
| GXSetFieldMask | :x: |
|
||||
| GXSetFieldMode | :x: |
|
||||
| GXSetFogRangeAdj | :white_check_mark: |
|
||||
| GXSetBlendMode | :white_check_mark: |
|
||||
| GXSetColorUpdate | :white_check_mark: |
|
||||
| GXSetAlphaUpdate | :white_check_mark: |
|
||||
| GXSetZMode | :white_check_mark: |
|
||||
| GXSetZCompLoc | :white_check_mark: |
|
||||
| GXSetPixelFmt | :white_check_mark: |
|
||||
| GXSetDither | :white_check_mark: |
|
||||
| GXSetDstAlpha | :white_check_mark: |
|
||||
| GXSetFieldMask | :white_check_mark: |
|
||||
| GXSetFieldMode | :white_check_mark: |
|
||||
|
||||
|
||||
# GXDisplayList.o
|
||||
|
@ -643,6 +643,93 @@ typedef enum _GXIndTexMtxID {
|
||||
GX_ITM_T2
|
||||
} GXIndTexMtxID;
|
||||
|
||||
typedef enum _GXPerf0 {
|
||||
GX_PERF0_VERTICES,
|
||||
GX_PERF0_CLIP_VTX,
|
||||
GX_PERF0_CLIP_CLKS,
|
||||
GX_PERF0_XF_WAIT_IN,
|
||||
GX_PERF0_XF_WAIT_OUT,
|
||||
GX_PERF0_XF_XFRM_CLKS,
|
||||
GX_PERF0_XF_LIT_CLKS,
|
||||
GX_PERF0_XF_BOT_CLKS,
|
||||
GX_PERF0_XF_REGLD_CLKS,
|
||||
GX_PERF0_XF_REGRD_CLKS,
|
||||
GX_PERF0_CLIP_RATIO,
|
||||
GX_PERF0_TRIANGLES,
|
||||
GX_PERF0_TRIANGLES_CULLED,
|
||||
GX_PERF0_TRIANGLES_PASSED,
|
||||
GX_PERF0_TRIANGLES_SCISSORED,
|
||||
GX_PERF0_TRIANGLES_0TEX,
|
||||
GX_PERF0_TRIANGLES_1TEX,
|
||||
GX_PERF0_TRIANGLES_2TEX,
|
||||
GX_PERF0_TRIANGLES_3TEX,
|
||||
GX_PERF0_TRIANGLES_4TEX,
|
||||
GX_PERF0_TRIANGLES_5TEX,
|
||||
GX_PERF0_TRIANGLES_6TEX,
|
||||
GX_PERF0_TRIANGLES_7TEX,
|
||||
GX_PERF0_TRIANGLES_8TEX,
|
||||
GX_PERF0_TRIANGLES_0CLR,
|
||||
GX_PERF0_TRIANGLES_1CLR,
|
||||
GX_PERF0_TRIANGLES_2CLR,
|
||||
GX_PERF0_QUAD_0CVG,
|
||||
GX_PERF0_QUAD_NON0CVG,
|
||||
GX_PERF0_QUAD_1CVG,
|
||||
GX_PERF0_QUAD_2CVG,
|
||||
GX_PERF0_QUAD_3CVG,
|
||||
GX_PERF0_QUAD_4CVG,
|
||||
GX_PERF0_AVG_QUAD_CNT,
|
||||
GX_PERF0_CLOCKS,
|
||||
GX_PERF0_NONE
|
||||
} GXPerf0;
|
||||
|
||||
typedef enum _GXPerf1 {
|
||||
GX_PERF1_TEXELS,
|
||||
GX_PERF1_TX_IDLE,
|
||||
GX_PERF1_TX_REGS,
|
||||
GX_PERF1_TX_MEMSTALL,
|
||||
GX_PERF1_TC_CHECK1_2,
|
||||
GX_PERF1_TC_CHECK3_4,
|
||||
GX_PERF1_TC_CHECK5_6,
|
||||
GX_PERF1_TC_CHECK7_8,
|
||||
GX_PERF1_TC_MISS,
|
||||
GX_PERF1_VC_ELEMQ_FULL,
|
||||
GX_PERF1_VC_MISSQ_FULL,
|
||||
GX_PERF1_VC_MEMREQ_FULL,
|
||||
GX_PERF1_VC_STATUS7,
|
||||
GX_PERF1_VC_MISSREP_FULL,
|
||||
GX_PERF1_VC_STREAMBUF_LOW,
|
||||
GX_PERF1_VC_ALL_STALLS,
|
||||
GX_PERF1_VERTICES,
|
||||
GX_PERF1_FIFO_REQ,
|
||||
GX_PERF1_CALL_REQ,
|
||||
GX_PERF1_VC_MISS_REQ,
|
||||
GX_PERF1_CP_ALL_REQ,
|
||||
GX_PERF1_CLOCKS,
|
||||
GX_PERF1_NONE
|
||||
} GXPerf1;
|
||||
|
||||
typedef enum _GXVCachePerf {
|
||||
GX_VC_POS,
|
||||
GX_VC_NRM,
|
||||
GX_VC_CLR0,
|
||||
GX_VC_CLR1,
|
||||
GX_VC_TEX0,
|
||||
GX_VC_TEX1,
|
||||
GX_VC_TEX2,
|
||||
GX_VC_TEX3,
|
||||
GX_VC_TEX4,
|
||||
GX_VC_TEX5,
|
||||
GX_VC_TEX6,
|
||||
GX_VC_TEX7,
|
||||
GX_VC_ALL = 0xf
|
||||
} GXVCachePerf;
|
||||
|
||||
typedef enum _GXCopyMode {
|
||||
GX_COPY_PROGRESSIVE = 0,
|
||||
GX_COPY_INTLC_EVEN = 2,
|
||||
GX_COPY_INTLC_ODD = 3
|
||||
} GXCopyMode;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -9,7 +9,7 @@ extern "C" {
|
||||
#include <revolution/gx/GXEnum.h>
|
||||
#include <revolution/gx/GXStruct.h>
|
||||
|
||||
typedef struct GXFifoObj {
|
||||
typedef struct _GXFifoObj {
|
||||
u8* base;
|
||||
u8* top;
|
||||
u32 size;
|
||||
@ -21,7 +21,7 @@ typedef struct GXFifoObj {
|
||||
GXBool wrap;
|
||||
GXBool bind_cpu;
|
||||
GXBool bind_gp;
|
||||
};
|
||||
} GXFifoObj;
|
||||
|
||||
GXBool GXGetCPUFifo(GXFifoObj *);
|
||||
GXBool GXGetGPFifo(GXFifoObj *);
|
||||
|
@ -7,9 +7,11 @@ extern "C" {
|
||||
|
||||
#include <revolution/types.h>
|
||||
#include <revolution/gx/GXEnum.h>
|
||||
#include <revolution/gx/GXStruct.h>
|
||||
|
||||
void GXSetFog(GXFogType, f32, f32, f32, f32, GXColor);
|
||||
void GXSetFogRangeAdj(GXBool, u16, const GXFogAdjTable *);
|
||||
void GXSetBlendMode(GXBlendMode, GXBlendFactor, GXBlendFactor, GXLogicOp);
|
||||
|
||||
void GXSetColorUpdate(GXBool);
|
||||
void GXSetAlphaUpdate(GXBool);
|
||||
void GXSetZMode(GXBool, GXCompare, GXBool);
|
||||
|
32
libs/RVL_SDK/include/revolution/gx/GXRegs.h
Normal file
32
libs/RVL_SDK/include/revolution/gx/GXRegs.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef GXREGS_H
|
||||
#define GXREGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <revolution/base/PPCWGPipe.h>
|
||||
|
||||
extern volatile PPCWGPipe gxfifo: 0xCC008000;
|
||||
|
||||
#define SET_FLAG(regOrg, newFlag, shift, size) \
|
||||
(regOrg) = (u32)__rlwimi((int)(regOrg), (int)(newFlag), (shift), (32 - (shift) - (size)), (31 - (shift))); \
|
||||
|
||||
/* GX fifo write helpers */
|
||||
#define GX_WRITE_U8(ub) \
|
||||
gxfifo.u8 = (u8)(ub)
|
||||
|
||||
#define GX_WRITE_U16(us) \
|
||||
gxfifo.u16 = (u16)(us)
|
||||
|
||||
#define GX_WRITE_U32(ui) \
|
||||
gxfifo.u32 = (u32)(ui)
|
||||
|
||||
#define GX_WRITE_F32(f) \
|
||||
gxfifo.f32 = (f32)(f);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GXREGS_H
|
@ -33,6 +33,10 @@ typedef struct _GXTexRegion {
|
||||
u32 dummy[4];
|
||||
} GXTexRegion;
|
||||
|
||||
typedef struct _GXTlutRegion {
|
||||
u32 dummy[4];
|
||||
} GXTlutRegion;
|
||||
|
||||
typedef struct _GXRenderModeObj {
|
||||
VITVMode viTVmode;
|
||||
u16 fbWidth;
|
||||
@ -49,6 +53,10 @@ typedef struct _GXRenderModeObj {
|
||||
u8 vfilter[7];
|
||||
} GXRenderModeObj;
|
||||
|
||||
typedef struct _GXFogAdjTable {
|
||||
u16 r[10];
|
||||
} GXFogAdjTable;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
100
libs/RVL_SDK/include/revolution/gx/GXTypes.h
Normal file
100
libs/RVL_SDK/include/revolution/gx/GXTypes.h
Normal file
@ -0,0 +1,100 @@
|
||||
#ifndef GXTYPES_H
|
||||
#define GXTYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _GXData {
|
||||
u16 vNumNot;
|
||||
u16 bpSentNot;
|
||||
u16 vNum;
|
||||
u16 vLim;
|
||||
u32 cpEnable;
|
||||
u32 cpStatus;
|
||||
u32 cpClr;
|
||||
u32 vcdLo;
|
||||
u32 vcdHi;
|
||||
u32 vatA[8];
|
||||
u32 vatB[8];
|
||||
u32 vatC[8];
|
||||
u32 lpSize;
|
||||
u32 matIdxA;
|
||||
u32 matIdxB;
|
||||
u32 indexBase[4];
|
||||
u32 indexStride[4];
|
||||
u32 ambColor[2];
|
||||
u32 matColor[2];
|
||||
u32 chanCtrl[4];
|
||||
u32 texGenCtrl[8];
|
||||
u32 dualTexGenCtrl[8];
|
||||
u32 suTs0[8];
|
||||
u32 suTs1[8];
|
||||
u32 suScis0;
|
||||
u32 suScis1;
|
||||
u32 tref[8];
|
||||
u32 iref;
|
||||
u32 bpMask;
|
||||
u32 IndTexScale0;
|
||||
u32 IndTexScale1;
|
||||
u32 tevc[16];
|
||||
u32 teva[16];
|
||||
u32 tevKsel[8];
|
||||
u32 cmode0;
|
||||
u32 cmode1;
|
||||
u32 zmode;
|
||||
u32 peCtrl;
|
||||
u32 cpDispSrc;
|
||||
u32 cpDispSize;
|
||||
u32 cpDispStride;
|
||||
u32 cpDisp;
|
||||
u32 cpTexSrc;
|
||||
u32 cpTexSize;
|
||||
u32 cpTexStride;
|
||||
u32 cpTex;
|
||||
GXBool cpTexZ;
|
||||
u32 genMode;
|
||||
GXTexRegion TexRegions0[8];
|
||||
GXTexRegion TexRegions1[8];
|
||||
GXTexRegion TexRegions2[8];
|
||||
GXTlutRegion TlutRegions[20];
|
||||
GXTexRegion *(*texRegionCallback)(const GXTexObj *, GXTexMapID);
|
||||
GXTlutRegion *(*tlutRegionCallback)(u32 tlut_name);
|
||||
GXAttrType nrmType;
|
||||
GXBool hasNrms;
|
||||
GXBool hasBiNrms;
|
||||
u32 projType;
|
||||
f32 projMtx[6];
|
||||
f32 vpLeft;
|
||||
f32 vpTop;
|
||||
f32 vpWd;
|
||||
f32 vpHt;
|
||||
f32 vpNearz;
|
||||
f32 vpFarz;
|
||||
f32 zOffset;
|
||||
f32 zScale;
|
||||
u32 tImage0[8];
|
||||
u32 tMode0[8];
|
||||
u32 texmapId[16];
|
||||
u32 tcsManEnab;
|
||||
u32 tevTcEnab;
|
||||
GXPerf0 perf0;
|
||||
GXPerf1 perf1;
|
||||
u32 perfSel;
|
||||
GXBool inDispList;
|
||||
GXBool dlSaveContext;
|
||||
GXBool abtWaitPECopy;
|
||||
u8 dirtyVAT;
|
||||
u32 dirtyState;
|
||||
} GXData;
|
||||
|
||||
extern GXData *const __GXData;
|
||||
#define gx __GXData
|
||||
|
||||
extern void __GXFlushTextureState();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // GXTYPES_H
|
168
libs/RVL_SDK/source/revolution/gx/GXPixel.c
Normal file
168
libs/RVL_SDK/source/revolution/gx/GXPixel.c
Normal file
@ -0,0 +1,168 @@
|
||||
#include <revolution/gx.h>
|
||||
#include <revolution/gx/GXTypes.h>
|
||||
#include <revolution/gx/GXRegs.h>
|
||||
|
||||
// GXSetFog
|
||||
|
||||
void GXSetFogRangeAdj(GXBool enable, u16 c, const GXFogAdjTable *pTable) {
|
||||
u32 i;
|
||||
u32 v0, v1;
|
||||
|
||||
if (enable) {
|
||||
/* this loop is unrolled */
|
||||
for (i = 0; i < 0xA; i += 2) {
|
||||
v0 = 0;
|
||||
SET_FLAG(v0, pTable->r[i], 0, 12);
|
||||
SET_FLAG(v0, pTable->r[i + 1], 12, 12);
|
||||
SET_FLAG(v0, 0xE9 + (i / 2), 24, 8);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(v0);
|
||||
}
|
||||
}
|
||||
|
||||
v1 = 0;
|
||||
SET_FLAG(v1, c + 0x156, 0, 10);
|
||||
SET_FLAG(v1, enable, 10, 1);
|
||||
SET_FLAG(v1, 0xE8, 24, 8);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(v1);
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetBlendMode(GXBlendMode mode, GXBlendFactor src_factor, GXBlendFactor dest_factor, GXLogicOp operation) {
|
||||
u32 reg;
|
||||
u32 blend;
|
||||
|
||||
reg = gx->cmode0;
|
||||
blend = (u32)(mode & 1);
|
||||
SET_FLAG(reg, (mode == 3), 11, 1);
|
||||
SET_FLAG(reg, blend, 0, 1);
|
||||
SET_FLAG(reg, mode == 2, 1, 1);
|
||||
SET_FLAG(reg, operation, 12, 4);
|
||||
SET_FLAG(reg, src_factor, 8, 3);
|
||||
SET_FLAG(reg, dest_factor, 5, 3);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(reg);
|
||||
gx->cmode0 = reg;
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetColorUpdate(GXBool update) {
|
||||
u32 reg;
|
||||
|
||||
reg = gx->cmode0;
|
||||
SET_FLAG(reg, update, 3, 1);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(reg);
|
||||
gx->cmode0 = reg;
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetAlphaUpdate(GXBool update) {
|
||||
u32 reg;
|
||||
|
||||
reg = gx->cmode0;
|
||||
SET_FLAG(reg, update, 4, 1);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(reg);
|
||||
gx->cmode0 = reg;
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetZMode(GXBool compare, GXCompare func, GXBool update) {
|
||||
u32 reg;
|
||||
|
||||
reg = gx->zmode;
|
||||
SET_FLAG(reg, compare, 0, 1);
|
||||
SET_FLAG(reg, func, 1, 3);
|
||||
SET_FLAG(reg, update, 4, 1);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(reg);
|
||||
gx->zmode = reg;
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetZCompLoc(GXBool before) {
|
||||
SET_FLAG(gx->peCtrl, before, 6, 1);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(gx->peCtrl);
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetPixelFmt(GXPixelFmt format, GXZFmt16 z_format) {
|
||||
u32 ctrl;
|
||||
GXBool aa;
|
||||
|
||||
static u32 p2f[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
|
||||
|
||||
ctrl = gx->peCtrl;
|
||||
SET_FLAG(gx->peCtrl, p2f[format], 0, 3);
|
||||
SET_FLAG(gx->peCtrl, z_format, 3, 3);
|
||||
|
||||
if (ctrl != gx->peCtrl) {
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(gx->peCtrl);
|
||||
|
||||
aa = ((format == 2) ? GX_TRUE : GX_FALSE);
|
||||
SET_FLAG(gx->genMode, aa, 9, 1);
|
||||
gx->dirtyState |= 4;
|
||||
}
|
||||
|
||||
if (p2f[format] == 4) {
|
||||
SET_FLAG(gx->cmode1, (format - 4) & 3, 9, 2);
|
||||
SET_FLAG(gx->cmode1, 0x42, 24, 8);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(gx->cmode1);
|
||||
}
|
||||
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetDither(GXBool dither) {
|
||||
u32 reg;
|
||||
|
||||
reg = gx->cmode0;
|
||||
SET_FLAG(reg, dither, 2, 1);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(reg);
|
||||
gx->cmode0 = reg;
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetDstAlpha(GXBool enable, u8 alpha) {
|
||||
u32 reg;
|
||||
|
||||
reg = gx->cmode1;
|
||||
SET_FLAG(reg, alpha, 0, 8);
|
||||
SET_FLAG(reg, enable, 8, 1);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(reg);
|
||||
gx->cmode1 = reg;
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetFieldMask(GXBool odd, GXBool even) {
|
||||
u32 reg;
|
||||
|
||||
reg = 0;
|
||||
SET_FLAG(reg, even, 0, 1);
|
||||
SET_FLAG(reg, odd, 1, 1);
|
||||
SET_FLAG(reg, 0x44, 24, 8);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(reg);
|
||||
gx->bpSentNot = GX_FALSE;
|
||||
}
|
||||
|
||||
void GXSetFieldMode(GXBool mode, GXBool ratio) {
|
||||
u32 reg;
|
||||
|
||||
SET_FLAG(gx->lpSize, ratio, 22, 1);
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(gx->lpSize);
|
||||
|
||||
__GXFlushTextureState();
|
||||
reg = mode | 0x68000000;
|
||||
GX_WRITE_U8(0x61);
|
||||
GX_WRITE_U32(reg);
|
||||
__GXFlushTextureState();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user