From a30f130eb9e48d55d8d7c935fb708af1156fee42 Mon Sep 17 00:00:00 2001 From: cadmic Date: Sat, 7 Sep 2024 05:10:52 -0700 Subject: [PATCH] Fix some boot and code data (#2155) --- baseroms/ntsc-1.2/config.yml | 20 ++++++++++---------- data/rsp.rodata.s | 2 ++ data/rsp.text.s | 6 ++++++ data/unk_80009410.data.s | 6 ++++++ spec | 11 ++++++++++- src/boot/z_std_dma.c | 3 +++ src/code/code_800FC620.c | 2 ++ 7 files changed, 39 insertions(+), 11 deletions(-) diff --git a/baseroms/ntsc-1.2/config.yml b/baseroms/ntsc-1.2/config.yml index fef7e941c6..a64d9547ec 100644 --- a/baseroms/ntsc-1.2/config.yml +++ b/baseroms/ntsc-1.2/config.yml @@ -11,18 +11,22 @@ incbins: - name: rspbootText segment: boot vram: 0x800065C0 - size: 0xD0 + size: 0x160 - name: aspMainText segment: code vram: 0x800E3600 size: 0xFB0 - - name: gspS2DEX2d_fifoText + - name: gspF3DZEX2_NoN_PosLight_fifoText segment: code vram: 0x800E45B0 + size: 0x1390 + - name: gspS2DEX2d_fifoText + segment: code + vram: 0x800E5940 size: 0x18C0 - name: njpgdspMainText segment: code - vram: 0x800E5E70 + vram: 0x800E7200 size: 0xAF0 - name: gSequenceFontTable segment: code @@ -36,21 +40,17 @@ incbins: segment: code vram: 0x80114990 size: 0x2E0 - - name: gspF3DZEX2_NoN_PosLight_fifoText - segment: code - vram: 0x80114C70 - size: 0x1630 - name: gspF3DZEX2_NoN_PosLight_fifoData segment: code - vram: 0x801162A0 + vram: 0x80114C70 size: 0x420 - name: gspS2DEX2d_fifoData segment: code - vram: 0x801166C0 + vram: 0x80115090 size: 0x390 - name: njpgdspMainData segment: code - vram: 0x80116A50 + vram: 0x80115420 size: 0x60 variables: gMtxClear: 0x800FF3F0 diff --git a/data/rsp.rodata.s b/data/rsp.rodata.s index bdb9fe9912..6688f7c627 100644 --- a/data/rsp.rodata.s +++ b/data/rsp.rodata.s @@ -13,9 +13,11 @@ glabel aspMainDataStart .incbin "incbin/aspMainData" glabel aspMainDataEnd +#if !PLATFORM_N64 glabel gspF3DZEX2_NoN_PosLight_fifoTextStart .incbin "incbin/gspF3DZEX2_NoN_PosLight_fifoText" glabel gspF3DZEX2_NoN_PosLight_fifoTextEnd +#endif glabel gspF3DZEX2_NoN_PosLight_fifoDataStart .incbin "incbin/gspF3DZEX2_NoN_PosLight_fifoData" diff --git a/data/rsp.text.s b/data/rsp.text.s index fcf48a2515..a40252853a 100644 --- a/data/rsp.text.s +++ b/data/rsp.text.s @@ -13,6 +13,12 @@ glabel aspMainTextStart .incbin "incbin/aspMainText" glabel aspMainTextEnd +#if PLATFORM_N64 +glabel gspF3DZEX2_NoN_PosLight_fifoTextStart + .incbin "incbin/gspF3DZEX2_NoN_PosLight_fifoText" +glabel gspF3DZEX2_NoN_PosLight_fifoTextEnd +#endif + glabel gspS2DEX2d_fifoTextStart .incbin "incbin/gspS2DEX2d_fifoText" glabel gspS2DEX2d_fifoTextEnd diff --git a/data/unk_80009410.data.s b/data/unk_80009410.data.s index 8ff273e224..175b179a58 100644 --- a/data/unk_80009410.data.s +++ b/data/unk_80009410.data.s @@ -13,9 +13,15 @@ glabel D_80009410 .word osStopThread .word __osSetHWIntrRoutine +#if PLATFORM_N64 + .word osEPiWriteIo + .word osEPiReadIo +#endif .word __osSetFpcCsr .word __osGetFpcCsr .word __osGetHWIntrRoutine .word __osSetHWIntrRoutine .word osViGetNextFramebuffer +#if !PLATFORM_N64 .word bcmp +#endif diff --git a/spec b/spec index b82247e1fa..378485e84b 100644 --- a/spec +++ b/spec @@ -129,6 +129,9 @@ beginseg include "$(BUILD_DIR)/src/libultra/libc/xlitob.o" include "$(BUILD_DIR)/src/libultra/libc/ldiv.o" include "$(BUILD_DIR)/src/libultra/libc/xldtob.o" +#endif +#if PLATFORM_N64 + include "$(BUILD_DIR)/src/libultra/os/settimer.o" #endif include "$(BUILD_DIR)/src/libultra/io/sirawwrite.o" include "$(BUILD_DIR)/src/libultra/io/vimgr.o" @@ -730,8 +733,14 @@ beginseg #if !OOT_DEBUG include "$(BUILD_DIR)/src/libultra/io/pfsisplug.o" #endif +#if !PLATFORM_N64 include "$(BUILD_DIR)/src/libultra/os/settimer.o" -#if !OOT_DEBUG +#endif +#if PLATFORM_N64 + include "$(BUILD_DIR)/src/libultra/libc/xlitob.o" + include "$(BUILD_DIR)/src/libultra/libc/ldiv.o" + include "$(BUILD_DIR)/src/libultra/libc/xldtob.o" +#elif !OOT_DEBUG include "$(BUILD_DIR)/src/libultra/libc/xldtob.o" include "$(BUILD_DIR)/src/libultra/libc/ldiv.o" include "$(BUILD_DIR)/src/libultra/libc/xlitob.o" diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index 69d48eed92..1bd0f71701 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -33,8 +33,11 @@ OSMesgQueue sDmaMgrMsgQueue; OSMesg sDmaMgrMsgBuf[32]; OSThread sDmaMgrThread; STACK(sDmaMgrStack, 0x500); + +#if OOT_DEBUG const char* sDmaMgrCurFileName; s32 sDmaMgrCurFileLine; +#endif u32 gDmaMgrVerbose = 0; size_t gDmaMgrDmaBuffSize = DMAMGR_DEFAULT_BUFSIZE; diff --git a/src/code/code_800FC620.c b/src/code/code_800FC620.c index 4d7b7b4efe..373f1d53c6 100644 --- a/src/code/code_800FC620.c +++ b/src/code/code_800FC620.c @@ -20,10 +20,12 @@ char sNew[] = "new"; char sNew[] = ""; #endif +#if !PLATFORM_N64 char D_80134488[0x18] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, }; +#endif // possibly some kind of new() function void* func_800FC800(u32 size) {