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:
TakaRikka
2024-01-19 16:22:19 -08:00
committed by GitHub
parent f97fc769df
commit 981cfe7283
461 changed files with 11574 additions and 22635 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JGeometry.h"
#include "JSystem/JUtility/TColor.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx.h"
#include "dolphin/types.h"
class J2DGrafContext {
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/JGeometry.h"
#include "JSystem/JSupport/JSUList.h"
#include "dolphin/gx/GXEnum.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx.h"
class J2DAnmBase;
class J2DAnmColor;
+1 -1
View File
@@ -3,7 +3,7 @@
#include "dolphin/gx/GXEnum.h"
#include "dolphin/gx/GXStruct.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/mtx.h"
struct J2DTextureSRTInfo {
/* 0x00 */ f32 field_0x0;
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/J3DGraphAnimator/J3DSkinDeform.h"
#include "JSystem/J3DGraphBase/J3DPacket.h"
#include "JSystem/J3DGraphBase/J3DVertex.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/mtx.h"
#include "dolphin/types.h"
enum J3DMdlFlag {
+11 -11
View File
@@ -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) {
+9 -9
View File
@@ -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 -1
View File
@@ -1,7 +1,7 @@
#ifndef J3DSHAPEMTX_H
#define J3DSHAPEMTX_H
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/mtx.h"
class J3DTexMtx;
class J3DTexGenBlock;
+1 -1
View File
@@ -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 -1
View File
@@ -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?
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -2,7 +2,7 @@
#define J3DTRANSFORM_H
#include "JSystem/JGeometry.h"
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/mtx.h"
struct J3DTextureSRTInfo;
@@ -2,7 +2,7 @@
#define J3DMODELLOADER_H
#include "dolphin/types.h"
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx.h"
class J3DModelData;
class J3DMaterialTable;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef J3DUCLIPPER_H
#define J3DUCLIPPER_H
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/mtx.h"
#include "dolphin/types.h"
class J3DUClipper {
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef DSPPROC_H
#define DSPPROC_H
#include "dolphin/dsp/dsp.h"
#include "dolphin/dsp.h"
void DsyncFrame2ch(u32 param_0, u32 param_1, u32 param_2);
void DsyncFrame4ch(u32 param_0, u32 param_1, u32 param_2, u32 param_3, u32 param_4);
+1 -11
View File
@@ -1,22 +1,12 @@
#ifndef OSDSP_TASK_H
#define OSDSP_TASK_H
#include "dolphin/os/OSInterrupt.h"
#include "dolphin/dsp.h"
struct DSPTaskInfo;
extern DSPTaskInfo* DSP_prior_task;
#ifdef __cplusplus
extern "C" {
#endif
void __DSPHandler(OSInterrupt interrupt, OSContext* context);
#ifdef __cplusplus
}
#endif
void DsyncFrame2(u32 param_0, u32 param_1, u32 param_2);
#endif /* OSDSP_TASK_H */
+3
View File
@@ -104,6 +104,9 @@ struct TLinkList : public TNodeLinkList {
TNodeLinkList::const_iterator::operator++();
return *this;
}
friend bool operator==(const_iterator a, const_iterator b) { return a == b; }
friend bool operator!=(const_iterator a, const_iterator b) { return !(a == b); }
};
TLinkListNode* Element_toNode(T* element) const { return &element->ocObject_; }
+1 -1
View File
@@ -2,7 +2,7 @@
#define JKRARAMPIECE_H
#include "JSystem/JSupport/JSUList.h"
#include "dolphin/ar/arq.h"
#include "dolphin/arq.h"
#include "dolphin/os/OSMessage.h"
#include "dolphin/os/OSMutex.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#define JKRDVDFILE_H
#include "JSystem/JKernel/JKRFile.h"
#include "dolphin/dvd/dvd.h"
#include "dolphin/dvd.h"
#include "dolphin/os/OSMessage.h"
#include "dolphin/os/OSMutex.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JKRFILEFINDER_H
#define JKRFILEFINDER_H
#include "dolphin/dvd/dvd.h"
#include "dolphin/dvd.h"
class JKRFileFinder {
public:
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JMATH_H
#define JMATH_H
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx.h"
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
void JMAEulerToQuat(s16 param_0, s16 param_1, s16 param_2, Quaternion* param_3);
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JPADRAWINFO_H
#define JPADRAWINFO_H
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx.h"
class JPADrawInfo {
public:
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JPAMATH_H
#define JPAMATH_H
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx.h"
#include "JSystem/JGeometry.h"
void JPAGetDirMtx(JGeometry::TVec3<f32> const& param_0, f32 (*param_1)[4]);
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JSGOBJECT_H
#define JSGOBJECT_H
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/mtx.h"
namespace JStage {
struct TObject {
@@ -4,7 +4,7 @@
#include "JSystem/JStudio/JStudio/fvb.h"
#include "JSystem/JStudio/JStudio/stb.h"
#include "JSystem/JStudio/JStudio/ctb.h"
#include "dolphin/gx/GX.h"
#include "dolphin/gx.h"
#include "dolphin/mtx/vec.h"
namespace JStudio {
@@ -1,7 +1,7 @@
#ifndef JSTUDIO_MATH_H
#define JSTUDIO_MATH_H
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/mtx.h"
namespace JStudio {
namespace math {
+1 -1
View File
@@ -2,7 +2,7 @@
#define JUTASSERT_H
#include "dolphin/types.h"
#include "dolphin/os/OS.h"
#include "dolphin/os.h"
#ifdef DEBUG
#define JUT_ASSERT(LINE, COND) \
+1 -1
View File
@@ -94,7 +94,7 @@ private:
private:
/* 0x20 */ u32 field_0x20;
/* 0x24 */ u32 mMaxLines;
/* 0x24 */ int mMaxLines;
/* 0x28 */ u8* mBuf;
/* 0x2C */ bool field_0x2c;
/* 0x30 */ int field_0x30;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JUTDIRECTFILE_H
#define JUTDIRECTFILE_H
#include "dolphin/dvd/dvd.h"
#include "dolphin/dvd.h"
#define JUTDF_BUFSIZE (0x800)
+3 -3
View File
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRDisposer.h"
#include "dolphin/os/OSTime.h"
#include "dolphin/pad/Pad.h"
#include "dolphin/pad.h"
#include "dolphin/types.h"
typedef void (*callbackFn)(int, void*);
@@ -195,9 +195,9 @@ public:
struct CRumble {
CRumble(JUTGamePad* pad) { clear(pad); }
static PADMask sChannelMask[4];
static u32 sChannelMask[4];
static bool mStatus[4];
static PADMask mEnabled;
static u32 mEnabled;
enum ERumble {
VAL_0 = 0,
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JUTGRAPHFIFO_H
#define JUTGRAPHFIFO_H
#include "dolphin/gx/GX.h"
#include "dolphin/gx.h"
class JUTGraphFifo {
public:
+1 -1
View File
@@ -4,7 +4,7 @@
#include "dolphin/gx/GXStruct.h"
#include "dolphin/os/OSMessage.h"
#include "dolphin/os/OSTime.h"
#include "dolphin/vi/vi.h"
#include "dolphin/vi.h"
typedef u8 (*Pattern)[2];
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef TPOSITION3_H
#define TPOSITION3_H
#include "dolphin/mtx/mtx.h"
#include "dolphin/mtx.h"
#include "JSystem/JMath/JMath.h"
namespace JGeometry {