1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +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:
Tharo 2022-05-03 23:43:09 +01:00 committed by GitHub
parent 912b916875
commit 765cfd63e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 173 additions and 127 deletions

View file

@ -0,0 +1,22 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel gSoundFontTable
.incbin "baserom.z64", 0xBCC270, 0x270
glabel gSequenceFontTable
.incbin "baserom.z64", 0xBCC4E0, 0x1C0
glabel gSequenceTable
.incbin "baserom.z64", 0xBCC6A0, 0x6F0
glabel gSampleBankTable
.incbin "baserom.z64", 0xBCCD90, 0x80

View file

@ -9,30 +9,22 @@
.balign 16
glabel gSoundFontTable
.incbin "baserom.z64", 0xBCC270, 0x270
glabel gSequenceFontTable
.incbin "baserom.z64", 0xBCC4E0, 0x1C0
glabel gSequenceTable
.incbin "baserom.z64", 0xBCC6A0, 0x6F0
glabel gSampleBankTable
.incbin "baserom.z64", 0xBCCD90, 0x80
glabel rspAspMainDataStart
glabel aspMainDataStart
.incbin "baserom.z64", 0xBCCE10, 0x2E0
glabel rspAspMainDataEnd
glabel aspMainDataEnd
glabel D_80155F50
glabel gspF3DZEX2_NoN_PosLight_fifoTextStart
.incbin "baserom.z64", 0xBCD0F0, 0x1630
glabel gspF3DZEX2_NoN_PosLight_fifoTextEnd
glabel D_80157580
glabel gspF3DZEX2_NoN_PosLight_fifoDataStart
.incbin "baserom.z64", 0xBCE720, 0x420
glabel gspF3DZEX2_NoN_PosLight_fifoDataEnd
glabel D_801579A0
glabel gspS2DEX2d_fifoDataStart
.incbin "baserom.z64", 0xBCEB40, 0x390
glabel gspS2DEX2d_fifoDataEnd
glabel gJpegUCodeData
glabel njpgdspMainDataStart
.incbin "baserom.z64", 0xBCEED0, 0x60
glabel njpgdspMainDataEnd

View file

@ -9,11 +9,14 @@
.balign 16
glabel D_801120C0
glabel aspMainTextStart
.incbin "baserom.z64", 0xB89260, 0xFB0
glabel aspMainTextEnd
glabel D_80113070
glabel gspS2DEX2d_fifoTextStart
.incbin "baserom.z64", 0xB8A210, 0x18C0
glabel gspS2DEX2d_fifoTextEnd
glabel gJpegUCode
glabel njpgdspMainTextStart
.incbin "baserom.z64", 0xB8BAD0, 0xAF0
glabel njpgdspMainTextEnd

View file

@ -9,8 +9,6 @@
.balign 16
glabel D_80009320
glabel rspbootTextStart
.incbin "baserom.z64", 0x9F20, 0xD0
glabel D_800093F0
.incbin "baserom.z64", 0x9FF0, 0x20
glabel rspbootTextEnd

23
data/unk_800093F0.data.s Normal file
View file

@ -0,0 +1,23 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .data
.balign 16
# Unused.
# This appears to be RSP code, however it is not part of
# rspboot as rspbootTextEnd is at this symbol
glabel D_800093F0
.word 0xE80C2001 # sqv $v12[0], 0x10($zero)
.word 0x34014000 # li $1, 0x4000
.word 0x40812000 # mtc0 $1, SP_STATUS
.word 0x0000000D # break
.word 0x00000000 # nop
.word 0x09000425 # j 0x04001094
.word 0x00000000 # nop
.word 0x00000000 # nop

View file

@ -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);

View file

@ -28,5 +28,6 @@
#include "ultra64/pfs.h"
#include "ultra64/motor.h"
#include "ultra64/r4300.h"
#include "ultra64/ucode.h"
#endif

View file

@ -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

View file

@ -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
View 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

View file

@ -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[];

View file

@ -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;

2
spec
View file

@ -13,6 +13,7 @@ beginseg
name "boot"
address 0x80000460
include "build/src/boot/boot_main.o"
include "build/data/unk_800093F0.data.o"
include "build/data/unk_80009410.data.o"
include "build/src/boot/idle.o"
include "build/src/boot/viconfig.o"
@ -515,6 +516,7 @@ beginseg
include_data_with_rodata "build/src/code/z_message_PAL.o"
include "build/src/code/z_game_over.o"
include "build/src/code/z_construct.o"
include "build/data/audio_tables.rodata.o"
include "build/data/rsp.text.o"
include "build/data/rsp.rodata.o"
endseg

