summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--include/game.h2
-rw-r--r--include/libu64/debug.h (renamed from include/debug.h)4
-rw-r--r--include/libu64/gfxprint.h (renamed from include/gfxprint.h)4
-rw-r--r--include/libu64/mtxconv.h (renamed from include/mtxconv.h)4
-rw-r--r--include/libu64/pad.h (renamed from include/padutils.h)4
-rw-r--r--include/libu64/stackcheck.h (renamed from include/stackcheck.h)4
-rw-r--r--include/padmgr.h2
-rw-r--r--include/printutils.h2
-rw-r--r--linker_scripts/jp/symbol_addrs_boot.txt7
-rw-r--r--src/boot/boot_main.c2
-rw-r--r--src/boot/idle.c2
-rw-r--r--src/boot/libu64/pad.c (renamed from src/boot/O2/padutils.c)2
-rw-r--r--src/code/game.c2
-rw-r--r--src/code/irqmgr.c2
-rw-r--r--yamls/jp/boot.yaml36
16 files changed, 50 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index fe56337..d88e208 100644
--- a/Makefile
+++ b/Makefile
@@ -206,6 +206,7 @@ $(shell mkdir -p $(BUILD_DIR)/linker_scripts/$(VERSION) $(BUILD_DIR)/linker_scri
# directory flags
build/src/boot/O2/%.o: OPTFLAGS := -O2
+build/src/boot/libu64/%.o: OPTFLAGS := -O2
build/src/boot/libc64/%.o: OPTFLAGS := -O2
diff --git a/include/game.h b/include/game.h
index 3795c9c..999d56d 100644
--- a/include/game.h
+++ b/include/game.h
@@ -4,7 +4,7 @@
#include "ultra64.h"
#include "TwoHeadArena.h"
#include "gamealloc.h"
-#include "padutils.h"
+#include "libu64/pad.h"
#include "unk.h"
struct GameState;
diff --git a/include/debug.h b/include/libu64/debug.h
index 6769129..9eccc2c 100644
--- a/include/debug.h
+++ b/include/libu64/debug.h
@@ -1,5 +1,5 @@
-#ifndef DEBUG_H
-#define DEBUG_H
+#ifndef LIBU64_DEBUG_H
+#define LIBU64_DEBUG_H
#include "ultra64.h"
#include "attributes.h"
diff --git a/include/gfxprint.h b/include/libu64/gfxprint.h
index 76c07bf..8391b4b 100644
--- a/include/gfxprint.h
+++ b/include/libu64/gfxprint.h
@@ -1,5 +1,5 @@
-#ifndef GFX_PRINT_H
-#define GFX_PRINT_H
+#ifndef LIBU64_GFX_PRINT_H
+#define LIBU64_GFX_PRINT_H
#include "ultra64.h"
diff --git a/include/mtxconv.h b/include/libu64/mtxconv.h
index 6fcb27d..9a0c3cd 100644
--- a/include/mtxconv.h
+++ b/include/libu64/mtxconv.h
@@ -1,5 +1,5 @@
-#ifndef MTX_CONV_H
-#define MTX_CONV_H
+#ifndef LIBU64_MTX_CONV_H
+#define LIBU64_MTX_CONV_H
#include "ultra64.h"
diff --git a/include/padutils.h b/include/libu64/pad.h
index b8fe72b..8bc9c6f 100644
--- a/include/padutils.h
+++ b/include/libu64/pad.h
@@ -1,5 +1,5 @@
-#ifndef PAD_UTILS_H
-#define PAD_UTILS_H
+#ifndef LIBU64_PAD_H
+#define LIBU64_PAD_H
#include "ultra64.h"
diff --git a/include/stackcheck.h b/include/libu64/stackcheck.h
index 054b1ba..1ee3823 100644
--- a/include/stackcheck.h
+++ b/include/libu64/stackcheck.h
@@ -1,5 +1,5 @@
-#ifndef STACK_CHECK_H
-#define STACK_CHECK_H
+#ifndef LIBU64_STACK_CHECK_H
+#define LIBU64_STACK_CHECK_H
#include "ultra64.h"
diff --git a/include/padmgr.h b/include/padmgr.h
index 887188c..622a815 100644
--- a/include/padmgr.h
+++ b/include/padmgr.h
@@ -2,7 +2,7 @@
#define PADMGR_H
#include "ultra64.h"
-#include "padutils.h"
+#include "libu64/pad.h"
// void padmgr_LockSerialMesgQ();
// void padmgr_UnlockSerialMesgQ();
diff --git a/include/printutils.h b/include/printutils.h
index 5a4adeb..4e627ef 100644
--- a/include/printutils.h
+++ b/include/printutils.h
@@ -3,7 +3,7 @@
#include "ultra64.h"
-// void PrintUtils_VPrintf();
+// void vaprintf();
// void PrintUtils_Printf();
#endif
diff --git a/linker_scripts/jp/symbol_addrs_boot.txt b/linker_scripts/jp/symbol_addrs_boot.txt
index 6854003..cdafb3a 100644
--- a/linker_scripts/jp/symbol_addrs_boot.txt
+++ b/linker_scripts/jp/symbol_addrs_boot.txt
@@ -249,7 +249,7 @@ proutSprintf = 0x8002D850; // type:func
vsprintf = 0x8002D874; // type:func
sprintf = 0x8002D8C4; // type:func
-PrintUtils_VPrintf = 0x8002D920; // type:func
+vaprintf = 0x8002D920; // type:func
PrintUtils_Printf = 0x8002D954; // type:func
csleep = 0x8002D980; // type:func
@@ -275,8 +275,9 @@ D_8003BBE0_jp = 0x8003BBE0; //
D_8003BBF0_jp = 0x8003BBF0; //
D_8003BC38_jp = 0x8003BC38; //
D_8003BC50_jp = 0x8003BC50; //
-D_8003BC90_jp = 0x8003BC90; //
-D_8003BC94_jp = 0x8003BC94; //
+
+D_8003BC90_jp = 0x8003BC90; // size:0x4
+D_8003BC94_jp = 0x8003BC94; // size:0x4
gOverlayLogSeverity = 0x8003BCA0 // type:s32 size:0x4
diff --git a/src/boot/boot_main.c b/src/boot/boot_main.c
index 3ccd5e6..2ae5cfa 100644
--- a/src/boot/boot_main.c
+++ b/src/boot/boot_main.c
@@ -4,7 +4,7 @@
#include "m_thread.h"
#include "segment_symbols.h"
#include "stack.h"
-#include "stackcheck.h"
+#include "libu64/stackcheck.h"
STACK(sIdleStack, 0x400);
StackEntry sIdleStackInfo;
diff --git a/src/boot/idle.c b/src/boot/idle.c
index 0acda33..a958fd6 100644
--- a/src/boot/idle.c
+++ b/src/boot/idle.c
@@ -6,7 +6,7 @@
#include "m_thread.h"
#include "segment_symbols.h"
#include "stack.h"
-#include "stackcheck.h"
+#include "libu64/stackcheck.h"
#include "z_std_dma.h"
OSThread sMainThread;
diff --git a/src/boot/O2/padutils.c b/src/boot/libu64/pad.c
index 73745ac..9b82212 100644
--- a/src/boot/O2/padutils.c
+++ b/src/boot/libu64/pad.c
@@ -1,4 +1,4 @@
-#include "padutils.h"
+#include "libu64/pad.h"
void pad_init(Input* input) {
bzero(input, sizeof(Input));
diff --git a/src/code/game.c b/src/code/game.c
index 706b5c9..480dba1 100644
--- a/src/code/game.c
+++ b/src/code/game.c
@@ -4,7 +4,7 @@
#include "67E840.h"
#include "speed_meter.h"
#include "graph.h"
-#include "debug.h"
+#include "libu64/debug.h"
#include "libc64/malloc.h"
#include "6EDD10.h"
#include "padmgr.h"
diff --git a/src/code/irqmgr.c b/src/code/irqmgr.c
index d6afb3a..82cd38d 100644
--- a/src/code/irqmgr.c
+++ b/src/code/irqmgr.c
@@ -1,6 +1,6 @@
#include "irqmgr.h"
-#include "stackcheck.h"
+#include "libu64/stackcheck.h"
#include "m_thread.h"
#include "PR/os_internal.h"
#include "macros.h"
diff --git a/yamls/jp/boot.yaml b/yamls/jp/boot.yaml
index 25ae1e2..0529cf5 100644
--- a/yamls/jp/boot.yaml
+++ b/yamls/jp/boot.yaml
@@ -15,12 +15,18 @@
- [0x0026C0, asm, boot/syncprintf]
- [0x002720, asm, boot/fault]
- [0x004F70, asm, boot/fault_drawer]
- - [0x0059F0, c, boot/O2/padutils]
- - [0x005BE0, asm, boot/stackcheck]
- - [0x005E30, asm, boot/gfxprint]
- - [0x006BA0, asm, boot/mtxuty-cvt]
+
+ - [0x0059F0, c, boot/libu64/pad]
+ - [0x005BE0, asm, boot/libu64/stackcheck]
+ - [0x005E30, asm, boot/libu64/gfxprint]
+
+ - [0x006BA0, asm, boot/libu64/mtxuty-cvt]
+
+ # TODO: figure out if this file belong to libu64
- [0x006D10, c, boot/O2/loadfragment2]
- - [0x007000, asm, boot/debug]
+
+ - [0x007000, asm, boot/libu64/debug]
+
- [0x007060, asm, boot/007060]
- [0x0073A0, asm, boot/0073A0]
- [0x0073F0, asm, boot/padsetup]
@@ -205,8 +211,14 @@
- [0x016FC0, .data, boot/idle]
- [0x016FD0, data, boot/016FD0]
+
+ - [0x017090, data, boot/libu64/stackcheck]
+
+ # TODO: figure out if this file belong to libu64
- [0x0170A0, .data, boot/logseverity]
- - [0x0170B0, data, boot/gfxprint]
+
+ - [0x0170B0, data, boot/libu64/gfxprint_data]
+
- [0x017960, data, boot/017960] # boot/007060 starts around here, but no idea where it ends
# libultra
@@ -243,8 +255,11 @@
- [0x0187F0, rodata, boot/0187F0]
- [0x018840, rodata, boot/018840]
- [0x019250, rodata, boot/019250]
- - [0x019690, rodata, boot/019690]
- - [0x0196B0, rodata, boot/0196B0]
+
+ # libu64
+ - [0x019690, rodata, boot/libu64/gfxprint]
+ - [0x0196B0, rodata, boot/libu64/debug]
+
- [0x0196C0, rodata, boot/0196C0]
- [0x019710, .rodata, boot/libc64/__osMalloc]
@@ -267,7 +282,10 @@
- { start: 0x019D40, type: .bss, vram: 0x8003F330, name: boot/idle }
- { start: 0x019D40, type: .bss, vram: 0x8003FF30, name: boot/viconfig }
- { start: 0x019D40, type: bss, vram: 0x8003FF40, name: boot/8003FF40 }
- - { start: 0x019D40, type: bss, vram: 0x800419A0, name: boot/gfxprint }
+
+ # libu64
+ - { start: 0x019D40, type: bss, vram: 0x800419A0, name: boot/libu64/gfxprint }
+
- { start: 0x019D40, type: bss, vram: 0x800419B0, name: boot/mathf }
- { start: 0x019D40, type: .bss, vram: 0x800419C0, name: boot/libc64/malloc }
- { start: 0x019D40, type: bss, vram: 0x800419F0, name: boot/800419F0 }