summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormzxrules <mzxrules@gmail.com>2024-09-24 13:45:53 -0400
committerGitHub <noreply@github.com>2024-09-24 13:45:53 -0400
commitdc1501e7a078fefb13cd2173530e021a241155d0 (patch)
tree823c51be1f488e4c5cabe9a46c32264dc1a061de /include
parentf9d892a2aee83cdd74cd3ffc3adc9a03e6460ae7 (diff)
create ucode_disas.h (#2222)
* ucode_disas.h * create UcodeType * bss
Diffstat (limited to 'include')
-rw-r--r--include/functions.h5
-rw-r--r--include/gfx.h35
-rw-r--r--include/ucode_disas.h49
3 files changed, 49 insertions, 40 deletions
diff --git a/include/functions.h b/include/functions.h
index 82598e415..e146c8930 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -940,11 +940,6 @@ void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line
void DebugArena_FreeDebug(void* ptr, const char* file, int line);
void DebugArena_Display(void);
#endif
-void UCodeDisas_Init(UCodeDisas*);
-void UCodeDisas_Destroy(UCodeDisas*);
-void UCodeDisas_Disassemble(UCodeDisas*, Gfx*);
-void UCodeDisas_RegisterUCode(UCodeDisas*, s32, UCodeInfo*);
-void UCodeDisas_SetCurUCode(UCodeDisas*, void*);
Acmd* AudioSynth_Update(Acmd* cmdStart, s32* cmdCnt, s16* aiStart, s32 aiBufLen);
void AudioHeap_DiscardFont(s32 fontId);
void AudioHeap_ReleaseNotesForFont(s32 fontId);
diff --git a/include/gfx.h b/include/gfx.h
index 5414cd5ad..d14590a45 100644
--- a/include/gfx.h
+++ b/include/gfx.h
@@ -126,41 +126,6 @@ typedef enum SetupDL {
/* 71 */ SETUPDL_MAX
} SetupDL;
-#define UCODE_NULL 0
-#define UCODE_F3DZEX 1
-#define UCODE_UNK 2
-#define UCODE_S2DEX 3
-
-typedef struct UCodeInfo {
- /* 0x00 */ u32 type;
- /* 0x04 */ void* ptr;
-} UCodeInfo; // size = 0x8
-
-typedef struct UCodeDisas {
- /* 0x00 */ uintptr_t segments[NUM_SEGMENTS];
- /* 0x40 */ Gfx* dlStack[18];
- /* 0x88 */ s32 dlDepth;
- /* 0x8C */ u32 dlCnt;
- /* 0x90 */ u32 vtxCnt;
- /* 0x94 */ u32 spvtxCnt;
- /* 0x98 */ u32 tri1Cnt;
- /* 0x9C */ u32 tri2Cnt;
- /* 0xA0 */ u32 quadCnt;
- /* 0xA4 */ u32 lineCnt;
- /* 0xA8 */ u32 loaducodeCnt;
- /* 0xAC */ u32 pipeSyncRequired;
- /* 0xB0 */ u32 tileSyncRequired;
- /* 0xB4 */ u32 loadSyncRequired;
- /* 0xB8 */ u32 syncErr;
- /* 0xBC */ s32 enableLog;
- /* 0xC0 */ s32 ucodeType;
- /* 0xC4 */ s32 ucodeInfoCount;
- /* 0xC8 */ UCodeInfo* ucodeInfo;
- /* 0xCC */ u32 modeH;
- /* 0xD0 */ u32 modeL;
- /* 0xD4 */ u32 geometryMode;
-} UCodeDisas; // size = 0xD8
-
void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size);
void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size);
diff --git a/include/ucode_disas.h b/include/ucode_disas.h
new file mode 100644
index 000000000..d1fc90133
--- /dev/null
+++ b/include/ucode_disas.h
@@ -0,0 +1,49 @@
+#ifndef UCODE_DISAS_H
+#define UCODE_DISAS_H
+
+#include "ultra64.h"
+
+typedef enum UcodeType {
+ /* 0 */ UCODE_TYPE_NULL,
+ /* 1 */ UCODE_TYPE_F3DZEX,
+ /* 2 */ UCODE_TYPE_UNK, // Likely F3DEX2 or a similar variant
+ /* 3 */ UCODE_TYPE_S2DEX
+} UcodeType;
+
+typedef struct UCodeInfo {
+ /* 0x00 */ u32 type;
+ /* 0x04 */ void* ptr;
+} UCodeInfo; // size = 0x8
+
+typedef struct UCodeDisas {
+ /* 0x00 */ uintptr_t segments[NUM_SEGMENTS];
+ /* 0x40 */ Gfx* dlStack[18];
+ /* 0x88 */ s32 dlDepth;
+ /* 0x8C */ u32 dlCnt;
+ /* 0x90 */ u32 vtxCnt;
+ /* 0x94 */ u32 spvtxCnt;
+ /* 0x98 */ u32 tri1Cnt;
+ /* 0x9C */ u32 tri2Cnt;
+ /* 0xA0 */ u32 quadCnt;
+ /* 0xA4 */ u32 lineCnt;
+ /* 0xA8 */ u32 loaducodeCnt;
+ /* 0xAC */ u32 pipeSyncRequired;
+ /* 0xB0 */ u32 tileSyncRequired;
+ /* 0xB4 */ u32 loadSyncRequired;
+ /* 0xB8 */ u32 syncErr;
+ /* 0xBC */ s32 enableLog;
+ /* 0xC0 */ s32 ucodeType;
+ /* 0xC4 */ s32 ucodeInfoCount;
+ /* 0xC8 */ UCodeInfo* ucodeInfo;
+ /* 0xCC */ u32 modeH;
+ /* 0xD0 */ u32 modeL;
+ /* 0xD4 */ u32 geometryMode;
+} UCodeDisas; // size = 0xD8
+
+void UCodeDisas_Init(UCodeDisas*);
+void UCodeDisas_Destroy(UCodeDisas*);
+void UCodeDisas_Disassemble(UCodeDisas*, Gfx*);
+void UCodeDisas_RegisterUCode(UCodeDisas*, s32, UCodeInfo*);
+void UCodeDisas_SetCurUCode(UCodeDisas*, void*);
+
+#endif