diff options
author | Made <made111@gmx.de> | 2020-05-15 03:47:36 +0200 |
---|---|---|
committer | Made <made111@gmx.de> | 2020-05-15 03:47:36 +0200 |
commit | 7e9089849989d5e930eb5b5f7cecfd8d2c6c379c (patch) | |
tree | 50ccca8e970b7738cf7ecf0420d6a5444b031362 /arm9/lib/src | |
parent | 14a5ca7ae49912305b1bcbaa180cfc9fdf8ff17a (diff) |
Decompile GX_g3imm.s and GX_state.s
Diffstat (limited to 'arm9/lib/src')
-rw-r--r-- | arm9/lib/src/GX_g3imm.c | 18 | ||||
-rw-r--r-- | arm9/lib/src/GX_state.c | 26 |
2 files changed, 44 insertions, 0 deletions
diff --git a/arm9/lib/src/GX_g3imm.c b/arm9/lib/src/GX_g3imm.c new file mode 100644 index 00000000..f41b5cbf --- /dev/null +++ b/arm9/lib/src/GX_g3imm.c @@ -0,0 +1,18 @@ +#include "global.h" +#include "main.h" +#include "gx.h" + +void G3_LoadMtx43(struct Mtx43 *mtx){ + SETREG32(HW_REG_GXFIFO, 0x17); + GX_SendFifo48B(mtx, (void *)HW_REG_GXFIFO); +} + +void G3_MultMtx43(struct Mtx43 *mtx){ + SETREG32(HW_REG_GXFIFO, 0x19); + GX_SendFifo48B(mtx, (void *)HW_REG_GXFIFO); +} + +void G3_MultMtx33(struct Mtx33 *mtx){ + SETREG32(HW_REG_GXFIFO, 0x1A); + MI_Copy36B(mtx, (void *)HW_REG_GXFIFO); +} diff --git a/arm9/lib/src/GX_state.c b/arm9/lib/src/GX_state.c new file mode 100644 index 00000000..52d3c6f5 --- /dev/null +++ b/arm9/lib/src/GX_state.c @@ -0,0 +1,26 @@ +#include "global.h" +#include "main.h" +#include "gx.h" + +extern struct VRAM_banks gUnk021D33C4; + +void GX_InitGXState(){ + gUnk021D33C4.var00 = 0x0; + gUnk021D33C4.var02 = 0x0; + gUnk021D33C4.var04 = 0x0; + gUnk021D33C4.var06 = 0x0; + gUnk021D33C4.var08 = 0x0; + gUnk021D33C4.var0A = 0x0; + gUnk021D33C4.var0C = 0x0; + gUnk021D33C4.var0E = 0x0; + gUnk021D33C4.var10 = 0x0; + gUnk021D33C4.var12 = 0x0; + gUnk021D33C4.var14 = 0x0; + gUnk021D33C4.var16 = 0x0; + gUnk021D33C4.var18 = 0x0; + SETREG32(HW_REG_VRAMCNT_A, 0x0); + SETREG8(HW_REG_VRAMCNT_E, 0x0); + SETREG8(HW_REG_VRAMCNT_F, 0x0); + SETREG8(HW_REG_VRAMCNT_G, 0x0); + SETREG16(HW_REG_VRAMCNT_H, 0x0); +} |