View file

@ -4,10 +4,10 @@
u64 gGfxSPTaskOutputBuffer[0x3000];
// 0xC00 bytes
u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
u64 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE / sizeof(u64)];
// 0x400 bytes
u8 gGfxSPTaskStack[0x400];
u64 gGfxSPTaskStack[SP_DRAM_STACK_SIZE64];
// 0x12410 bytes each; 0x24820 bytes total
GfxPool gGfxPools[2];

View file

@ -35,9 +35,6 @@ AudioTask* func_800E4FE0(void) {
return func_800E5000();
}
extern u64 rspAspMainDataStart[];
extern u64 rspAspMainDataEnd[];
AudioTask* func_800E5000(void) {
static s32 sMaxAbiCmdCnt = 0x80;
static AudioTask* sWaitingAudioTask = NULL;
@ -178,12 +175,12 @@ AudioTask* func_800E5000(void) {
task = &gAudioContext.currTask->task.t;
task->type = M_AUDTASK;
task->flags = 0;
task->ucode_boot = D_801120C0;
task->ucode_boot_size = 0x1000;
task->ucode_data_size = ((rspAspMainDataEnd - rspAspMainDataStart) * sizeof(u64)) - 1;
task->ucode = D_801120C0;
task->ucode_data = rspAspMainDataStart;
task->ucode_size = 0x1000;
task->ucode_boot = aspMainTextStart;
task->ucode_boot_size = SP_UCODE_SIZE;
task->ucode_data_size = (size_t)(aspMainDataEnd - aspMainDataStart) * sizeof(u64) - 1;
task->ucode = aspMainTextStart;
task->ucode_data = aspMainDataStart;
task->ucode_size = SP_UCODE_SIZE;
task->dram_stack = NULL;
task->dram_stack_size = 0;
task->output_buff = NULL;

View file

@ -11,15 +11,15 @@ CfbInfo sGraphCfbInfos[3];
FaultClient sGraphUcodeFaultClient;
UCodeInfo D_8012D230[3] = {
{ UCODE_F3DZEX, D_80155F50 },
{ UCODE_F3DZEX, gspF3DZEX2_NoN_PosLight_fifoTextStart },
{ UCODE_UNK, NULL },
{ UCODE_S2DEX, D_80113070 },
{ UCODE_S2DEX, gspS2DEX2d_fifoTextStart },
};
UCodeInfo D_8012D248[3] = {
{ UCODE_F3DZEX, D_80155F50 },
{ UCODE_F3DZEX, gspF3DZEX2_NoN_PosLight_fifoTextStart },
{ UCODE_UNK, NULL },
{ UCODE_S2DEX, D_80113070 },
{ UCODE_S2DEX, gspS2DEX2d_fifoTextStart },
};
void Graph_FaultClient(void) {
@ -38,7 +38,7 @@ void Graph_DisassembleUCode(Gfx* workBuf) {
UCodeDisas_Init(&disassembler);
disassembler.enableLog = HREG(83);
UCodeDisas_RegisterUCode(&disassembler, ARRAY_COUNT(D_8012D230), D_8012D230);
UCodeDisas_SetCurUCode(&disassembler, D_80155F50);
UCodeDisas_SetCurUCode(&disassembler, gspF3DZEX2_NoN_PosLight_fifoTextStart);
UCodeDisas_Disassemble(&disassembler, workBuf);
HREG(93) = disassembler.dlCnt;
HREG(84) = disassembler.tri2Cnt * 2 + disassembler.tri1Cnt + (disassembler.quadCnt * 2) + disassembler.lineCnt;
@ -72,7 +72,7 @@ void Graph_UCodeFaultClient(Gfx* workBuf) {
UCodeDisas_Init(&disassembler);
disassembler.enableLog = true;
UCodeDisas_RegisterUCode(&disassembler, ARRAY_COUNT(D_8012D248), D_8012D248);
UCodeDisas_SetCurUCode(&disassembler, D_80155F50);
UCodeDisas_SetCurUCode(&disassembler, gspF3DZEX2_NoN_PosLight_fifoTextStart);
UCodeDisas_Disassemble(&disassembler, workBuf);
UCodeDisas_Destroy(&disassembler);
}
@ -200,21 +200,21 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
task->ucode_boot_size = SysUcode_GetUCodeBootSize();
task->ucode = SysUcode_GetUCode();
task->ucode_data = SysUcode_GetUCodeData();
task->ucode_size = 0x1000;
task->ucode_data_size = 0x800;
task->dram_stack = (u64*)gGfxSPTaskStack;
task->ucode_size = SP_UCODE_SIZE;
task->ucode_data_size = SP_UCODE_DATA_SIZE;
task->dram_stack = gGfxSPTaskStack;
task->dram_stack_size = sizeof(gGfxSPTaskStack);
task->output_buff = gGfxSPTaskOutputBuffer;
task->output_buff_size = (u64*)((u8*)gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer));
task->output_buff_size = gGfxSPTaskOutputBuffer + ARRAY_COUNT(gGfxSPTaskOutputBuffer);
task->data_ptr = (u64*)gfxCtx->workBuffer;
OPEN_DISPS(gfxCtx, "../graph.c", 828);
task->data_size = (u32)WORK_DISP - (u32)gfxCtx->workBuffer;
task->data_size = (uintptr_t)WORK_DISP - (uintptr_t)gfxCtx->workBuffer;
CLOSE_DISPS(gfxCtx, "../graph.c", 830);
{ s32 pad2; } // Necessary to match stack usage
task->yield_data_ptr = (u64*)gGfxSPTaskYieldBuffer;
task->yield_data_ptr = gGfxSPTaskYieldBuffer;
task->yield_data_size = sizeof(gGfxSPTaskYieldBuffer);
scTask->next = NULL;

View file

@ -1,20 +1,20 @@
#include "global.h"
u32 D_8012DBA0 = (u32)&D_80155F50;
u32 D_8012DBA4 = (u32)&D_80157580;
u64* sDefaultGSPUCodeText = gspF3DZEX2_NoN_PosLight_fifoTextStart;
u64* sDefaultGSPUCodeData = gspF3DZEX2_NoN_PosLight_fifoDataStart;
u32 SysUcode_GetUCodeBoot(void) {
return &D_80009320;
u64* SysUcode_GetUCodeBoot(void) {
return rspbootTextStart;
}
u32 SysUcode_GetUCodeBootSize(void) {
return (u32)&D_800093F0 - (u32)&D_80009320;
size_t SysUcode_GetUCodeBootSize(void) {
return (size_t)((u8*)rspbootTextEnd - (u8*)rspbootTextStart);
}
u32 SysUcode_GetUCode(void) {
return D_8012DBA0;
u64* SysUcode_GetUCode(void) {
return sDefaultGSPUCodeText;
}
u32 SysUcode_GetUCodeData(void) {
return D_8012DBA4;
u64* SysUcode_GetUCodeData(void) {
return sDefaultGSPUCodeData;
}

View file

@ -18,47 +18,47 @@
* Configures and schedules a JPEG decoder task and waits for it to finish.
*/
void Jpeg_ScheduleDecoderTask(JpegContext* ctx) {
static OSTask_t sJpegTask = {
M_NJPEGTASK, // type
0, // flags
NULL, // ucode_boot
0, // ucode_boot_size
gJpegUCode, // ucode
0x1000, // ucode_size
gJpegUCodeData, // ucode_data
0x800, // ucode_data_size
NULL, // dram_stack
0, // dram_stack_size
NULL, // output_buff
NULL, // output_buff_size
NULL, // data_ptr
sizeof(JpegTaskData), // data_size
NULL, // yield_data_ptr
0x200, // yield_data_size
static OSTask sJpegTask = {
M_NJPEGTASK, // type
0, // flags
NULL, // ucode_boot
0, // ucode_boot_size
njpgdspMainTextStart, // ucode
SP_UCODE_SIZE, // ucode_size
njpgdspMainDataStart, // ucode_data
SP_UCODE_DATA_SIZE, // ucode_data_size
NULL, // dram_stack
0, // dram_stack_size
NULL, // output_buff
NULL, // output_buff_size
NULL, // data_ptr
sizeof(JpegTaskData), // data_size
NULL, // yield_data_ptr
sizeof(ctx->workBuf->yieldData), // yield_data_size
};
JpegWork* workBuf = ctx->workBuf;
s32 pad[2];
workBuf->taskData.address = PHYSICAL_TO_VIRTUAL(&workBuf->data);
workBuf->taskData.address = VIRTUAL_TO_PHYSICAL(&workBuf->data);
workBuf->taskData.mode = ctx->mode;
workBuf->taskData.mbCount = 4;
workBuf->taskData.qTableYPtr = PHYSICAL_TO_VIRTUAL(&workBuf->qTableY);
workBuf->taskData.qTableUPtr = PHYSICAL_TO_VIRTUAL(&workBuf->qTableU);
workBuf->taskData.qTableVPtr = PHYSICAL_TO_VIRTUAL(&workBuf->qTableV);
workBuf->taskData.qTableYPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableY);
workBuf->taskData.qTableUPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableU);
workBuf->taskData.qTableVPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableV);
sJpegTask.flags = 0;
sJpegTask.ucode_boot = SysUcode_GetUCodeBoot();
sJpegTask.ucode_boot_size = SysUcode_GetUCodeBootSize();
sJpegTask.yield_data_ptr = (u64*)&workBuf->yieldData;
sJpegTask.data_ptr = (u64*)&workBuf->taskData;
sJpegTask.t.flags = 0;
sJpegTask.t.ucode_boot = SysUcode_GetUCodeBoot();
sJpegTask.t.ucode_boot_size = SysUcode_GetUCodeBootSize();
sJpegTask.t.yield_data_ptr = workBuf->yieldData;
sJpegTask.t.data_ptr = (u64*)&workBuf->taskData;
ctx->scTask.next = NULL;
ctx->scTask.flags = OS_SC_NEEDS_RSP;
ctx->scTask.msgQueue = &ctx->mq;
ctx->scTask.msg = NULL;
ctx->scTask.framebuffer = NULL;
ctx->scTask.list.t = sJpegTask;
ctx->scTask.list = sJpegTask;
osSendMesg(&gSchedContext.cmdQueue, (OSMesg)&ctx->scTask, OS_MESG_BLOCK);
Sched_SendEntryMsg(&gSchedContext); // osScKickEntryMsg

View file

@ -336,8 +336,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
}
if (drawBg) {
// gSPLoadUcodeL(POLY_OPA_DISP++, rspS2DEX)?
gSPLoadUcodeEx(POLY_OPA_DISP++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800);
gSPLoadUcodeL(POLY_OPA_DISP++, gspS2DEX2d_fifo);
{
Vec3f sp60;
@ -350,8 +349,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
POLY_OPA_DISP = spA8;
}
// gSPLoadUcode(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData())?
gSPLoadUcodeEx(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800);
gSPLoadUcode(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
}
}
@ -432,8 +430,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
}
if (drawBg) {
// gSPLoadUcodeL(POLY_OPA_DISP++, rspS2DEX)?
gSPLoadUcodeEx(POLY_OPA_DISP++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800);
gSPLoadUcodeL(POLY_OPA_DISP++, gspS2DEX2d_fifo);
{
Vec3f skyboxOffset;
@ -447,8 +444,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
POLY_OPA_DISP = gfx;
}
// gSPLoadUcode(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData())?
gSPLoadUcodeEx(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800);
gSPLoadUcode(POLY_OPA_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
}
}

View file

@ -529,14 +529,12 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
Gfx* sp1CC = POLY_OPA_DISP;
void* mapImage = gWorldMapImageTex;
// gSPLoadUcodeL(sp1CC++, rspS2DEX)?
gSPLoadUcodeEx(sp1CC++, OS_K0_TO_PHYSICAL(D_80113070), OS_K0_TO_PHYSICAL(D_801579A0), 0x800);
gSPLoadUcodeL(sp1CC++, gspS2DEX2d_fifo);
func_8009638C(&sp1CC, mapImage, gWorldMapImageTLUT, 216, 128, G_IM_FMT_CI, G_IM_SIZ_8b, 0x8000, 256,
HREG(13) / 100.0f, HREG(14) / 100.0f);
// gSPLoadUcode(sp1CC++, SysUcode_GetUCode(), SysUcode_GetUCodeData())?
gSPLoadUcodeEx(sp1CC++, SysUcode_GetUCode(), SysUcode_GetUCodeData(), 0x800);
gSPLoadUcode(sp1CC++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
POLY_OPA_DISP = sp1CC;
}