mirror of
https://github.com/zeldaret/tp
synced 2026-07-06 05:54:29 -04:00
almost all of dolphin matched (#2036)
* TRK full match * remove trk asm * ar done * cleanup some dolphin headers * more dolphin cleanup * cleanup / GD fully matched * almost all of GX fully matched * GX / Mtx full matched * most of OS done * pad done * most of VI * remove asm * forgot couple vec funcs * couple JUtility matches
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define J3DGD_H
|
||||
|
||||
#include "dolphin/gd/GDBase.h"
|
||||
#include "dolphin/gx/GX.h"
|
||||
#include "dolphin/gx.h"
|
||||
|
||||
inline void J3DGDWrite_u8(u8 param) {
|
||||
__GDWrite(param);
|
||||
@@ -31,8 +31,8 @@ inline void J3DGDWriteBPCmd(u32 cmd) {
|
||||
}
|
||||
|
||||
inline void J3DFifoLoadBPCmd(u32 cmd) {
|
||||
GFX_FIFO(u8) = 0x61;
|
||||
GFX_FIFO(u32) = cmd;
|
||||
GXWGFifo.u8 = 0x61;
|
||||
GXWGFifo.u32 = cmd;
|
||||
}
|
||||
|
||||
inline void J3DGDWriteXFCmd(u16 addr, u32 cmd) {
|
||||
@@ -49,17 +49,17 @@ inline void J3DGDWriteXFCmdHdr(u16 addr, u8 len) {
|
||||
}
|
||||
|
||||
inline void J3DFifoWriteXFCmdHdr(u16 addr, u8 len) {
|
||||
GFX_FIFO(u8) = 0x10;
|
||||
GFX_FIFO(u16) = len - 1;
|
||||
GFX_FIFO(u16) = addr;
|
||||
GXWGFifo.u8 = 0x10;
|
||||
GXWGFifo.u16 = len - 1;
|
||||
GXWGFifo.u16 = addr;
|
||||
}
|
||||
|
||||
inline void J3DGXCmd1f32ptr(f32* value) {
|
||||
GFX_FIFO(u32) = *(u32*)value;
|
||||
GXWGFifo.u32 = *(u32*)value;
|
||||
}
|
||||
|
||||
inline void J3DGXCmd1f32(f32 value) {
|
||||
GFX_FIFO(u32) = *(u32*)&value;
|
||||
GXWGFifo.u32 = *(u32*)&value;
|
||||
}
|
||||
|
||||
inline void J3DGDWriteCPCmd(u8 reg, u32 value) {
|
||||
@@ -104,9 +104,9 @@ void J3DFifoLoadNrmMtxToTexMtx3x3(f32 (*)[3], u32);
|
||||
void J3DFifoLoadTexCached(GXTexMapID, u32, GXTexCacheSize, u32, GXTexCacheSize);
|
||||
|
||||
static inline void J3DFifoLoadIndx(u8 cmd, u16 indx, u16 addr) {
|
||||
GFX_FIFO(u8) = cmd;
|
||||
GFX_FIFO(u16) = indx;
|
||||
GFX_FIFO(u16) = addr;
|
||||
GXWGFifo.u8 = cmd;
|
||||
GXWGFifo.u16 = indx;
|
||||
GXWGFifo.u16 = addr;
|
||||
}
|
||||
|
||||
inline void J3DGDSetNumChans(u8 numChans) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DShapeDraw.h"
|
||||
#include "JSystem/J3DGraphBase/J3DShapeMtx.h"
|
||||
#include "dolphin/gx/GX.h"
|
||||
#include "dolphin/gx.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class J3DCurrentMtxInfo {
|
||||
@@ -13,15 +13,15 @@ public:
|
||||
};
|
||||
|
||||
static inline void J3DFifoWriteCPCmd(u8 cmd, u32 param) {
|
||||
GFX_FIFO(u8) = GX_CMD_LOAD_CP_REG;
|
||||
GFX_FIFO(u8) = cmd;
|
||||
GFX_FIFO(u32) = param;
|
||||
GXWGFifo.u8 = GX_CMD_LOAD_CP_REG;
|
||||
GXWGFifo.u8 = cmd;
|
||||
GXWGFifo.u32 = param;
|
||||
}
|
||||
|
||||
static inline void J3DFifoWriteXFCmd(u16 cmd, u16 len) {
|
||||
GFX_FIFO(u8) = GX_CMD_LOAD_XF_REG;
|
||||
GFX_FIFO(u16) = (len - 1);
|
||||
GFX_FIFO(u16) = cmd;
|
||||
GXWGFifo.u8 = GX_CMD_LOAD_XF_REG;
|
||||
GXWGFifo.u16 = (len - 1);
|
||||
GXWGFifo.u16 = cmd;
|
||||
}
|
||||
|
||||
class J3DCurrentMtx : public J3DCurrentMtxInfo {
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
J3DFifoWriteCPCmd(0x30, getMtxIdxRegA()); // CP_MATINDEX_A
|
||||
J3DFifoWriteCPCmd(0x40, getMtxIdxRegB()); // CP_MATINDEX_B
|
||||
J3DFifoWriteXFCmd(0x1018, 2);
|
||||
GFX_FIFO(u32) = getMtxIdxRegA();
|
||||
GFX_FIFO(u32) = getMtxIdxRegB();
|
||||
GXWGFifo.u32 = getMtxIdxRegA();
|
||||
GXWGFifo.u32 = getMtxIdxRegB();
|
||||
}
|
||||
|
||||
void setCurrentTexMtx(u8 param_1, u8 param_2, u8 param_3, u8 param_4,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef J3DSHAPEMTX_H
|
||||
#define J3DSHAPEMTX_H
|
||||
|
||||
#include "dolphin/mtx/mtxvec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
class J3DTexMtx;
|
||||
class J3DTexGenBlock;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define J3DSTRUCT_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
#include "dolphin/mtx.h"
|
||||
#include "dolphin/mtx/mtx44.h"
|
||||
#include "dolphin/mtx/vec.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef J3DSYS_H
|
||||
#define J3DSYS_H
|
||||
|
||||
#include "dolphin/gx/GX.h"
|
||||
#include "dolphin/gx.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
// Perhaps move to a new J3DEnum.h?
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DStruct.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
#include "dolphin/mtx.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class J3DTexture {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define J3DTRANSFORM_H
|
||||
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "dolphin/mtx/mtxvec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
struct J3DTextureSRTInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user