mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
Name rsp ucodes and surrounding cleanup (#1166)
* Name rsp ucodes and surrounding cleanup * Fix comments alignment and remove unnecessary & in sys_ucode * Change capitalization of sys_ucode variables * Remove unnecessary externs for aspMain * Improvements to Jpeg_ScheduleDecoderTask * Split unknown rsp code into a separate file, spacing
This commit is contained in:
parent
912b916875
commit
765cfd63e9
20 changed files with 173 additions and 127 deletions
|
@ -1777,10 +1777,10 @@ void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode);
|
|||
MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line);
|
||||
void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, f32 translateX, f32 translateY,
|
||||
f32 translateZ);
|
||||
u32 SysUcode_GetUCodeBoot(void);
|
||||
u32 SysUcode_GetUCodeBootSize(void);
|
||||
u32 SysUcode_GetUCode(void);
|
||||
u32 SysUcode_GetUCodeData(void);
|
||||
u64* SysUcode_GetUCodeBoot(void);
|
||||
size_t SysUcode_GetUCodeBootSize(void);
|
||||
u64* SysUcode_GetUCode(void);
|
||||
u64* SysUcode_GetUCodeData(void);
|
||||
void func_800D2E30(UnkRumbleStruct* arg0);
|
||||
void func_800D3140(UnkRumbleStruct* arg0);
|
||||
void func_800D3178(UnkRumbleStruct* arg0);
|
||||
|
|
|
@ -28,5 +28,6 @@
|
|||
#include "ultra64/pfs.h"
|
||||
#include "ultra64/motor.h"
|
||||
#include "ultra64/r4300.h"
|
||||
#include "ultra64/ucode.h"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2321,11 +2321,11 @@ _DW({ \
|
|||
gsSPLoadUcodeEx((uc_start), (uc_dstart), SP_UCODE_DATA_SIZE)
|
||||
|
||||
#define gSPLoadUcodeL(pkt, ucode) \
|
||||
gSPLoadUcode((pkt), OS_K0_TO_PHYSICAL(&##ucode##TextStart), \
|
||||
OS_K0_TO_PHYSICAL(&##ucode##DataStart))
|
||||
gSPLoadUcode((pkt), OS_K0_TO_PHYSICAL(& ucode##TextStart), \
|
||||
OS_K0_TO_PHYSICAL(& ucode##DataStart))
|
||||
#define gsSPLoadUcodeL(ucode) \
|
||||
gsSPLoadUcode(OS_K0_TO_PHYSICAL(&##ucode##TextStart), \
|
||||
OS_K0_TO_PHYSICAL(&##ucode##DataStart))
|
||||
gsSPLoadUcode(OS_K0_TO_PHYSICAL(& ucode##TextStart), \
|
||||
OS_K0_TO_PHYSICAL(& ucode##DataStart))
|
||||
#endif
|
||||
|
||||
#ifdef F3DEX_GBI_2
|
||||
|
|
|
@ -351,14 +351,7 @@ typedef struct {
|
|||
/*===========================================================================*
|
||||
* External functions
|
||||
*===========================================================================*/
|
||||
extern u64 gspS2DEX_fifoTextStart[], gspS2DEX_fifoTextEnd[];
|
||||
extern u64 gspS2DEX_fifoDataStart[], gspS2DEX_fifoDataEnd[];
|
||||
extern u64 gspS2DEX_fifo_dTextStart[], gspS2DEX_fifo_dTextEnd[];
|
||||
extern u64 gspS2DEX_fifo_dDataStart[], gspS2DEX_fifo_dDataEnd[];
|
||||
extern u64 gspS2DEX2_fifoTextStart[], gspS2DEX2_fifoTextEnd[];
|
||||
extern u64 gspS2DEX2_fifoDataStart[], gspS2DEX2_fifoDataEnd[];
|
||||
extern u64 gspS2DEX2_xbusTextStart[], gspS2DEX2_xbusTextEnd[];
|
||||
extern u64 gspS2DEX2_xbusDataStart[], gspS2DEX2_xbusDataEnd[];
|
||||
|
||||
extern void guS2DInitBg(uObjBg *);
|
||||
|
||||
#ifdef F3DEX_GBI_2
|
||||
|
|
27
include/ultra64/ucode.h
Normal file
27
include/ultra64/ucode.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef ULTRA64_UCODE_H
|
||||
#define ULTRA64_UCODE_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define SP_DRAM_STACK_SIZE8 (0x400)
|
||||
#define SP_DRAM_STACK_SIZE64 (SP_DRAM_STACK_SIZE8 >> 3)
|
||||
|
||||
#define SP_UCODE_SIZE 0x1000
|
||||
|
||||
#define SP_UCODE_DATA_SIZE 0x800
|
||||
|
||||
extern u64 rspbootTextStart[], rspbootTextEnd[];
|
||||
|
||||
extern u64 aspMainTextStart[], aspMainTextEnd[];
|
||||
extern u64 aspMainDataStart[], aspMainDataEnd[];
|
||||
|
||||
extern u64 gspF3DZEX2_NoN_PosLight_fifoTextStart[], gspF3DZEX2_NoN_PosLight_fifoTextEnd[];
|
||||
extern u64 gspF3DZEX2_NoN_PosLight_fifoDataStart[], gspF3DZEX2_NoN_PosLight_fifoDataEnd[];
|
||||
|
||||
extern u64 gspS2DEX2d_fifoTextStart[], gspS2DEX2d_fifoTextEnd[];
|
||||
extern u64 gspS2DEX2d_fifoDataStart[], gspS2DEX2d_fifoDataEnd[];
|
||||
|
||||
extern u64 njpgdspMainTextStart[], njpgdspMainTextEnd[];
|
||||
extern u64 njpgdspMainDataStart[], njpgdspMainDataEnd[];
|
||||
|
||||
#endif
|
|
@ -12,8 +12,6 @@ extern u32 osResetType;
|
|||
extern u32 osMemSize;
|
||||
extern u8 osAppNMIBuffer[0x40];
|
||||
|
||||
extern u8 D_80009320[];
|
||||
extern u8 D_800093F0[];
|
||||
extern s8 D_80009430;
|
||||
extern u32 gDmaMgrVerbose;
|
||||
extern u32 gDmaMgrDmaBuffSize;
|
||||
|
@ -56,9 +54,6 @@ extern u32 __osBaseCounter;
|
|||
extern u32 __osViIntrCount;
|
||||
extern u32 __osTimerCounter;
|
||||
extern DmaEntry gDmaDataTable[0x60C];
|
||||
extern u64 D_801120C0[];
|
||||
extern u8 D_80113070[];
|
||||
extern u64 gJpegUCode[];
|
||||
extern EffectSsOverlay gEffectSsOverlayTable[EFFECT_SS_TYPE_MAX];
|
||||
extern Gfx D_80116280[];
|
||||
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
|
||||
|
@ -170,10 +165,6 @@ extern u8 gSoundFontTable[];
|
|||
extern u8 gSequenceFontTable[];
|
||||
extern u8 gSequenceTable[];
|
||||
extern u8 gSampleBankTable[];
|
||||
extern u8 D_80155F50[];
|
||||
extern u8 D_80157580[];
|
||||
extern u8 D_801579A0[];
|
||||
extern u64 gJpegUCodeData[];
|
||||
|
||||
extern SaveContext gSaveContext;
|
||||
extern GameInfo* gGameInfo;
|
||||
|
@ -229,8 +220,8 @@ extern __OSInode __osPfsInodeCache;
|
|||
extern OSPifRam gPifMempakBuf;
|
||||
extern u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH]; // 0x25800 bytes
|
||||
extern u64 gGfxSPTaskOutputBuffer[0x3000]; // 0x18000 bytes
|
||||
extern u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE]; // 0xC00 bytes
|
||||
extern u8 gGfxSPTaskStack[0x400]; // 0x400 bytes
|
||||
extern u64 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE / sizeof(u64)]; // 0xC00 bytes
|
||||
extern u64 gGfxSPTaskStack[SP_DRAM_STACK_SIZE64]; // 0x400 bytes
|
||||
extern GfxPool gGfxPools[2]; // 0x24820 bytes
|
||||
extern u8 gAudioHeap[0x38000]; // 0x38000 bytes
|
||||
extern u8 gSystemHeap[];
|
||||
|
|
|
@ -1843,19 +1843,22 @@ typedef struct {
|
|||
/* 0x100 */ u16 acCodes[256];
|
||||
} JpegHuffmanTableOld; // size = 0x300
|
||||
|
||||
typedef struct {
|
||||
typedef union {
|
||||
struct {
|
||||
/* 0x00 */ u32 address;
|
||||
/* 0x04 */ u32 mbCount;
|
||||
/* 0x08 */ u32 mode;
|
||||
/* 0x0C */ u32 qTableYPtr;
|
||||
/* 0x10 */ u32 qTableUPtr;
|
||||
/* 0x14 */ u32 qTableVPtr;
|
||||
/* 0x18 */ char unk_18[0x8];
|
||||
/* 0x18 */ u32 mbSize; // This field is used by the microcode to save the macroblock size during a yield
|
||||
};
|
||||
long long int force_structure_alignment;
|
||||
} JpegTaskData; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ JpegTaskData taskData;
|
||||
/* 0x020 */ char yieldData[0x200];
|
||||
/* 0x020 */ u64 yieldData[0x200 / sizeof(u64)];
|
||||
/* 0x220 */ JpegQuantizationTable qTableY;
|
||||
/* 0x2A0 */ JpegQuantizationTable qTableU;
|
||||
/* 0x320 */ JpegQuantizationTable qTableV;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue