mirror of https://github.com/zeldaret/mm.git
Split file in boot as functions differ in opt level
This commit is contained in:
parent
5cda2411e7
commit
62a88f34a6
10
Makefile
10
Makefile
|
@ -17,6 +17,7 @@ OPTIMIZATION := -O2 -g3
|
||||||
build/src/libultra/os/%: OPTIMIZATION := -O1
|
build/src/libultra/os/%: OPTIMIZATION := -O1
|
||||||
build/src/libultra/io/%: OPTIMIZATION := -O2
|
build/src/libultra/io/%: OPTIMIZATION := -O2
|
||||||
build/src/libultra/libc/%: OPTIMIZATION := -O2
|
build/src/libultra/libc/%: OPTIMIZATION := -O2
|
||||||
|
build/src/boot_O2_g3/%: OPTIMIZATION := -O2 -g3
|
||||||
test.txt: OPTIMIZATION := -O2 -g3
|
test.txt: OPTIMIZATION := -O2 -g3
|
||||||
test.txt: MIPS_VERSION := -mips2
|
test.txt: MIPS_VERSION := -mips2
|
||||||
|
|
||||||
|
@ -24,7 +25,13 @@ BASEROM_FILES := $(wildcard baserom/*)
|
||||||
BASEROM_O_FILES := $(BASEROM_FILES:baserom/%=build/baserom/%.o)
|
BASEROM_O_FILES := $(BASEROM_FILES:baserom/%=build/baserom/%.o)
|
||||||
S_FILES := $(wildcard asm/*)
|
S_FILES := $(wildcard asm/*)
|
||||||
S_O_FILES = $(S_FILES:asm/%.asm=build/asm/%.o)
|
S_O_FILES = $(S_FILES:asm/%.asm=build/asm/%.o)
|
||||||
C_FILES := $(wildcard src/*) $(wildcard src/libultra/*) $(wildcard src/libultra/os/*) $(wildcard src/libultra/io/*) $(wildcard src/libultra/libc/*) $(wildcard src/code/*)
|
C_FILES := $(wildcard src/*) \
|
||||||
|
$(wildcard src/libultra/*) \
|
||||||
|
$(wildcard src/libultra/os/*) \
|
||||||
|
$(wildcard src/libultra/io/*) \
|
||||||
|
$(wildcard src/libultra/libc/*) \
|
||||||
|
$(wildcard src/code/*) \
|
||||||
|
$(wildcard src/boot_O2_g3/*)
|
||||||
C_O_FILES = $(C_FILES:src/%.c=build/src/%.o)
|
C_O_FILES = $(C_FILES:src/%.c=build/src/%.o)
|
||||||
O_FILES := $(BASEROM_O_FILES) $(S_O_FILES)
|
O_FILES := $(BASEROM_O_FILES) $(S_O_FILES)
|
||||||
|
|
||||||
|
@ -41,6 +48,7 @@ $(shell mkdir -p build/src/libultra/os)
|
||||||
$(shell mkdir -p build/src/libultra/io)
|
$(shell mkdir -p build/src/libultra/io)
|
||||||
$(shell mkdir -p build/src/libultra/libc)
|
$(shell mkdir -p build/src/libultra/libc)
|
||||||
$(shell mkdir -p build/src/code)
|
$(shell mkdir -p build/src/code)
|
||||||
|
$(shell mkdir -p build/src/boot_O2_g3)
|
||||||
|
|
||||||
check: $(ROM) code.bin boot.bin
|
check: $(ROM) code.bin boot.bin
|
||||||
@md5sum -c checksum.md5
|
@md5sum -c checksum.md5
|
||||||
|
|
|
@ -2,7 +2,8 @@ SECTIONS
|
||||||
{
|
{
|
||||||
boot 0x80080060:
|
boot 0x80080060:
|
||||||
{
|
{
|
||||||
build/asm/boot_0x80080060.o(.text)
|
build/src/boot_O2_g3/boot_0x80080060.o(.text)
|
||||||
|
build/asm/boot_0x80080180.o(.text)
|
||||||
build/asm/boot_0x800805E0.o(.text)
|
build/asm/boot_0x800805E0.o(.text)
|
||||||
build/asm/boot_0x80080790.o(.text)
|
build/asm/boot_0x80080790.o(.text)
|
||||||
build/asm/boot_0x80080E30.o(.text)
|
build/asm/boot_0x80080E30.o(.text)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
known_objects = {
|
known_objects = {
|
||||||
|
0x80080180:"",
|
||||||
0x80087b00:"setcause",
|
0x80087b00:"setcause",
|
||||||
0x80087b10:"sendmesg",
|
0x80087b10:"sendmesg",
|
||||||
0x80087e10:"stopthread",
|
0x80087e10:"stopthread",
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#include <ultra64.h>
|
||||||
|
#include <global.h>
|
||||||
|
|
||||||
|
UNK_RET func_80080060(void) {
|
||||||
|
func_80085320(&D_80099500, &D_80099AF0, &D_80099EF0, 0, -1, &D_80098190);
|
||||||
|
D_80000318 = func_8008D350();
|
||||||
|
func_800818F4();
|
||||||
|
func_8008A6FC();
|
||||||
|
osUnmapTLBAll();
|
||||||
|
D_80096B40 = func_80092920();
|
||||||
|
func_80085320(&D_80099AD0, &D_800996D0, &D_80099AD0_, 0, 256, &D_80098198);
|
||||||
|
osCreateThread(&D_80099520, 1, (void(*)(void*))func_80080514, 0, &D_80099AD0, 12);
|
||||||
|
osStartThread(&D_80099520);
|
||||||
|
}
|
||||||
|
|
||||||
|
void func_80080150(UNK_PTR a0, UNK_PTR a1) {
|
||||||
|
if (a0 < a1) {
|
||||||
|
_blkclr(a0, (u32)a1 - (u32)a0);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue