You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
188
Makefile
188
Makefile
@@ -18,13 +18,8 @@ DEFINES :=
|
|||||||
# Build for the N64 (turn this off for ports)
|
# Build for the N64 (turn this off for ports)
|
||||||
TARGET_N64 ?= 1
|
TARGET_N64 ?= 1
|
||||||
|
|
||||||
|
COMPILER ?= gcc
|
||||||
# COMPILER - selects the C compiler to use
|
$(eval $(call validate-option,COMPILER, gcc))
|
||||||
# ido - uses the SGI IRIS Development Option compiler, which is used to build
|
|
||||||
# an original matching N64 ROM
|
|
||||||
# gcc - uses the GNU C Compiler
|
|
||||||
COMPILER ?= ido
|
|
||||||
$(eval $(call validate-option,COMPILER,ido gcc))
|
|
||||||
|
|
||||||
|
|
||||||
# VERSION - selects the version of the game to build
|
# VERSION - selects the version of the game to build
|
||||||
@@ -92,27 +87,9 @@ else ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.0J / Animal Forest - Dōbutsu no Mo
|
|||||||
DEFINES += F3DZEX_GBI_2=1 F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
|
DEFINES += F3DZEX_GBI_2=1 F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# USE_QEMU_IRIX - when ido is selected, select which way to emulate IRIX programs
|
|
||||||
# 1 - use qemu-irix
|
|
||||||
# 0 - statically recompile the IRIX programs
|
|
||||||
USE_QEMU_IRIX ?= 0
|
|
||||||
$(eval $(call validate-option,USE_QEMU_IRIX,0 1))
|
|
||||||
|
|
||||||
ifeq ($(COMPILER),ido)
|
|
||||||
ifeq ($(USE_QEMU_IRIX),1)
|
|
||||||
# Verify that qemu-irix exists
|
|
||||||
QEMU_IRIX ?= $(call find-command,qemu-irix)
|
|
||||||
ifeq (, $(QEMU_IRIX))
|
|
||||||
$(error Using the IDO compiler requires qemu-irix. Please install qemu-irix package or set the QEMU_IRIX environment variable to the full qemu-irix binary path)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
MIPSISET := -mips2
|
|
||||||
else ifeq ($(COMPILER),gcc)
|
|
||||||
NON_MATCHING := 1
|
NON_MATCHING := 1
|
||||||
MIPSISET := -mips3
|
MIPSISET := -mips3
|
||||||
OPT_FLAGS := -O2
|
OPT_FLAGS := -O2
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# NON_MATCHING - whether to build a matching, identical copy of the ROM
|
# NON_MATCHING - whether to build a matching, identical copy of the ROM
|
||||||
@@ -171,7 +148,7 @@ ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
|
|||||||
$(info =======================)
|
$(info =======================)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DEFINES += _FINALROM=1
|
DEFINES += _FINALROM=1 LIBULTRA_VERSION=9
|
||||||
|
|
||||||
ifeq ($(TARGET_N64),1)
|
ifeq ($(TARGET_N64),1)
|
||||||
DEFINES += TARGET_N64=1
|
DEFINES += TARGET_N64=1
|
||||||
@@ -182,6 +159,8 @@ endif
|
|||||||
#==============================================================================#
|
#==============================================================================#
|
||||||
|
|
||||||
TOOLS_DIR := tools
|
TOOLS_DIR := tools
|
||||||
|
LIBULTRA_DIR := lib/hackerlibultra
|
||||||
|
LIBULTRA_BUILD_DIR := lib/hackerlibultra/build/L/libgultra_rom
|
||||||
|
|
||||||
# (This is a bit hacky, but a lot of rules implicitly depend
|
# (This is a bit hacky, but a lot of rules implicitly depend
|
||||||
# on tools and assets, and we use directory globs further down
|
# on tools and assets, and we use directory globs further down
|
||||||
@@ -211,6 +190,13 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
|
|||||||
ifeq ($(DUMMY),FAIL)
|
ifeq ($(DUMMY),FAIL)
|
||||||
$(error Failed to build tools)
|
$(error Failed to build tools)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
$(info Building hackerlibultra...)
|
||||||
|
DUMMY != $(MAKE) -s -C $(LIBULTRA_DIR) >&2 || echo FAIL
|
||||||
|
ifeq ($(DUMMY),FAIL)
|
||||||
|
$(error Failed to build hackerlibultra)
|
||||||
|
endif
|
||||||
|
|
||||||
$(info Building ROM...)
|
$(info Building ROM...)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
@@ -237,10 +223,6 @@ LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h)))
|
|||||||
SRC_DIRS := src src/engine src/game src/menu src/buffers src/audio $(AUDIO_SRC_DIR) actors levels bin data assets asm lib sound
|
SRC_DIRS := src src/engine src/game src/menu src/buffers src/audio $(AUDIO_SRC_DIR) actors levels bin data assets asm lib sound
|
||||||
BIN_DIRS := bin bin/$(VERSION)
|
BIN_DIRS := bin bin/$(VERSION)
|
||||||
|
|
||||||
ifeq ($(VERSION),cn)
|
|
||||||
LIBGCC_SRC_DIRS += lib/src/libgcc
|
|
||||||
endif
|
|
||||||
|
|
||||||
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
|
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
|
||||||
|
|
||||||
# File dependencies and variables for specific files
|
# File dependencies and variables for specific files
|
||||||
@@ -251,7 +233,6 @@ LEVEL_C_FILES := $(wildcard levels/*/leveldata.c) $(wildcard levels/*/script
|
|||||||
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) $(LEVEL_C_FILES)
|
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) $(LEVEL_C_FILES)
|
||||||
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
|
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
|
||||||
GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
|
GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||||
LIBGCC_C_FILES := $(foreach dir,$(LIBGCC_SRC_DIRS),$(wildcard $(dir)/*.c))
|
|
||||||
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
|
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
|
||||||
|
|
||||||
# Sound files
|
# Sound files
|
||||||
@@ -279,58 +260,23 @@ O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
|
|||||||
|
|
||||||
GODDARD_O_FILES := $(foreach file,$(GODDARD_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
GODDARD_O_FILES := $(foreach file,$(GODDARD_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
||||||
|
|
||||||
LIBGCC_O_FILES := $(foreach file,$(LIBGCC_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
|
||||||
|
|
||||||
# Automatic dependency files
|
# Automatic dependency files
|
||||||
DEP_FILES := $(O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(LIBGCC_O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d
|
DEP_FILES := $(O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d
|
||||||
|
|
||||||
# Files with GLOBAL_ASM blocks
|
|
||||||
ifeq ($(NON_MATCHING),0)
|
|
||||||
GLOBAL_ASM_C_FILES != grep -rl 'GLOBAL_ASM(' $(wildcard src/**/*.c)
|
|
||||||
GLOBAL_ASM_O_FILES = $(foreach file,$(GLOBAL_ASM_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
|
||||||
GLOBAL_ASM_DEP = $(BUILD_DIR)/src/audio/non_matching_dep
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
#==============================================================================#
|
#==============================================================================#
|
||||||
# Compiler Options #
|
# Compiler Options #
|
||||||
#==============================================================================#
|
#==============================================================================#
|
||||||
|
|
||||||
EGCS_PATH := $(TOOLS_DIR)/egcs
|
# detect hackerchain
|
||||||
LD_PATH := $(TOOLS_DIR)/ld
|
ifneq ($(call find-command, $(HACKERCHAIN)/mips64-elf-ld),)
|
||||||
|
CROSS := $(HACKERCHAIN)/mips64-elf-
|
||||||
# detect prefix for MIPS toolchain
|
|
||||||
ifneq ($(call find-command,mips-linux-gnu-ld),)
|
|
||||||
CROSS := mips-linux-gnu-
|
|
||||||
else ifneq ($(call find-command,mips64-linux-gnu-ld),)
|
|
||||||
CROSS := mips64-linux-gnu-
|
|
||||||
else ifneq ($(call find-command,mips64-elf-ld),)
|
|
||||||
CROSS := mips64-elf-
|
|
||||||
else
|
else
|
||||||
$(error Unable to detect a suitable MIPS toolchain installed)
|
$(error Unable to detect a hackerchain toolchain installation.)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AS := $(CROSS)as
|
AS := $(CROSS)as
|
||||||
ifeq ($(COMPILER),gcc)
|
|
||||||
CC := $(CROSS)gcc
|
CC := $(CROSS)gcc
|
||||||
else
|
|
||||||
ifeq ($(USE_QEMU_IRIX),1)
|
|
||||||
IRIX_ROOT := $(TOOLS_DIR)/ido5.3_compiler
|
|
||||||
CC := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc
|
|
||||||
ACPP := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/acpp
|
|
||||||
COPT := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/copt
|
|
||||||
else
|
|
||||||
IDO_ROOT := $(TOOLS_DIR)/ido-static-recomp/build/out
|
|
||||||
CC := $(IDO_ROOT)/cc
|
|
||||||
ACPP := $(IDO_ROOT)/acpp
|
|
||||||
COPT := $(IDO_ROOT)/copt
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(COMPILER),gcc)
|
|
||||||
LD := $(CROSS)ld
|
LD := $(CROSS)ld
|
||||||
else
|
|
||||||
LD := LD_LIBRARY_PATH=$(LD_PATH) $(LD_PATH)/mips64-elf-ld
|
|
||||||
endif
|
|
||||||
AR := $(CROSS)ar
|
AR := $(CROSS)ar
|
||||||
OBJDUMP := $(CROSS)objdump
|
OBJDUMP := $(CROSS)objdump
|
||||||
OBJCOPY := $(CROSS)objcopy
|
OBJCOPY := $(CROSS)objcopy
|
||||||
@@ -348,32 +294,6 @@ endif
|
|||||||
C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
|
C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
|
||||||
DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
|
DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
|
||||||
|
|
||||||
EGCS_AS := $(EGCS_PATH)/as
|
|
||||||
EGCS_ASFLAGS = -mcpu=r4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i))
|
|
||||||
|
|
||||||
include libultra.mk
|
|
||||||
|
|
||||||
ifeq ($(VERSION),cn)
|
|
||||||
EGCS_REASSEMBLED_ASM_FILES := $(wildcard asm/*.s)
|
|
||||||
EGCS_REASSEMBLED_ASM_FILES := $(filter-out asm/ipl3_font.s, $(EGCS_REASSEMBLED_ASM_FILES))
|
|
||||||
EGCS_REASSEMBLED := $(foreach file,$(EGCS_REASSEMBLED_ASM_FILES),$(BUILD_DIR)/$(file:.s=.o))
|
|
||||||
$(EGCS_REASSEMBLED): AS := $(EGCS_AS)
|
|
||||||
$(EGCS_REASSEMBLED): ASFLAGS = $(EGCS_ASFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EGCS_CC := COMPILER_PATH=$(EGCS_PATH) $(EGCS_PATH)/gcc
|
|
||||||
EGCS_CFLAGS = -G 0 $(TARGET_CFLAGS) -mcpu=r4300 -fno-pic -Wa,--strip-local-absolute $(DEF_INC_CFLAGS)
|
|
||||||
|
|
||||||
# iQue recompiled some files with a different compiler
|
|
||||||
ifeq ($(VERSION),cn)
|
|
||||||
IQUE_RECOMPILED_SRC_GAME := $(addprefix $(BUILD_DIR)/src/game/,rumble_init.o level_update.o memory.o area.o print.o ingame_menu.o hud.o cn_common_syms_1.o cn_common_syms_2.o) $(addprefix $(BUILD_DIR)/src/menu/,title_screen.o intro_geo.o file_select.o star_select.o)
|
|
||||||
IQUE_RECOMPILED_LIBGCC_SRC := $(LIBGCC_O_FILES)
|
|
||||||
IQUE_RECOMPILED = $(IQUE_RECOMPILED_SRC_GAME) $(IQUE_RECOMPILED_LIBGCC_SRC)
|
|
||||||
$(IQUE_RECOMPILED): CC := $(EGCS_CC)
|
|
||||||
$(IQUE_RECOMPILED): CFLAGS = $(EGCS_CFLAGS)
|
|
||||||
$(IQUE_RECOMPILED): MIPSISET :=
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Prefer clang as C preprocessor if installed on the system
|
# Prefer clang as C preprocessor if installed on the system
|
||||||
ifneq (,$(call find-command,clang))
|
ifneq (,$(call find-command,clang))
|
||||||
CPP := clang
|
CPP := clang
|
||||||
@@ -383,29 +303,15 @@ else
|
|||||||
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
|
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Check code syntax with host compiler
|
|
||||||
CC_CHECK := gcc
|
|
||||||
CC_CHECK_CFLAGS := -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(DEF_INC_CFLAGS)
|
|
||||||
|
|
||||||
# C compiler options
|
# C compiler options
|
||||||
CFLAGS = -G 0 $(TARGET_CFLAGS) $(DEF_INC_CFLAGS)
|
CFLAGS = -G 0 $(TARGET_CFLAGS) $(DEF_INC_CFLAGS)
|
||||||
ifeq ($(COMPILER),gcc)
|
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-trigraphs
|
||||||
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra
|
CFLAGS += -Wno-missing-braces
|
||||||
else
|
|
||||||
CFLAGS += -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -signed -32
|
|
||||||
endif
|
|
||||||
|
|
||||||
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
|
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
|
||||||
|
ASMFLAGS := -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) -mips3 $(DEF_INC_CFLAGS) -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra
|
||||||
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
|
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
|
||||||
|
|
||||||
ifeq ($(shell getconf LONG_BIT), 32)
|
|
||||||
# Work around memory allocation bug in QEMU
|
|
||||||
export QEMU_GUEST_BASE := 1
|
|
||||||
else
|
|
||||||
# Ensure that gcc treats the code as 32-bit
|
|
||||||
CC_CHECK_CFLAGS += -m32
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Prevent a crash with -sopt
|
# Prevent a crash with -sopt
|
||||||
export LANG := C
|
export LANG := C
|
||||||
|
|
||||||
@@ -447,12 +353,7 @@ BLINK := \033[33;5m
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Use objcopy instead of extract_data_for_mio to get 16-byte aligned padding
|
# Use objcopy instead of extract_data_for_mio to get 16-byte aligned padding
|
||||||
ifeq ($(COMPILER),gcc)
|
|
||||||
EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data
|
EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data
|
||||||
endif
|
|
||||||
ifeq ($(VERSION),cn)
|
|
||||||
EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Common build print status function
|
# Common build print status function
|
||||||
define print
|
define print
|
||||||
@@ -476,6 +377,7 @@ distclean: clean
|
|||||||
$(PYTHON) extract_assets.py --clean
|
$(PYTHON) extract_assets.py --clean
|
||||||
$(MAKE) -C $(TOOLS_DIR) clean
|
$(MAKE) -C $(TOOLS_DIR) clean
|
||||||
$(MAKE) -C $(TOOLS_DIR)/sm64tools clean
|
$(MAKE) -C $(TOOLS_DIR)/sm64tools clean
|
||||||
|
$(MAKE) -C $(LIBULTRA_DIR) clean
|
||||||
|
|
||||||
test: $(ROM)
|
test: $(ROM)
|
||||||
$(EMULATOR) $(EMU_FLAGS) $<
|
$(EMULATOR) $(EMU_FLAGS) $<
|
||||||
@@ -494,10 +396,6 @@ $(BUILD_DIR)/src/audio/sh/load.o: $(SOUND_BIN_DIR)/bank_sets.inc.c $(SOUND_BIN_D
|
|||||||
|
|
||||||
$(CRASH_TEXTURE_C_FILES): TEXTURE_ENCODING := u32
|
$(CRASH_TEXTURE_C_FILES): TEXTURE_ENCODING := u32
|
||||||
|
|
||||||
ifeq ($(COMPILER),gcc)
|
|
||||||
$(BUILD_DIR)/lib/src/math/%.o: CFLAGS += -fno-builtin
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(VERSION),eu)
|
ifeq ($(VERSION),eu)
|
||||||
TEXT_DIRS := text/de text/us text/fr
|
TEXT_DIRS := text/de text/us text/fr
|
||||||
|
|
||||||
@@ -522,7 +420,7 @@ else
|
|||||||
endif
|
endif
|
||||||
$(BUILD_DIR)/bin/segment2.o: $(BUILD_DIR)/text/debug_text.raw.inc.c
|
$(BUILD_DIR)/bin/segment2.o: $(BUILD_DIR)/text/debug_text.raw.inc.c
|
||||||
|
|
||||||
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(LIBGCC_SRC_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) rsp include) $(MIO0_DIR) $(addprefix $(MIO0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
|
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) rsp include) $(MIO0_DIR) $(addprefix $(MIO0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
|
||||||
|
|
||||||
# Make sure build directory exists before compiling anything
|
# Make sure build directory exists before compiling anything
|
||||||
DUMMY != mkdir -p $(ALL_DIRS)
|
DUMMY != mkdir -p $(ALL_DIRS)
|
||||||
@@ -690,18 +588,6 @@ $(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
|
|||||||
$(call print,Preprocessing level headers:,$<,$@)
|
$(call print,Preprocessing level headers:,$<,$@)
|
||||||
$(V)$(CPP) $(CPPFLAGS) -I . $< | sed -E 's|(.+)|#include "\1"|' > $@
|
$(V)$(CPP) $(CPPFLAGS) -I . $< | sed -E 's|(.+)|#include "\1"|' > $@
|
||||||
|
|
||||||
# Run asm_processor on files that have NON_MATCHING code
|
|
||||||
ifeq ($(NON_MATCHING),0)
|
|
||||||
$(GLOBAL_ASM_O_FILES): CC := $(V)$(PYTHON) $(TOOLS_DIR)/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Rebuild files with 'GLOBAL_ASM' if the NON_MATCHING flag changes.
|
|
||||||
$(GLOBAL_ASM_O_FILES): $(GLOBAL_ASM_DEP).$(NON_MATCHING)
|
|
||||||
$(GLOBAL_ASM_DEP).$(NON_MATCHING):
|
|
||||||
@$(RM) $(GLOBAL_ASM_DEP).*
|
|
||||||
$(V)touch $@
|
|
||||||
|
|
||||||
|
|
||||||
#==============================================================================#
|
#==============================================================================#
|
||||||
# Compilation Recipes #
|
# Compilation Recipes #
|
||||||
#==============================================================================#
|
#==============================================================================#
|
||||||
@@ -713,9 +599,6 @@ ifeq ($(NON_MATCHING),0)
|
|||||||
$(BUILD_DIR)/bin/%.o: OPT_FLAGS := -g
|
$(BUILD_DIR)/bin/%.o: OPT_FLAGS := -g
|
||||||
$(BUILD_DIR)/src/goddard/%.o: OPT_FLAGS := -g
|
$(BUILD_DIR)/src/goddard/%.o: OPT_FLAGS := -g
|
||||||
$(BUILD_DIR)/src/goddard/%.o: MIPSISET := -mips1
|
$(BUILD_DIR)/src/goddard/%.o: MIPSISET := -mips1
|
||||||
ifeq ($(VERSION),cn)
|
|
||||||
$(BUILD_DIR)/lib/src/libgcc/%.o: OPT_FLAGS := -O2 -g -mips2
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Audio specific flags:
|
# Audio specific flags:
|
||||||
|
|
||||||
@@ -749,18 +632,10 @@ endif
|
|||||||
# Compile C code
|
# Compile C code
|
||||||
$(BUILD_DIR)/%.o: %.c
|
$(BUILD_DIR)/%.o: %.c
|
||||||
$(call print,Compiling:,$<,$@)
|
$(call print,Compiling:,$<,$@)
|
||||||
$(V)$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
|
|
||||||
$(V)$(CC) -c $(CFLAGS) $(OPT_FLAGS) $(MIPSISET) -o $@ $<
|
$(V)$(CC) -c $(CFLAGS) $(OPT_FLAGS) $(MIPSISET) -o $@ $<
|
||||||
ifeq ($(VERSION),cn)
|
|
||||||
$(V)$(TOOLS_DIR)/patch_elf_32bit $@
|
|
||||||
endif
|
|
||||||
$(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
|
$(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
|
||||||
$(call print,Compiling:,$<,$@)
|
$(call print,Compiling:,$<,$@)
|
||||||
$(V)$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
|
|
||||||
$(V)$(CC) -c $(CFLAGS) $(OPT_FLAGS) $(MIPSISET) -o $@ $<
|
$(V)$(CC) -c $(CFLAGS) $(OPT_FLAGS) $(MIPSISET) -o $@ $<
|
||||||
ifeq ($(VERSION),cn)
|
|
||||||
$(V)$(TOOLS_DIR)/patch_elf_32bit $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Assemble assembly code
|
# Assemble assembly code
|
||||||
$(BUILD_DIR)/%.o: %.s
|
$(BUILD_DIR)/%.o: %.s
|
||||||
@@ -775,38 +650,25 @@ $(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s
|
|||||||
# Run linker script through the C preprocessor
|
# Run linker script through the C preprocessor
|
||||||
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
|
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
|
||||||
$(call print,Preprocessing linker script:,$<,$@)
|
$(call print,Preprocessing linker script:,$<,$@)
|
||||||
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -DULTRA_BUILD_DIR=$(LIBULTRA_BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||||
|
|
||||||
# Link libgoddard
|
# Link libgoddard
|
||||||
$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
|
$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
|
||||||
@$(PRINT) "$(GREEN)Linking libgoddard: $(BLUE)$@ $(NO_COL)\n"
|
@$(PRINT) "$(GREEN)Linking libgoddard: $(BLUE)$@ $(NO_COL)\n"
|
||||||
$(V)$(AR) rcs -o $@ $(GODDARD_O_FILES)
|
$(V)$(AR) rcs -o $@ $(GODDARD_O_FILES)
|
||||||
|
|
||||||
# Link libgcc
|
|
||||||
$(BUILD_DIR)/libgcc.a: $(LIBGCC_O_FILES)
|
|
||||||
@$(PRINT) "$(GREEN)Linking libgcc: $(BLUE)$@ $(NO_COL)\n"
|
|
||||||
$(V)$(AR) rcs -o $@ $(LIBGCC_O_FILES)
|
|
||||||
|
|
||||||
# Link SM64 ELF file
|
# Link SM64 ELF file
|
||||||
$(ELF): $(O_FILES) $(MIO0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(LIBULTRA_AR) $(BUILD_DIR)/libgoddard.a $(BUILD_DIR)/libgcc.a
|
$(ELF): $(LIBULTRA_BUILD_DIR)/libgultra_rom.a $(O_FILES) $(MIO0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/libgoddard.a
|
||||||
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
|
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||||
$(V)$(LD) -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -lultra -lgoddard -lgcc
|
$(V)$(LD) -L $(BUILD_DIR) -L $(LIBULTRA_BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -lgultra_rom -lgoddard
|
||||||
|
|
||||||
# Build ROM
|
# Build ROM
|
||||||
ifeq ($(VERSION),cn)
|
|
||||||
PAD_TO_GAP_FILL := --pad-to=0x7B0000 --gap-fill=0x00
|
|
||||||
else
|
|
||||||
PAD_TO_GAP_FILL := --pad-to=0x800000 --gap-fill=0xFF
|
PAD_TO_GAP_FILL := --pad-to=0x800000 --gap-fill=0xFF
|
||||||
endif
|
|
||||||
|
|
||||||
$(ROM): $(ELF)
|
$(ROM): $(ELF)
|
||||||
$(call print,Building ROM:,$<,$@)
|
$(call print,Building ROM:,$<,$@)
|
||||||
ifeq ($(VERSION),cn) # cn has no checksums
|
|
||||||
$(V)$(OBJCOPY) $(PAD_TO_GAP_FILL) $< $(@) -O binary
|
|
||||||
else
|
|
||||||
$(V)$(OBJCOPY) $(PAD_TO_GAP_FILL) $< $(@:.z64=.bin) -O binary
|
$(V)$(OBJCOPY) $(PAD_TO_GAP_FILL) $< $(@:.z64=.bin) -O binary
|
||||||
$(V)$(N64CKSUM) $(@:.z64=.bin) $@
|
$(V)$(N64CKSUM) $(@:.z64=.bin) $@
|
||||||
endif
|
|
||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).objdump: $(ELF)
|
$(BUILD_DIR)/$(TARGET).objdump: $(ELF)
|
||||||
$(OBJDUMP) -D $< > $@
|
$(OBJDUMP) -D $< > $@
|
||||||
|
|||||||
45
README.md
45
README.md
@@ -4,9 +4,9 @@ This repository is a clean slate for basic enhancements built upon the *Super Ma
|
|||||||
|
|
||||||
## Quick Start (for Ubuntu)
|
## Quick Start (for Ubuntu)
|
||||||
|
|
||||||
1. Install prerequisites: `sudo apt install -y binutils-mips-linux-gnu build-essential git pkgconf python3`
|
1. Install prerequisites: `sudo apt install -y build-essential git pkgconf python3 isl libgmp-dev libmpfr-dev libmpc-dev`
|
||||||
2. Clone the repo from within Linux: `git clone https://github.com/HackerN64/ultrasm64-2.git`
|
2. Clone the repo from within Linux: `git clone https://github.com/HackerN64/ultrasm64-2.git`
|
||||||
3. Place a Super Mario 64 ROM called `baserom.<VERSION>.z64` into the project folder for asset extraction, where `VERSION` can be `jp`, `us`, `eu`, `sh`, or `cn`.
|
3. Place a Super Mario 64 ROM called `baserom.<VERSION>.z64` into the project folder for asset extraction, where `VERSION` can be `jp`, `us`, `eu`, `sh`.
|
||||||
4. Run `make` to build. Specify the version through `make VERSION=<VERSION>`. Add `-j4` to improve build speed (hardware dependent).
|
4. Run `make` to build. Specify the version through `make VERSION=<VERSION>`. Add `-j4` to improve build speed (hardware dependent).
|
||||||
|
|
||||||
Ensure the repo path length does not exceed 255 characters. Long path names result in build errors.
|
Ensure the repo path length does not exceed 255 characters. Long path names result in build errors.
|
||||||
@@ -32,41 +32,43 @@ There are 3 steps to set up a working build.
|
|||||||
#### Step 1: Install dependencies
|
#### Step 1: Install dependencies
|
||||||
|
|
||||||
The build system has the following package requirements:
|
The build system has the following package requirements:
|
||||||
* binutils-mips
|
|
||||||
* pkgconf
|
* pkgconf
|
||||||
* python3 >= 3.6
|
* python3 >= 3.6
|
||||||
|
|
||||||
|
##### Required Packages
|
||||||
|
|
||||||
Dependency installation instructions for common Linux distros are provided below:
|
Dependency installation instructions for common Linux distros are provided below:
|
||||||
|
|
||||||
##### Debian / Ubuntu
|
###### Fedora / RHEL
|
||||||
To install build dependencies:
|
To install build dependencies:
|
||||||
```
|
```
|
||||||
sudo apt install -y binutils-mips-linux-gnu build-essential git pkgconf python3
|
sudo dnf group install -y development-tools
|
||||||
|
sudo dnf install -y python pkgconf isl-devel gmp-devel mpfr-devel libmpc-devel
|
||||||
```
|
```
|
||||||
|
For SUSE users, please use `mpc-devel` in place of `libmpc-devel`.
|
||||||
|
|
||||||
##### Arch Linux
|
###### Debian / Ubuntu
|
||||||
To install build dependencies:
|
To install build dependencies:
|
||||||
```
|
```
|
||||||
sudo pacman -S base-devel python
|
sudo apt install -y build-essential git pkgconf python3 isl libgmp-dev libmpfr-dev libmpc-dev
|
||||||
```
|
```
|
||||||
Install the following AUR packages:
|
|
||||||
* [mips64-elf-binutils](https://aur.archlinux.org/packages/mips64-elf-binutils) (AUR)
|
|
||||||
|
|
||||||
##### Other Linux distributions
|
###### Arch Linux
|
||||||
|
To install build dependencies:
|
||||||
|
```
|
||||||
|
sudo pacman -S base-devel python gcc gcc-libs libisl libmpc zstd lib32-gcc-libs glibc libmpc mpfr gmp
|
||||||
|
```
|
||||||
|
|
||||||
Most modern Linux distributions should have equivalent packages to the other two listed above.
|
##### Setup Hackerchain
|
||||||
You may have to use a different version of GNU binutils. Listed below are fully compatible binutils
|
|
||||||
distributions with support in the makefile, and examples of distros that offer them:
|
|
||||||
|
|
||||||
* `mips64-elf-` (Arch AUR)
|
1. Download the Hackerchain setup script [here](https://gist.github.com/mountainflaw/820121d579b3d8e83194b69d9b287753).
|
||||||
* `mips-linux-gnu-` (Ubuntu and other Debian-based distros)
|
2. Create a directory where you'd like to have the build process and build output take place.
|
||||||
* `mips64-linux-gnu-` (RHEL/CentOS/Fedora)
|
3. After running and building Hackerchain, define the environment variable `HACKERCHAIN` in your shell's init file (`~/.bashrc` for Bash typically), have it point to the `bin` directory inside your directory for building Hackerchain.
|
||||||
|
4. Restart your terminal.
|
||||||
You may also use [Docker](#docker-installation) to handle installing an image with minimal dependencies.
|
|
||||||
|
|
||||||
#### Step 2: Copy baserom(s) for asset extraction
|
#### Step 2: Copy baserom(s) for asset extraction
|
||||||
|
|
||||||
For each version (jp/us/eu/sh/cn) for which you want to build a ROM, put an existing ROM at
|
For each version (jp/us/eu/sh) for which you want to build a ROM, put an existing ROM at
|
||||||
`./baserom.<VERSION>.z64` for asset extraction.
|
`./baserom.<VERSION>.z64` for asset extraction.
|
||||||
|
|
||||||
##### Step 3: Build the ROM
|
##### Step 3: Build the ROM
|
||||||
@@ -82,11 +84,10 @@ Resulting artifacts can be found in the `build` directory.
|
|||||||
|
|
||||||
The full list of configurable variables are listed below, with the default being the first listed:
|
The full list of configurable variables are listed below, with the default being the first listed:
|
||||||
|
|
||||||
* ``VERSION``: ``jp``, ``us``, ``eu``, ``sh``, ``cn``
|
* ``VERSION``: ``jp``, ``us``, ``eu``, ``sh``
|
||||||
* ``GRUCODE``: ``f3d_old``, ``f3d_new``, ``f3dex``, ``f3dex2``, ``f3dzex``
|
* ``GRUCODE``: ``f3d_old``, ``f3d_new``, ``f3dex``, ``f3dex2``, ``f3dzex``
|
||||||
* ``COMPARE``: ``1`` (compare ROM hash), ``0`` (do not compare ROM hash)
|
* ``COMPARE``: ``1`` (compare ROM hash), ``0`` (do not compare ROM hash)
|
||||||
* ``NON_MATCHING``: Use functionally equivalent C implementations for non-matchings. Also will avoid instances of undefined behavior.
|
* ``NON_MATCHING``: Use functionally equivalent C implementations for non-matchings. Also will avoid instances of undefined behavior.
|
||||||
* ``CROSS``: Cross-compiler tool prefix (Example: ``mips64-elf-``).
|
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@ brew install coreutils make pkg-config tehzz/n64-dev/mips64-elf-binutils
|
|||||||
|
|
||||||
#### Step 2: Copy baserom(s) for asset extraction
|
#### Step 2: Copy baserom(s) for asset extraction
|
||||||
|
|
||||||
For each version (jp/us/eu/sh/cn) for which you want to build a ROM, put an existing ROM at
|
For each version (jp/us/eu/sh) for which you want to build a ROM, put an existing ROM at
|
||||||
`./baserom.<VERSION>.z64` for asset extraction.
|
`./baserom.<VERSION>.z64` for asset extraction.
|
||||||
|
|
||||||
##### Step 3: Build the ROM
|
##### Step 3: Build the ROM
|
||||||
|
|||||||
92
asm/boot.s
92
asm/boot.s
@@ -19,7 +19,11 @@
|
|||||||
.equ INITIAL_DMA_LEN, (0x00100000 - 1)
|
.equ INITIAL_DMA_LEN, (0x00100000 - 1)
|
||||||
.equ INITIAL_DMA_ROMPOS, 0x1000
|
.equ INITIAL_DMA_ROMPOS, 0x1000
|
||||||
|
|
||||||
#ifdef VERSION_CN
|
#if defined(VERSION_CN) && !defined(AVOID_UB)
|
||||||
|
#define BB_BOOT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BB_BOOT
|
||||||
.macro cn_li a b
|
.macro cn_li a b
|
||||||
li \a, \b
|
li \a, \b
|
||||||
.endm
|
.endm
|
||||||
@@ -181,7 +185,7 @@ glabel ipl3_entry // 0xA4000040
|
|||||||
bnez $t0, .LA4000168
|
bnez $t0, .LA4000168
|
||||||
nop
|
nop
|
||||||
.LA400025C:
|
.LA400025C:
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
li $t0, 0xc0000000
|
li $t0, 0xc0000000
|
||||||
#else
|
#else
|
||||||
li $t0, 0xc4000000
|
li $t0, 0xc4000000
|
||||||
@@ -317,7 +321,7 @@ glabel ipl3_entry // 0xA4000040
|
|||||||
bnez $at, .LA4000448
|
bnez $at, .LA4000448
|
||||||
addiu $t0, $t0, 0x10
|
addiu $t0, $t0, 0x10
|
||||||
.LA4000458:
|
.LA4000458:
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
la $t0, SP_DMEM_CN_UNK0
|
la $t0, SP_DMEM_CN_UNK0
|
||||||
lui $t1, 0xf
|
lui $t1, 0xf
|
||||||
ori $t1, $t1, 0xffff
|
ori $t1, $t1, 0xffff
|
||||||
@@ -437,7 +441,7 @@ glabel ipl3_entry // 0xA4000040
|
|||||||
andi $t3, $t3, 0x1
|
andi $t3, $t3, 0x1
|
||||||
bnez $t3, .LA4000514
|
bnez $t3, .LA4000514
|
||||||
nop
|
nop
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
@@ -503,7 +507,7 @@ glabel ipl3_entry // 0xA4000040
|
|||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
#endif
|
#endif
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
lui $t1, %hi(PHYS_TO_K1(SP_PC_REG))
|
lui $t1, %hi(PHYS_TO_K1(SP_PC_REG))
|
||||||
lw $t1, %lo(PHYS_TO_K1(SP_PC_REG))($t1)
|
lw $t1, %lo(PHYS_TO_K1(SP_PC_REG))($t1)
|
||||||
beqz $t1, .LA4000698
|
beqz $t1, .LA4000698
|
||||||
@@ -638,7 +642,7 @@ func_A4000690:
|
|||||||
sw $s7, 0x14($t0)
|
sw $s7, 0x14($t0)
|
||||||
#endif
|
#endif
|
||||||
sw $s5, 0xc($t0)
|
sw $s5, 0xc($t0)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
beqz $s3, .LA4000728
|
beqz $s3, .LA4000728
|
||||||
sw $s7, 0x14($t0)
|
sw $s7, 0x14($t0)
|
||||||
b .LA4000730
|
b .LA4000730
|
||||||
@@ -657,7 +661,7 @@ func_A4000690:
|
|||||||
sw $t1, 0x8($t0)
|
sw $t1, 0x8($t0)
|
||||||
cn_li $t0, PHYS_TO_K1(SP_DMEM_START)
|
cn_li $t0, PHYS_TO_K1(SP_DMEM_START)
|
||||||
addi $t1, $t0, 0x1000
|
addi $t1, $t0, 0x1000
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
.LA4000710:
|
.LA4000710:
|
||||||
sw $zero, ($t0)
|
sw $zero, ($t0)
|
||||||
addiu $t0, $t0, 4
|
addiu $t0, $t0, 4
|
||||||
@@ -671,7 +675,7 @@ func_A4000690:
|
|||||||
#endif
|
#endif
|
||||||
cn_li $t0, PHYS_TO_K1(SP_IMEM_START)
|
cn_li $t0, PHYS_TO_K1(SP_IMEM_START)
|
||||||
addi $t1, $t0, 0x1000
|
addi $t1, $t0, 0x1000
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
.LA400072C:
|
.LA400072C:
|
||||||
sw $zero, ($t0)
|
sw $zero, ($t0)
|
||||||
addiu $t0, $t0, 4
|
addiu $t0, $t0, 4
|
||||||
@@ -691,7 +695,7 @@ func_A4000690:
|
|||||||
|
|
||||||
func_A4000778:
|
func_A4000778:
|
||||||
addiu $sp, $sp, -0xa0
|
addiu $sp, $sp, -0xa0
|
||||||
#ifndef VERSION_CN
|
#ifndef BB_BOOT
|
||||||
sw $s0, 0x40($sp)
|
sw $s0, 0x40($sp)
|
||||||
sw $s1, 0x44($sp)
|
sw $s1, 0x44($sp)
|
||||||
move $s1, $zero
|
move $s1, $zero
|
||||||
@@ -713,7 +717,7 @@ func_A4000778:
|
|||||||
sw $t7, 0x34($sp)
|
sw $t7, 0x34($sp)
|
||||||
sw $t8, 0x38($sp)
|
sw $t8, 0x38($sp)
|
||||||
sw $t9, 0x3c($sp)
|
sw $t9, 0x3c($sp)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
sw $s0, 0x40($sp)
|
sw $s0, 0x40($sp)
|
||||||
sw $s1, 0x44($sp)
|
sw $s1, 0x44($sp)
|
||||||
#endif
|
#endif
|
||||||
@@ -725,7 +729,7 @@ func_A4000778:
|
|||||||
sw $s7, 0x5c($sp)
|
sw $s7, 0x5c($sp)
|
||||||
sw $fp, 0x60($sp)
|
sw $fp, 0x60($sp)
|
||||||
sw $ra, 0x64($sp)
|
sw $ra, 0x64($sp)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
move $s0, $zero
|
move $s0, $zero
|
||||||
move $s1, $zero
|
move $s1, $zero
|
||||||
#endif
|
#endif
|
||||||
@@ -733,12 +737,12 @@ func_A4000778:
|
|||||||
jal func_A4000880
|
jal func_A4000880
|
||||||
nop
|
nop
|
||||||
addiu $s0, $s0, 1
|
addiu $s0, $s0, 1
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
addu $s1, $s1, $v0
|
addu $s1, $s1, $v0
|
||||||
#endif
|
#endif
|
||||||
slti $t1, $s0, 4
|
slti $t1, $s0, 4
|
||||||
bnez $t1, .LA40007EC
|
bnez $t1, .LA40007EC
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
nop
|
nop
|
||||||
#else
|
#else
|
||||||
addu $s1, $s1, $v0
|
addu $s1, $s1, $v0
|
||||||
@@ -746,7 +750,7 @@ func_A4000778:
|
|||||||
srl $a0, $s1, 2
|
srl $a0, $s1, 2
|
||||||
jal func_A4000A40
|
jal func_A4000A40
|
||||||
li $a1, 1
|
li $a1, 1
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
srl $v0, $s1, 2
|
srl $v0, $s1, 2
|
||||||
#else
|
#else
|
||||||
lw $ra, 0x64($sp)
|
lw $ra, 0x64($sp)
|
||||||
@@ -769,7 +773,7 @@ func_A4000778:
|
|||||||
lw $t8, 0x38($sp)
|
lw $t8, 0x38($sp)
|
||||||
lw $t9, 0x3c($sp)
|
lw $t9, 0x3c($sp)
|
||||||
lw $s0, 0x40($sp)
|
lw $s0, 0x40($sp)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
lw $s1, 0x44($sp)
|
lw $s1, 0x44($sp)
|
||||||
#endif
|
#endif
|
||||||
lw $s2, 0x48($sp)
|
lw $s2, 0x48($sp)
|
||||||
@@ -779,7 +783,7 @@ func_A4000778:
|
|||||||
lw $s6, 0x58($sp)
|
lw $s6, 0x58($sp)
|
||||||
lw $s7, 0x5c($sp)
|
lw $s7, 0x5c($sp)
|
||||||
lw $fp, 0x60($sp)
|
lw $fp, 0x60($sp)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
lw $ra, 0x64($sp)
|
lw $ra, 0x64($sp)
|
||||||
#endif
|
#endif
|
||||||
jr $ra
|
jr $ra
|
||||||
@@ -793,7 +797,7 @@ func_A4000880:
|
|||||||
move $t4, $zero
|
move $t4, $zero
|
||||||
.LA4000894:
|
.LA4000894:
|
||||||
slti $k0, $t4, 0x40
|
slti $k0, $t4, 0x40
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
beqz $k0, .LA40008D4
|
beqz $k0, .LA40008D4
|
||||||
nop
|
nop
|
||||||
#else
|
#else
|
||||||
@@ -802,7 +806,7 @@ func_A4000880:
|
|||||||
#endif
|
#endif
|
||||||
jal func_A400090C
|
jal func_A400090C
|
||||||
move $a0, $t4
|
move $a0, $t4
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
blez $v0, .LA40008CC
|
blez $v0, .LA40008CC
|
||||||
nop
|
nop
|
||||||
#else
|
#else
|
||||||
@@ -811,24 +815,24 @@ func_A4000880:
|
|||||||
#endif
|
#endif
|
||||||
subu $k0, $v0, $t1
|
subu $k0, $v0, $t1
|
||||||
multu $k0, $t4
|
multu $k0, $t4
|
||||||
#ifndef VERSION_CN
|
#ifndef BB_BOOT
|
||||||
move $t1, $v0
|
move $t1, $v0
|
||||||
#endif
|
#endif
|
||||||
mflo $k0
|
mflo $k0
|
||||||
addu $t3, $t3, $k0
|
addu $t3, $t3, $k0
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
move $t1, $v0
|
move $t1, $v0
|
||||||
#else
|
#else
|
||||||
nop
|
nop
|
||||||
slti $k0, $t1, 0x50
|
slti $k0, $t1, 0x50
|
||||||
#endif
|
#endif
|
||||||
.LA40008CC:
|
.LA40008CC:
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
addiu $t4, $t4, 1
|
addiu $t4, $t4, 1
|
||||||
slti $k0, $t1, 0x50
|
slti $k0, $t1, 0x50
|
||||||
#endif
|
#endif
|
||||||
bnez $k0, .LA4000894
|
bnez $k0, .LA4000894
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
nop
|
nop
|
||||||
#else
|
#else
|
||||||
addiu $t4, $t4, 1
|
addiu $t4, $t4, 1
|
||||||
@@ -840,7 +844,7 @@ func_A4000880:
|
|||||||
sll $a0, $a0, 1
|
sll $a0, $a0, 1
|
||||||
jal func_A4000980
|
jal func_A4000980
|
||||||
addiu $a0, $a0, -0x370
|
addiu $a0, $a0, -0x370
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
b .LA40008FC
|
b .LA40008FC
|
||||||
nop
|
nop
|
||||||
.LA40008D4:
|
.LA40008D4:
|
||||||
@@ -853,7 +857,7 @@ func_A4000880:
|
|||||||
.LA40008FC:
|
.LA40008FC:
|
||||||
lw $ra, 0x1c($sp)
|
lw $ra, 0x1c($sp)
|
||||||
.LA4000900:
|
.LA4000900:
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
jr $ra
|
jr $ra
|
||||||
addiu $sp, $sp, 0x20
|
addiu $sp, $sp, 0x20
|
||||||
#else
|
#else
|
||||||
@@ -871,7 +875,7 @@ func_A400090C:
|
|||||||
move $fp, $zero
|
move $fp, $zero
|
||||||
.LA40008FC_cn:
|
.LA40008FC_cn:
|
||||||
li $k0, -1
|
li $k0, -1
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
sw $k0, ($s4)
|
sw $k0, ($s4)
|
||||||
sw $k0, ($s4)
|
sw $k0, ($s4)
|
||||||
sw $k0, 4($s4)
|
sw $k0, 4($s4)
|
||||||
@@ -889,7 +893,7 @@ func_A400090C:
|
|||||||
#endif
|
#endif
|
||||||
.LA4000940:
|
.LA4000940:
|
||||||
andi $k0, $v1, 1
|
andi $k0, $v1, 1
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
beqz $k0, .LA4000928_cn
|
beqz $k0, .LA4000928_cn
|
||||||
nop
|
nop
|
||||||
#else
|
#else
|
||||||
@@ -897,7 +901,7 @@ func_A400090C:
|
|||||||
addiu $gp, $gp, 1
|
addiu $gp, $gp, 1
|
||||||
#endif
|
#endif
|
||||||
addiu $v0, $v0, 1
|
addiu $v0, $v0, 1
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
.LA4000928_cn:
|
.LA4000928_cn:
|
||||||
srl $v1, $v1, 1
|
srl $v1, $v1, 1
|
||||||
#endif
|
#endif
|
||||||
@@ -905,14 +909,14 @@ func_A400090C:
|
|||||||
.LA4000954:
|
.LA4000954:
|
||||||
slti $k0, $gp, 8
|
slti $k0, $gp, 8
|
||||||
bnez $k0, .LA4000940
|
bnez $k0, .LA4000940
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
nop
|
nop
|
||||||
#else
|
#else
|
||||||
srl $v1, $v1, 1
|
srl $v1, $v1, 1
|
||||||
#endif
|
#endif
|
||||||
addiu $fp, $fp, 1
|
addiu $fp, $fp, 1
|
||||||
slti $k0, $fp, 0xa
|
slti $k0, $fp, 0xa
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
bnez $k0, .LA40008FC_cn
|
bnez $k0, .LA40008FC_cn
|
||||||
nop
|
nop
|
||||||
lw $ra, 0x1c($sp)
|
lw $ra, 0x1c($sp)
|
||||||
@@ -931,22 +935,22 @@ func_A4000980:
|
|||||||
addiu $sp, $sp, -0x28
|
addiu $sp, $sp, -0x28
|
||||||
sw $ra, 0x1c($sp)
|
sw $ra, 0x1c($sp)
|
||||||
sw $a0, 0x20($sp)
|
sw $a0, 0x20($sp)
|
||||||
#ifndef VERSION_CN
|
#ifndef BB_BOOT
|
||||||
sb $zero, 0x27($sp)
|
sb $zero, 0x27($sp)
|
||||||
#endif
|
#endif
|
||||||
move $t0, $zero
|
move $t0, $zero
|
||||||
move $t2, $zero
|
move $t2, $zero
|
||||||
li $t5, 51200
|
li $t5, 51200
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
sb $zero, 0x27($sp)
|
sb $zero, 0x27($sp)
|
||||||
#endif
|
#endif
|
||||||
move $t6, $zero
|
move $t6, $zero
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
.LA4000978:
|
.LA4000978:
|
||||||
#endif
|
#endif
|
||||||
slti $k0, $t6, 0x40
|
slti $k0, $t6, 0x40
|
||||||
.LA40009A4:
|
.LA40009A4:
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
bnez $k0, .LA400098C_cn
|
bnez $k0, .LA400098C_cn
|
||||||
nop
|
nop
|
||||||
#else
|
#else
|
||||||
@@ -955,11 +959,11 @@ func_A4000980:
|
|||||||
#endif
|
#endif
|
||||||
b .LA4000A30
|
b .LA4000A30
|
||||||
move $v0, $zero
|
move $v0, $zero
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
.LA400098C_cn:
|
.LA400098C_cn:
|
||||||
#endif
|
#endif
|
||||||
move $a0, $t6
|
move $a0, $t6
|
||||||
#ifndef VERSION_CN
|
#ifndef BB_BOOT
|
||||||
.LA40009B8:
|
.LA40009B8:
|
||||||
#endif
|
#endif
|
||||||
jal func_A4000A40
|
jal func_A4000A40
|
||||||
@@ -970,7 +974,7 @@ func_A4000980:
|
|||||||
addiu $a0, $sp, 0x27
|
addiu $a0, $sp, 0x27
|
||||||
lbu $k0, 0x27($sp)
|
lbu $k0, 0x27($sp)
|
||||||
li $k1, 800
|
li $k1, 800
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
multu $k0, $k1
|
multu $k0, $k1
|
||||||
mflo $t0
|
mflo $t0
|
||||||
lw $a0, 0x20($sp)
|
lw $a0, 0x20($sp)
|
||||||
@@ -1035,7 +1039,7 @@ func_A4000980:
|
|||||||
|
|
||||||
func_A4000A40:
|
func_A4000A40:
|
||||||
addiu $sp, $sp, -0x28
|
addiu $sp, $sp, -0x28
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
sw $ra, 0x1c($sp)
|
sw $ra, 0x1c($sp)
|
||||||
lui $t7, 0x4200
|
lui $t7, 0x4200
|
||||||
andi $a0, $a0, 0xff
|
andi $a0, $a0, 0xff
|
||||||
@@ -1072,7 +1076,7 @@ func_A4000A40:
|
|||||||
andi $k0, $a0, 0x20
|
andi $k0, $a0, 0x20
|
||||||
sll $k0, $k0, 0x12
|
sll $k0, $k0, 0x12
|
||||||
or $t7, $t7, $k0
|
or $t7, $t7, $k0
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
sw $t7, ($s5)
|
sw $t7, ($s5)
|
||||||
li $k1, 1
|
li $k1, 1
|
||||||
bne $a1, $k1, .LA4000AC0
|
bne $a1, $k1, .LA4000AC0
|
||||||
@@ -1086,7 +1090,7 @@ func_A4000A40:
|
|||||||
sw $zero, %lo(PHYS_TO_K1(MI_BASE_REG))($k0)
|
sw $zero, %lo(PHYS_TO_K1(MI_BASE_REG))($k0)
|
||||||
.LA4000AC0:
|
.LA4000AC0:
|
||||||
lw $ra, 0x1c($sp)
|
lw $ra, 0x1c($sp)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
jr $ra
|
jr $ra
|
||||||
addiu $sp, $sp, 0x28
|
addiu $sp, $sp, 0x28
|
||||||
#else
|
#else
|
||||||
@@ -1098,25 +1102,25 @@ func_A4000A40:
|
|||||||
func_A4000AD0:
|
func_A4000AD0:
|
||||||
addiu $sp, $sp, -0x28
|
addiu $sp, $sp, -0x28
|
||||||
sw $ra, 0x1c($sp)
|
sw $ra, 0x1c($sp)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
move $fp, $zero
|
move $fp, $zero
|
||||||
#endif
|
#endif
|
||||||
li $k0, 0x2000
|
li $k0, 0x2000
|
||||||
lui $k1, %hi(PHYS_TO_K1(MI_BASE_REG))
|
lui $k1, %hi(PHYS_TO_K1(MI_BASE_REG))
|
||||||
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
|
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
|
||||||
#ifndef VERSION_CN
|
#ifndef BB_BOOT
|
||||||
move $fp, $zero
|
move $fp, $zero
|
||||||
#endif
|
#endif
|
||||||
lw $fp, ($s5)
|
lw $fp, ($s5)
|
||||||
li $k0, 0x1000
|
li $k0, 0x1000
|
||||||
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
|
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
move $k0, $zero
|
move $k0, $zero
|
||||||
#endif
|
#endif
|
||||||
li $k1, 0x40
|
li $k1, 0x40
|
||||||
and $k1, $k1, $fp
|
and $k1, $k1, $fp
|
||||||
srl $k1, $k1, 6
|
srl $k1, $k1, 6
|
||||||
#ifndef VERSION_CN
|
#ifndef BB_BOOT
|
||||||
move $k0, $zero
|
move $k0, $zero
|
||||||
#endif
|
#endif
|
||||||
or $k0, $k0, $k1
|
or $k0, $k0, $k1
|
||||||
@@ -1142,7 +1146,7 @@ func_A4000AD0:
|
|||||||
or $k0, $k0, $k1
|
or $k0, $k0, $k1
|
||||||
sb $k0, ($a0)
|
sb $k0, ($a0)
|
||||||
lw $ra, 0x1c($sp)
|
lw $ra, 0x1c($sp)
|
||||||
#ifdef VERSION_CN
|
#ifdef BB_BOOT
|
||||||
jr $ra
|
jr $ra
|
||||||
addiu $sp, $sp, 0x28
|
addiu $sp, $sp, 0x28
|
||||||
.fill 0x30
|
.fill 0x30
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
/* Revision */
|
/* Revision */
|
||||||
.half 0x0000
|
.half 0x0000
|
||||||
.byte 20 /* Major version 2.0 */
|
.byte 20 /* Major version 2.0 */
|
||||||
.ascii LIBULTRA_STR_VER /* Minor Version */
|
.ascii "L" /* Minor Version */
|
||||||
|
|
||||||
#ifdef VERSION_CN
|
#ifdef VERSION_CN
|
||||||
.fill 0x30
|
.fill 0x30
|
||||||
|
|||||||
26
compile_flags.txt
Normal file
26
compile_flags.txt
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
-Iinclude/n64
|
||||||
|
-Iinclude
|
||||||
|
-Itextures
|
||||||
|
-Ibuild/us_n64
|
||||||
|
-Isrc
|
||||||
|
|
||||||
|
|
||||||
|
-include include/types.h
|
||||||
|
-include include/n64/ultra64.h
|
||||||
|
-include include/sm64.h
|
||||||
|
-include include/config.h
|
||||||
|
-include include/make_const_nonconst.h
|
||||||
|
-include include/geo_commands.h
|
||||||
|
-include include/level_commands.h
|
||||||
|
-include include/segment_symbols.h
|
||||||
|
-include include/command_macros_base.h
|
||||||
|
-include include/object_constants.h
|
||||||
|
|
||||||
|
|
||||||
|
-DTARGET_N64=1
|
||||||
|
-DVERSION_US=1
|
||||||
|
-DF3DEX_GBI_2=1
|
||||||
|
-DF3DZEX_NON_GBI_2=1
|
||||||
|
-DF3DEX_GBI_SHARED=1
|
||||||
|
-D_LANGUAGE_C=1
|
||||||
|
-DLIBULTRA_VERSION=OS_VER_K
|
||||||
@@ -38,6 +38,8 @@ def asset_needs_update(asset, version):
|
|||||||
|
|
||||||
|
|
||||||
def remove_file(fname):
|
def remove_file(fname):
|
||||||
|
if fname == "textures/crash_screen/crash_screen_font.ia1.png": # Preserve crash screen font
|
||||||
|
return
|
||||||
os.remove(fname)
|
os.remove(fname)
|
||||||
print("deleting", fname)
|
print("deleting", fname)
|
||||||
try:
|
try:
|
||||||
|
|||||||
79
include/ld.h
Normal file
79
include/ld.h
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef USE_EXT_RAM
|
||||||
|
#define ADDR_OR_ALIGN(addr) (addr)
|
||||||
|
#else
|
||||||
|
#define ADDR_OR_ALIGN(addr) ALIGN(0x1000)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(VERSION_US) || defined(VERSION_JP)
|
||||||
|
#define AUDIO_DIR BUILD_DIR/src/audio/us_jp
|
||||||
|
#elif defined(VERSION_EU)
|
||||||
|
#define AUDIO_DIR BUILD_DIR/src/audio/eu
|
||||||
|
#elif defined(VERSION_SH) || defined(VERSION_CN)
|
||||||
|
#define AUDIO_DIR BUILD_DIR/src/audio/sh
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BEGIN_SEG(name, addr) \
|
||||||
|
_##name##SegmentStart = ADDR(.name); \
|
||||||
|
_##name##SegmentRomStart = __romPos; \
|
||||||
|
.name (addr) : AT(__romPos)
|
||||||
|
|
||||||
|
#define END_SEG(name) \
|
||||||
|
_##name##SegmentEnd = ADDR(.name) + SIZEOF(.name); \
|
||||||
|
_##name##SegmentRomEnd = __romPos + SIZEOF(.name); \
|
||||||
|
__romPos += SIZEOF(.name);
|
||||||
|
|
||||||
|
#define BEGIN_NOLOAD(name) \
|
||||||
|
_##name##SegmentNoloadStart = ADDR(.name.noload); \
|
||||||
|
.name.noload (NOLOAD) :
|
||||||
|
|
||||||
|
#define END_NOLOAD(name) \
|
||||||
|
_##name##SegmentNoloadEnd = ADDR(.name.noload) + SIZEOF(.name.noload);
|
||||||
|
|
||||||
|
#define MIO0_SEG(name, segAddr) \
|
||||||
|
BEGIN_SEG(name##_mio0, segAddr) \
|
||||||
|
{ \
|
||||||
|
BUILD_DIR/bin/name.mio0.o(.data); \
|
||||||
|
. = ALIGN(0x10); \
|
||||||
|
} \
|
||||||
|
END_SEG(name##_mio0)
|
||||||
|
|
||||||
|
#define MIO0_EU_SEG(name, segAddr) \
|
||||||
|
BEGIN_SEG(name##_mio0, segAddr) \
|
||||||
|
{ \
|
||||||
|
BUILD_DIR/bin/eu/name.mio0.o(.data); \
|
||||||
|
. = ALIGN(0x10); \
|
||||||
|
} \
|
||||||
|
END_SEG(name##_mio0)
|
||||||
|
|
||||||
|
#define STANDARD_LEVEL(name) \
|
||||||
|
BEGIN_SEG(name##_segment_7, 0x07000000) \
|
||||||
|
{ \
|
||||||
|
BUILD_DIR/levels/name/leveldata.mio0.o(.data); \
|
||||||
|
. = ALIGN(0x10); \
|
||||||
|
} \
|
||||||
|
END_SEG(name##_segment_7) \
|
||||||
|
BEGIN_SEG(name, 0x0E000000) \
|
||||||
|
{ \
|
||||||
|
BUILD_DIR/levels/name/script.o(.data); \
|
||||||
|
BUILD_DIR/levels/name/geo.o(.data); \
|
||||||
|
} \
|
||||||
|
END_SEG(name)
|
||||||
|
|
||||||
|
#define STANDARD_OBJECTS(name, segAddr, geoAddr) \
|
||||||
|
BEGIN_SEG(name##_mio0, segAddr) \
|
||||||
|
{ \
|
||||||
|
BUILD_DIR/actors/name.mio0.o(.data); \
|
||||||
|
. = ALIGN(0x10); \
|
||||||
|
} \
|
||||||
|
END_SEG(name##_mio0) \
|
||||||
|
BEGIN_SEG(name##_geo, geoAddr) \
|
||||||
|
{ \
|
||||||
|
BUILD_DIR/actors/name##_geo.o(.data); \
|
||||||
|
} \
|
||||||
|
END_SEG(name##_geo)
|
||||||
|
|
||||||
|
#define CREATE_LO_HI_PAIR(name, value) \
|
||||||
|
name##Hi = (value) >> 16; \
|
||||||
|
name##Lo = (value) & 0xffff;
|
||||||
@@ -12,10 +12,6 @@
|
|||||||
// Since we are using both compilers to match iQue, ignore these errors.
|
// Since we are using both compilers to match iQue, ignore these errors.
|
||||||
#ifndef EGCS_GCC
|
#ifndef EGCS_GCC
|
||||||
|
|
||||||
#ifndef __sgi
|
|
||||||
#define GLOBAL_ASM(...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(__sgi) && (!defined(NON_MATCHING) || !defined(AVOID_UB))
|
#if !defined(__sgi) && (!defined(NON_MATCHING) || !defined(AVOID_UB))
|
||||||
// asm-process isn't supported outside of IDO, and undefined behavior causes crashes.
|
// asm-process isn't supported outside of IDO, and undefined behavior causes crashes.
|
||||||
#error Matching build is only possible on IDO; please build with NON_MATCHING=1.
|
#error Matching build is only possible on IDO; please build with NON_MATCHING=1.
|
||||||
|
|||||||
@@ -40,14 +40,14 @@ DECLARE_SEGMENT(engine)
|
|||||||
DECLARE_SEGMENT(behavior)
|
DECLARE_SEGMENT(behavior)
|
||||||
DECLARE_SEGMENT(scripts)
|
DECLARE_SEGMENT(scripts)
|
||||||
DECLARE_SEGMENT(goddard)
|
DECLARE_SEGMENT(goddard)
|
||||||
|
DECLARE_SEGMENT(framebuffers)
|
||||||
|
|
||||||
extern u8 _goddardSegmentStart[];
|
extern u8 _goddardSegmentStart[];
|
||||||
|
|
||||||
#ifdef USE_EXT_RAM
|
|
||||||
extern u8 _engineSegmentStart[];
|
extern u8 _engineSegmentStart[];
|
||||||
extern u8 _framebuffersSegmentNoloadStart[];
|
extern u8 _engineSegmentNoloadEnd[];
|
||||||
|
extern u8 _engineSegmentEnd[];
|
||||||
extern u8 _framebuffersSegmentNoloadEnd[];
|
extern u8 _framebuffersSegmentNoloadEnd[];
|
||||||
#endif
|
|
||||||
|
|
||||||
DECLARE_LEVEL_SEGMENT(menu)
|
DECLARE_LEVEL_SEGMENT(menu)
|
||||||
DECLARE_LEVEL_SEGMENT(intro)
|
DECLARE_LEVEL_SEGMENT(intro)
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#ifndef SEGMENTS_H
|
#ifndef SEGMENTS_H
|
||||||
#define SEGMENTS_H
|
#define SEGMENTS_H
|
||||||
|
|
||||||
#include "config.h"
|
#ifndef _LD
|
||||||
|
#include "segment_symbols.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Memory addresses for segments. Ideally, this header file would not be
|
* Memory addresses for segments. Ideally, this header file would not be
|
||||||
@@ -13,50 +15,17 @@
|
|||||||
* linker script syntax.
|
* linker script syntax.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SEG_START 0x8005C000
|
#define USE_EXT_RAM // Undefine this to set a strict 4MB limit.
|
||||||
|
|
||||||
#define SEG_FRAMEBUFFERS_SIZE (2 * SCREEN_WIDTH * SCREEN_HEIGHT * 3)
|
#ifndef USE_EXT_RAM
|
||||||
#define SEG_GODDARD_POOL_OFFSET 0x52000 // Offset from right side of pool
|
#define RAM_END 0x80400000
|
||||||
#define SEG_GODDARD (SEG_POOL_END - SEG_GODDARD_POOL_OFFSET)
|
|
||||||
|
|
||||||
#ifndef USE_EXT_RAM /* Default: Runs out of memory quickly when importing custom assets. */
|
|
||||||
|
|
||||||
#define SEG_RAM_END 0x80400000
|
|
||||||
|
|
||||||
#define SEG_POOL_START SEG_START
|
|
||||||
#define SEG_POOL_SIZE 0x165000
|
|
||||||
#define SEG_POOL_END (SEG_POOL_START + SEG_POOL_SIZE)
|
|
||||||
|
|
||||||
#define SEG_BUFFERS SEG_POOL_END
|
|
||||||
|
|
||||||
#ifdef VERSION_EU
|
|
||||||
#define SEG_ENGINE 0x8036FF00
|
|
||||||
#else
|
#else
|
||||||
#define SEG_ENGINE 0x80378800
|
#define RAM_END 0x80800000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SEG_FRAMEBUFFERS (SEG_RAM_END - SEG_FRAMEBUFFERS_SIZE)
|
#define SEG_FRAMEBUFFERS (SEG_RAM_END - SEG_FRAMEBUFFERS_SIZE)
|
||||||
|
#define SEG_POOL_START _framebuffersSegmentNoloadEnd // 0x0165000 in size
|
||||||
#else /* Use Expansion Pak space for pool. */
|
#define SEG_GODDARD SEG_POOL_START + 0x113000
|
||||||
|
#define POOL_SIZE RAM_END - SEG_POOL_START
|
||||||
/*
|
|
||||||
* Workaround for running out of pool space due to
|
|
||||||
* importing large custom content.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef VERSION_CN
|
|
||||||
#define SEG_RAM_END 0x807C0000 // iQue has stuff like EEPROM mapped at 807C0000 onwards. TODO: Code this using osMemSize
|
|
||||||
#else
|
|
||||||
#define SEG_RAM_END 0x80800000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SEG_BUFFERS SEG_START
|
|
||||||
#define SEG_ENGINE ((u32) &_engineSegmentStart)
|
|
||||||
#define SEG_FRAMEBUFFERS ((u32) &_framebuffersSegmentNoloadStart)
|
|
||||||
#define SEG_POOL_START ((u32) &_framebuffersSegmentNoloadEnd)
|
|
||||||
#define SEG_POOL_END SEG_RAM_END
|
|
||||||
#define SEG_POOL_END_4MB 0x80400000 // For the error message screen enhancement.
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // SEGMENTS_H
|
#endif // SEGMENTS_H
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
Language: Cpp
|
Language: Cpp
|
||||||
UseTab: Never
|
AlignAfterOpenBracket: Align
|
||||||
|
SortIncludes: false
|
||||||
ColumnLimit: 120
|
ColumnLimit: 120
|
||||||
PointerAlignment: Left
|
PointerAlignment: Left
|
||||||
BreakBeforeBraces: Attach
|
AllowShortFunctionsOnASingleLine: false
|
||||||
SpaceAfterCStyleCast: false
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
Cpp11BracedListStyle: false
|
AlignConsecutiveMacros: true
|
||||||
IndentCaseLabels: true
|
|
||||||
BinPackArguments: true
|
BinPackArguments: true
|
||||||
BinPackParameters: true
|
BinPackParameters: true
|
||||||
AlignAfterOpenBracket: Align
|
BreakBeforeBraces: Attach
|
||||||
AlignOperands: true
|
|
||||||
BreakBeforeTernaryOperators: true
|
BreakBeforeTernaryOperators: true
|
||||||
BreakBeforeBinaryOperators: None
|
BreakBeforeBinaryOperators: NonAssignment
|
||||||
AllowShortBlocksOnASingleLine: true
|
Cpp11BracedListStyle: false
|
||||||
AllowShortIfStatementsOnASingleLine: false
|
IndentCaseLabels: true
|
||||||
AllowShortLoopsOnASingleLine: false
|
|
||||||
AllowShortCaseLabelsOnASingleLine: false
|
|
||||||
AllowShortFunctionsOnASingleLine: false
|
|
||||||
AlignEscapedNewlines: Left
|
|
||||||
AlignTrailingComments: true
|
AlignTrailingComments: true
|
||||||
SortIncludes: false
|
AlignConsecutiveBitFields: true
|
||||||
|
UseTab: Never
|
||||||
35
lib/hackerlibultra/.github/workflows/ci_gcc.yml
vendored
Normal file
35
lib/hackerlibultra/.github/workflows/ci_gcc.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# CI file for GCC builds
|
||||||
|
|
||||||
|
name: Build GCC libgultra
|
||||||
|
|
||||||
|
# Build on every branch push, tag push, and pull request change:
|
||||||
|
on: [push, pull_request_target]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_repo:
|
||||||
|
name: Build repo
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version: [L] # [H, I, I_patch, J, K, L]
|
||||||
|
suffix: [~, _d, _rom]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- name: Install package requirements
|
||||||
|
run: sudo apt-get install -y clang-tools clang-format clang-tidy gcc-mips-linux-gnu binutils-mips-linux-gnu build-essential python3
|
||||||
|
|
||||||
|
- name: Verify formatting on all files
|
||||||
|
run: python3 tools/check_format.py --verbose
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
run: make setup -j $(nproc) TARGET=libgultra${{ matrix.suffix }} VERSION=${{ matrix.version }}
|
||||||
|
|
||||||
|
- name: Build libgultra${{ matrix.suffix }} ${{ matrix.version }}
|
||||||
|
run: make -j $(nproc) TARGET=libgultra${{ matrix.suffix }} VERSION=${{ matrix.version }}
|
||||||
29
lib/hackerlibultra/.gitignore
vendored
Normal file
29
lib/hackerlibultra/.gitignore
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Cache files
|
||||||
|
__pycache__/
|
||||||
|
.pyc
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Text editor remnants
|
||||||
|
.vscode/
|
||||||
|
.vs/
|
||||||
|
.idea/
|
||||||
|
CMakeLists.txt
|
||||||
|
cmake-build-debug
|
||||||
|
venv/
|
||||||
|
.venv
|
||||||
|
|
||||||
|
# Project-specific ignores
|
||||||
|
base_*/
|
||||||
|
build/
|
||||||
|
expected/
|
||||||
|
notes/
|
||||||
|
tools/gcc
|
||||||
|
tools/ido
|
||||||
|
*.elf
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
|
||||||
|
# Tool artifacts
|
||||||
|
ctx.c
|
||||||
|
|
||||||
|
libultra_collection/
|
||||||
12
lib/hackerlibultra/.gitrepo
Normal file
12
lib/hackerlibultra/.gitrepo
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
; DO NOT EDIT (unless you know what you are doing)
|
||||||
|
;
|
||||||
|
; This subdirectory is a git "subrepo", and this file is maintained by the
|
||||||
|
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
|
||||||
|
;
|
||||||
|
[subrepo]
|
||||||
|
remote = https://github.com/HackerN64/hackerlibultra
|
||||||
|
branch = main
|
||||||
|
commit = 08e84e89acc16e3ec5d1614e6e7c6bf6f218f2c1
|
||||||
|
parent = 1afde17e882b1928371bf032dccfd418c7b615b9
|
||||||
|
method = merge
|
||||||
|
cmdver = 0.4.9
|
||||||
11
lib/hackerlibultra/CODEOWNERS
Normal file
11
lib/hackerlibultra/CODEOWNERS
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Lines starting with '#' are comments.
|
||||||
|
# Each line is a file pattern followed by one or more owners.
|
||||||
|
|
||||||
|
# These owners will be the default owners for everything in the repo.
|
||||||
|
* @someone2639 @Thar0 @gheskett
|
||||||
|
|
||||||
|
# Order is important. The last matching pattern has the most precedence.
|
||||||
|
# So if a pull request only touches javascript files, only these owners
|
||||||
|
# will be requested to review.
|
||||||
|
|
||||||
|
# You can also use email addresses if you prefer.
|
||||||
118
lib/hackerlibultra/Makefile
Normal file
118
lib/hackerlibultra/Makefile
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
# One of:
|
||||||
|
# libgultra_rom, libgultra_d, libgultra
|
||||||
|
# libultra_rom, libultra_d, libultra
|
||||||
|
TARGET ?= libgultra_rom
|
||||||
|
VERSION ?= L
|
||||||
|
VERBOSE ?= 0
|
||||||
|
|
||||||
|
include util.mk
|
||||||
|
|
||||||
|
ifeq ($(VERBOSE), 0)
|
||||||
|
V=@
|
||||||
|
else
|
||||||
|
V=
|
||||||
|
endif
|
||||||
|
# detect hackerchain
|
||||||
|
ifneq ($(call find-command, $(HACKERCHAIN)/mips64-elf-ld),)
|
||||||
|
CROSS := $(HACKERCHAIN)/mips64-elf-
|
||||||
|
else
|
||||||
|
$(error Unable to detect a hackerchain toolchain installation.)
|
||||||
|
endif
|
||||||
|
|
||||||
|
BUILD_ROOT := build
|
||||||
|
BUILD_DIR := $(BUILD_ROOT)/$(VERSION)/$(TARGET)
|
||||||
|
BUILD_AR := $(BUILD_DIR)/$(TARGET).a
|
||||||
|
|
||||||
|
WORKING_DIR := $(shell pwd)
|
||||||
|
|
||||||
|
CPP := cpp -P
|
||||||
|
AR := $(CROSS)ar
|
||||||
|
|
||||||
|
VERSION_DEFINE := -DBUILD_VERSION=VERSION_$(VERSION) -DBUILD_VERSION_STRING=\"2.0$(VERSION)\"
|
||||||
|
|
||||||
|
ifeq ($(findstring _d,$(TARGET)),_d)
|
||||||
|
DEBUGFLAG := -D_DEBUG
|
||||||
|
else
|
||||||
|
DEBUGFLAG := -DNDEBUG
|
||||||
|
endif
|
||||||
|
|
||||||
|
AS := $(CROSS)gcc -x assembler-with-cpp
|
||||||
|
CC := $(CROSS)gcc
|
||||||
|
|
||||||
|
WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-builtin-declaration-mismatch
|
||||||
|
WARNINGS += -Wno-int-conversion -Wno-incompatible-pointer-types -Wno-implicit-function-declaration # TODO: Try adjusting code to remove these
|
||||||
|
CFLAGS := -G 0 -c -nostdinc -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -mdivide-breaks -fno-PIC -fno-common -ffreestanding -fbuiltin -fno-builtin-sinf -fno-builtin-cosf -funsigned-char $(WARNINGS)
|
||||||
|
CFLAGS += -fno-strict-aliasing # TODO: Try adjusting code to remove this
|
||||||
|
ASFLAGS := -w -nostdinc -c -G 0 -march=vr4300 -mabi=32 -mgp32 -mfp32 -DMIPSEB -D_LANGUAGE_ASSEMBLY -D_MIPS_SIM=1 -D_ULTRA64
|
||||||
|
CPPFLAGS = -DMODERN_CC -D_MIPS_SZLONG=32 -D__USE_ISOC99 $(GBIDEFINE) $(VERSION_DEFINE) $(DEBUGFLAG)
|
||||||
|
IINC = -I . -I $(WORKING_DIR)/include -I $(WORKING_DIR)/include/compiler/modern_gcc -I $(WORKING_DIR)/include/PR
|
||||||
|
MIPS_VERSION := -mips3
|
||||||
|
ASOPTFLAGS :=
|
||||||
|
|
||||||
|
ifeq ($(findstring _d,$(TARGET)),_d)
|
||||||
|
OPTFLAGS := -Og -ggdb3 -ffast-math -fno-unsafe-math-optimizations
|
||||||
|
else
|
||||||
|
OPTFLAGS := -Os -ggdb3 -ffast-math -fno-unsafe-math-optimizations
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(findstring _rom,$(TARGET)),_rom)
|
||||||
|
CPPFLAGS += -D_FINALROM
|
||||||
|
endif
|
||||||
|
|
||||||
|
SRC_DIRS := $(shell find src -type d)
|
||||||
|
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||||
|
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
|
||||||
|
|
||||||
|
# Versions J and below used the C matrix math implementations
|
||||||
|
MGU_MATRIX_FILES := mtxcatf normalize scale translate
|
||||||
|
ifneq ($(filter $(VERSION),D E F G H I J),)
|
||||||
|
S_FILES := $(filter-out $(addprefix src/mgu/,$(MGU_MATRIX_FILES:=.s)),$(S_FILES))
|
||||||
|
else
|
||||||
|
C_FILES := $(filter-out $(addprefix src/gu/,$(MGU_MATRIX_FILES:=.c)),$(C_FILES))
|
||||||
|
endif
|
||||||
|
|
||||||
|
C_O_FILES := $(foreach f,$(C_FILES:.c=.o),$(BUILD_DIR)/$f)
|
||||||
|
S_O_FILES := $(foreach f,$(S_FILES:.s=.o),$(BUILD_DIR)/$f)
|
||||||
|
O_FILES := $(S_O_FILES) $(C_O_FILES)
|
||||||
|
|
||||||
|
AR_OBJECTS := $(shell cat base/$(VERSION)/$(TARGET).txt)
|
||||||
|
|
||||||
|
$(shell mkdir -p src $(foreach dir,$(SRC_DIRS),$(BUILD_DIR)/$(dir)))
|
||||||
|
|
||||||
|
.PHONY: all clean distclean setup
|
||||||
|
all: $(BUILD_AR)
|
||||||
|
|
||||||
|
$(BUILD_AR): $(O_FILES)
|
||||||
|
@printf " [AR] $@\n"
|
||||||
|
$(V)$(AR) rcs $@ $^
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) -rf $(BUILD_DIR)
|
||||||
|
|
||||||
|
distclean:
|
||||||
|
$(RM) -rf extracted/ $(BUILD_ROOT)
|
||||||
|
|
||||||
|
GBIDEFINE := -DF3DEX_GBI
|
||||||
|
|
||||||
|
$(BUILD_DIR)/src/gu/parse_gbi.o: GBIDEFINE := -DF3D_GBI
|
||||||
|
$(BUILD_DIR)/src/gu/us2dex_emu.o: GBIDEFINE :=
|
||||||
|
$(BUILD_DIR)/src/gu/us2dex2_emu.o: GBIDEFINE :=
|
||||||
|
$(BUILD_DIR)/src/sp/sprite.o: GBIDEFINE := -DF3D_GBI
|
||||||
|
$(BUILD_DIR)/src/sp/spriteex.o: GBIDEFINE :=
|
||||||
|
$(BUILD_DIR)/src/sp/spriteex2.o: GBIDEFINE :=
|
||||||
|
$(BUILD_DIR)/src/voice/%.o: OPTFLAGS += -DLANG_JAPANESE -I$(WORKING_DIR)/src -I$(WORKING_DIR)/src/voice
|
||||||
|
$(BUILD_DIR)/src/voice/%.o: CC := $(WORKING_DIR)/tools/compile_sjis.py -D__CC=$(CC) -D__BUILD_DIR=$(BUILD_DIR)
|
||||||
|
|
||||||
|
$(BUILD_DIR)/%.o: %.c
|
||||||
|
@printf " [CC] $<\n"
|
||||||
|
$(V)$(CC) $(CFLAGS) $(MIPS_VERSION) $(CPPFLAGS) $(OPTFLAGS) $< $(IINC) -o $@
|
||||||
|
$(V)tools/set_o32abi_bit.py $@
|
||||||
|
|
||||||
|
$(BUILD_DIR)/%.o: %.s
|
||||||
|
@printf " [AS] $<\n"
|
||||||
|
$(V)$(AS) $(ASFLAGS) $(MIPS_VERSION) $(CPPFLAGS) $(ASOPTFLAGS) $< $(IINC) -o $@
|
||||||
|
$(V)tools/set_o32abi_bit.py $@
|
||||||
|
|
||||||
|
# Disable built-in rules
|
||||||
|
.SUFFIXES:
|
||||||
|
print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true
|
||||||
78
lib/hackerlibultra/README.md
Normal file
78
lib/hackerlibultra/README.md
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# ultralib
|
||||||
|
|
||||||
|
Reverse engineering of libultra
|
||||||
|
|
||||||
|
## Compatibility
|
||||||
|
|
||||||
|
Currently this repo supports building the following versions:
|
||||||
|
|
||||||
|
| IDO / GCC | `libultra.a` / `libgultra.a` | `libultra_d.a` / `libgultra_d.a` | `libultra_rom.a` / `libgultra_rom.a` |
|
||||||
|
| - | :-: | :-: | :-: |
|
||||||
|
| 2.0E | :x: / N/A | :x: / N/A | :x: / N/A |
|
||||||
|
| 2.0F | :x: / N/A | :x: / N/A | :x: / N/A |
|
||||||
|
| 2.0G | :x: / N/A | :x: / N/A | :x: / N/A |
|
||||||
|
| 2.0H | N/A / :x: | N/A / :x: | N/A / :x: |
|
||||||
|
| 2.0I | :heavy_check_mark: / :heavy_check_mark: | :x: / :heavy_check_mark: | :heavy_check_mark: / :heavy_check_mark: |
|
||||||
|
| 2.0I_patch | :x: / :x: | :x: / :x: | :x: / :x: |
|
||||||
|
| 2.0J | :heavy_check_mark: / :heavy_check_mark: | :x: / :heavy_check_mark: | :heavy_check_mark: / :heavy_check_mark: |
|
||||||
|
| 2.0K | :heavy_check_mark: / :heavy_check_mark: | :x: / :heavy_check_mark: | :heavy_check_mark: / :heavy_check_mark: |
|
||||||
|
| 2.0L | :heavy_check_mark: / :heavy_check_mark: | :x: / :heavy_check_mark: | :heavy_check_mark: / :heavy_check_mark: |
|
||||||
|
| ique_v1.5 | :x: | :x: | :x: |
|
||||||
|
|
||||||
|
## Preparation
|
||||||
|
|
||||||
|
After cloning the repo, put a copy of the target archive(s) in their correct version folder in `base/`.
|
||||||
|
For example, if your target archive is libgultra_rom.a 2.0L then you'd place it in `base/L/`.
|
||||||
|
If you will be building without a target archive by setting `COMPARE=0` then you can skip this step.
|
||||||
|
|
||||||
|
## Build dependencies
|
||||||
|
|
||||||
|
The build process requires the following packages:
|
||||||
|
|
||||||
|
- build-essential
|
||||||
|
- python3
|
||||||
|
- binutils-mips-linux-gnu (libultra* only)
|
||||||
|
|
||||||
|
Under Debian / Ubunutu you can install them with the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install build-essential python3
|
||||||
|
```
|
||||||
|
|
||||||
|
If building any libultra you can install binutils-mips-linux-gnu with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install binutils-mips-linux-gnu
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Run make setup with the proper flags set followed by make with optional jobs.
|
||||||
|
For example, if building the 2.0L PC archive you'd do the following:
|
||||||
|
|
||||||
|
- `make VERSION=L TARGET=libgultra_rom setup`
|
||||||
|
- `make VERSION=L TARGET=libgultra_rom`
|
||||||
|
|
||||||
|
Every target flag combination requires separate a setup command.
|
||||||
|
|
||||||
|
If building without an target archive, than you can use `COMPARE=0` like the the following:
|
||||||
|
|
||||||
|
- `make VERSION=L TARGET=libgultra_rom COMPARE=0 setup`
|
||||||
|
- `make VERSION=L TARGET=libgultra_rom COMPARE=0`
|
||||||
|
|
||||||
|
note that running setup without `COMPARE=0` and no archive will result in an error,
|
||||||
|
and only needs to be run once instead of per target flag combination
|
||||||
|
|
||||||
|
If building for use with modern linkers, than you can use `MODERN_LD=1` like the following:
|
||||||
|
|
||||||
|
- `make VERSION=L TARGET=libgultra_rom MODERN_LD=1 setup`
|
||||||
|
- `make VERSION=L TARGET=libgultra_rom MODERN_LD=1`
|
||||||
|
|
||||||
|
note that running with `MODERN_LD=1` will automatically set `COMPARE=0`.
|
||||||
|
|
||||||
|
It is also possible to build archives using modern gcc by using `MODERN_GCC=1` like the following:
|
||||||
|
|
||||||
|
- `make VERSION=L TARGET=libgultra_rom MODERN_GCC=1`
|
||||||
|
|
||||||
|
note that running with `MODERN_GCC=1` will automatically set `COMPARE=0` and `MODERN_LD=0`.
|
||||||
404
lib/hackerlibultra/base/I/libgultra.txt
Normal file
404
lib/hackerlibultra/base/I/libgultra.txt
Normal file
@@ -0,0 +1,404 @@
|
|||||||
|
gt.o
|
||||||
|
dumpturbo.o
|
||||||
|
sqrtf.o
|
||||||
|
libm_vals.o
|
||||||
|
align.o
|
||||||
|
cosf.o
|
||||||
|
coss.o
|
||||||
|
frustum.o
|
||||||
|
lookat.o
|
||||||
|
lookatref.o
|
||||||
|
lookathil.o
|
||||||
|
lookatstereo.o
|
||||||
|
mtxutil.o
|
||||||
|
mtxcatf.o
|
||||||
|
mtxcatl.o
|
||||||
|
normalize.o
|
||||||
|
ortho.o
|
||||||
|
perspective.o
|
||||||
|
rotate.o
|
||||||
|
rotaterpy.o
|
||||||
|
scale.o
|
||||||
|
sinf.o
|
||||||
|
sins.o
|
||||||
|
translate.o
|
||||||
|
loadtextureblockmipmap.o
|
||||||
|
guloadtile_bug.o
|
||||||
|
position.o
|
||||||
|
poslight.o
|
||||||
|
poslighthil.o
|
||||||
|
random.o
|
||||||
|
usprite.o
|
||||||
|
us2dex.o
|
||||||
|
us2dex_emu.o
|
||||||
|
parse_rdp.o
|
||||||
|
parse_gbi.o
|
||||||
|
dump_gbi.o
|
||||||
|
parse_string.o
|
||||||
|
exceptasm.o
|
||||||
|
getcause.o
|
||||||
|
getcompare.o
|
||||||
|
getconfig.o
|
||||||
|
getcount.o
|
||||||
|
getfpccsr.o
|
||||||
|
getsr.o
|
||||||
|
getintmask.o
|
||||||
|
gettlbasid.o
|
||||||
|
gettlbhi.o
|
||||||
|
gettlblo0.o
|
||||||
|
gettlblo1.o
|
||||||
|
gettlbpagemask.o
|
||||||
|
invaldcache.o
|
||||||
|
invalicache.o
|
||||||
|
interrupt.o
|
||||||
|
maptlb.o
|
||||||
|
parameters.o
|
||||||
|
probetlb.o
|
||||||
|
setintmask.o
|
||||||
|
setcause.o
|
||||||
|
setcompare.o
|
||||||
|
setconfig.o
|
||||||
|
setcount.o
|
||||||
|
setfpccsr.o
|
||||||
|
setsr.o
|
||||||
|
settlbasid.o
|
||||||
|
unmaptlb.o
|
||||||
|
unmaptlball.o
|
||||||
|
writebackdcache.o
|
||||||
|
writebackdcacheall.o
|
||||||
|
maptlbrdb.o
|
||||||
|
errorasm.o
|
||||||
|
assertbreak.o
|
||||||
|
atomic.o
|
||||||
|
createmesgqueue.o
|
||||||
|
createthread.o
|
||||||
|
destroythread.o
|
||||||
|
getactivequeue.o
|
||||||
|
getthreadid.o
|
||||||
|
getthreadpri.o
|
||||||
|
gettime.o
|
||||||
|
initialize.o
|
||||||
|
jammesg.o
|
||||||
|
kdebugserver.o
|
||||||
|
physicaltovirtual.o
|
||||||
|
recvmesg.o
|
||||||
|
resetglobalintmask.o
|
||||||
|
sendmesg.o
|
||||||
|
seteventmesg.o
|
||||||
|
setglobalintmask.o
|
||||||
|
sethwinterrupt.o
|
||||||
|
setthreadpri.o
|
||||||
|
settime.o
|
||||||
|
settimer.o
|
||||||
|
startthread.o
|
||||||
|
stopthread.o
|
||||||
|
stoptimer.o
|
||||||
|
syncputchars.o
|
||||||
|
thread.o
|
||||||
|
timerintr.o
|
||||||
|
virtualtophysical.o
|
||||||
|
yieldthread.o
|
||||||
|
getcurrfaultthread.o
|
||||||
|
getnextfaultthread.o
|
||||||
|
initrdb.o
|
||||||
|
rdbsend.o
|
||||||
|
getmemsize.o
|
||||||
|
error.o
|
||||||
|
seterrorhandler.o
|
||||||
|
assert.o
|
||||||
|
exit.o
|
||||||
|
profile.o
|
||||||
|
readhost.o
|
||||||
|
testhost.o
|
||||||
|
writehost.o
|
||||||
|
ackramromread.o
|
||||||
|
ackramromwrite.o
|
||||||
|
host_ptn64.o
|
||||||
|
drvrnew.o
|
||||||
|
load.o
|
||||||
|
auxbus.o
|
||||||
|
bnkf.o
|
||||||
|
env.o
|
||||||
|
event.o
|
||||||
|
filter.o
|
||||||
|
mainbus.o
|
||||||
|
resample.o
|
||||||
|
reverb.o
|
||||||
|
save.o
|
||||||
|
seq.o
|
||||||
|
sl.o
|
||||||
|
heapcheck.o
|
||||||
|
heapinit.o
|
||||||
|
heapalloc.o
|
||||||
|
copy.o
|
||||||
|
seqpdelete.o
|
||||||
|
seqpgetfxmix.o
|
||||||
|
seqpgetpan.o
|
||||||
|
seqpgetchlvol.o
|
||||||
|
seqpgetpriority.o
|
||||||
|
seqpgetprogram.o
|
||||||
|
seqpgetseq.o
|
||||||
|
seqpgettempo.o
|
||||||
|
seqpgetvol.o
|
||||||
|
seqpgetstate.o
|
||||||
|
seqploop.o
|
||||||
|
seqpplay.o
|
||||||
|
seqpsendmidi.o
|
||||||
|
seqpsetbank.o
|
||||||
|
seqpsetfxmix.o
|
||||||
|
seqpsetpan.o
|
||||||
|
seqpsetchlvol.o
|
||||||
|
seqpsetpriority.o
|
||||||
|
seqpsetprogram.o
|
||||||
|
seqpsetseq.o
|
||||||
|
seqpsettempo.o
|
||||||
|
seqpsetvol.o
|
||||||
|
seqpstop.o
|
||||||
|
seqplayer.o
|
||||||
|
cseq.o
|
||||||
|
cspdelete.o
|
||||||
|
cspgetfxmix.o
|
||||||
|
cspgetpan.o
|
||||||
|
cspgetchlvol.o
|
||||||
|
cspgetpriority.o
|
||||||
|
cspgetprogram.o
|
||||||
|
cspgetseq.o
|
||||||
|
cspgettempo.o
|
||||||
|
cspgetvol.o
|
||||||
|
cspgetstate.o
|
||||||
|
cspplay.o
|
||||||
|
cspsendmidi.o
|
||||||
|
cspsetbank.o
|
||||||
|
cspsetfxmix.o
|
||||||
|
cspsetpan.o
|
||||||
|
cspsetchlvol.o
|
||||||
|
cspsetpriority.o
|
||||||
|
cspsetprogram.o
|
||||||
|
cspsetseq.o
|
||||||
|
cspsettempo.o
|
||||||
|
cspsetvol.o
|
||||||
|
cspstop.o
|
||||||
|
csplayer.o
|
||||||
|
sndplayer.o
|
||||||
|
sndpdelete.o
|
||||||
|
sndpallocate.o
|
||||||
|
sndpdeallocate.o
|
||||||
|
sndpsetsound.o
|
||||||
|
sndpplay.o
|
||||||
|
sndpplayat.o
|
||||||
|
sndpgetsound.o
|
||||||
|
sndpstop.o
|
||||||
|
sndpgetstate.o
|
||||||
|
sndpsetpitch.o
|
||||||
|
sndpsetpriority.o
|
||||||
|
sndpsetvol.o
|
||||||
|
sndpsetpan.o
|
||||||
|
sndpsetfxmix.o
|
||||||
|
synthesizer.o
|
||||||
|
syndelete.o
|
||||||
|
synaddplayer.o
|
||||||
|
synremoveplayer.o
|
||||||
|
synfreevoice.o
|
||||||
|
synallocvoice.o
|
||||||
|
synstopvoice.o
|
||||||
|
synstartvoice.o
|
||||||
|
synstartvoiceparam.o
|
||||||
|
synsetpitch.o
|
||||||
|
synsetvol.o
|
||||||
|
synsetfxmix.o
|
||||||
|
synsetpan.o
|
||||||
|
syngetpriority.o
|
||||||
|
synsetpriority.o
|
||||||
|
synallocfx.o
|
||||||
|
synfreefx.o
|
||||||
|
syngetfxref.o
|
||||||
|
synsetfxparam.o
|
||||||
|
cents2ratio.o
|
||||||
|
parse_abi.o
|
||||||
|
color.o
|
||||||
|
clearattribute.o
|
||||||
|
hide.o
|
||||||
|
spscale.o
|
||||||
|
setattribute.o
|
||||||
|
show.o
|
||||||
|
sprite.o
|
||||||
|
ai.o
|
||||||
|
aigetlen.o
|
||||||
|
aigetstat.o
|
||||||
|
aisetfreq.o
|
||||||
|
aisetnextbuf.o
|
||||||
|
dp.o
|
||||||
|
dpgetstat.o
|
||||||
|
dpsetstat.o
|
||||||
|
dpsetnextbuf.o
|
||||||
|
dpctr.o
|
||||||
|
sp.o
|
||||||
|
spgetstat.o
|
||||||
|
spsetstat.o
|
||||||
|
spsetpc.o
|
||||||
|
sprawread.o
|
||||||
|
sprawwrite.o
|
||||||
|
sprawdma.o
|
||||||
|
sptask.o
|
||||||
|
sptaskyield.o
|
||||||
|
sptaskyielded.o
|
||||||
|
vi.o
|
||||||
|
vigetcurrcontext.o
|
||||||
|
vigetfield.o
|
||||||
|
vigetcurrframebuf.o
|
||||||
|
vigetnextframebuf.o
|
||||||
|
vigetline.o
|
||||||
|
vigetmode.o
|
||||||
|
vigetnextcontext.o
|
||||||
|
vigetstat.o
|
||||||
|
vimgr.o
|
||||||
|
visetevent.o
|
||||||
|
visetmode.o
|
||||||
|
visetspecial.o
|
||||||
|
visetxscale.o
|
||||||
|
visetyscale.o
|
||||||
|
viswapbuf.o
|
||||||
|
viswapcontext.o
|
||||||
|
vitbl.o
|
||||||
|
viblack.o
|
||||||
|
virepeatline.o
|
||||||
|
vifade.o
|
||||||
|
si.o
|
||||||
|
sigetstat.o
|
||||||
|
sirawread.o
|
||||||
|
sirawwrite.o
|
||||||
|
sirawdma.o
|
||||||
|
siacs.o
|
||||||
|
contquery.o
|
||||||
|
contreaddata.o
|
||||||
|
contreset.o
|
||||||
|
controller.o
|
||||||
|
contsetch.o
|
||||||
|
crc.o
|
||||||
|
contramread.o
|
||||||
|
contramwrite.o
|
||||||
|
contpfs.o
|
||||||
|
pfsreformat.o
|
||||||
|
pfschecker.o
|
||||||
|
pfsinit.o
|
||||||
|
pfsallocatefile.o
|
||||||
|
pfsdeletefile.o
|
||||||
|
pfsreadwritefile.o
|
||||||
|
pfsfilestate.o
|
||||||
|
pfssearchfile.o
|
||||||
|
pfssetlabel.o
|
||||||
|
pfsgetlabel.o
|
||||||
|
pfsisplug.o
|
||||||
|
pfsfreeblocks.o
|
||||||
|
pfsnumfiles.o
|
||||||
|
conteepread.o
|
||||||
|
conteepwrite.o
|
||||||
|
conteepprobe.o
|
||||||
|
conteeplongwrite.o
|
||||||
|
conteeplongread.o
|
||||||
|
pfsinitpak.o
|
||||||
|
pfsrepairid.o
|
||||||
|
pfsgetstatus.o
|
||||||
|
motor.o
|
||||||
|
vimodentsclpn1.o
|
||||||
|
vimodentsclpf1.o
|
||||||
|
vimodentsclan1.o
|
||||||
|
vimodentsclaf1.o
|
||||||
|
vimodentsclpn2.o
|
||||||
|
vimodentsclpf2.o
|
||||||
|
vimodentsclan2.o
|
||||||
|
vimodentsclaf2.o
|
||||||
|
vimodentschpn1.o
|
||||||
|
vimodentschpf1.o
|
||||||
|
vimodentschan1.o
|
||||||
|
vimodentschaf1.o
|
||||||
|
vimodentschpn2.o
|
||||||
|
vimodentschpf2.o
|
||||||
|
vimodepallpn1.o
|
||||||
|
vimodepallpf1.o
|
||||||
|
vimodepallan1.o
|
||||||
|
vimodepallaf1.o
|
||||||
|
vimodepallpn2.o
|
||||||
|
vimodepallpf2.o
|
||||||
|
vimodepallan2.o
|
||||||
|
vimodepallaf2.o
|
||||||
|
vimodepalhpn1.o
|
||||||
|
vimodepalhpf1.o
|
||||||
|
vimodepalhan1.o
|
||||||
|
vimodepalhaf1.o
|
||||||
|
vimodepalhpn2.o
|
||||||
|
vimodepalhpf2.o
|
||||||
|
vimodempallpn1.o
|
||||||
|
vimodempallpf1.o
|
||||||
|
vimodempallan1.o
|
||||||
|
vimodempallaf1.o
|
||||||
|
vimodempallpn2.o
|
||||||
|
vimodempallpf2.o
|
||||||
|
vimodempallan2.o
|
||||||
|
vimodempallaf2.o
|
||||||
|
vimodempalhpn1.o
|
||||||
|
vimodempalhpf1.o
|
||||||
|
vimodempalhan1.o
|
||||||
|
vimodempalhaf1.o
|
||||||
|
vimodempalhpn2.o
|
||||||
|
vimodempalhpf2.o
|
||||||
|
pi.o
|
||||||
|
pigettype.o
|
||||||
|
pigetstat.o
|
||||||
|
pirawread.o
|
||||||
|
pirawwrite.o
|
||||||
|
pirawdma.o
|
||||||
|
pigetcmdq.o
|
||||||
|
pimgr.o
|
||||||
|
epirawread.o
|
||||||
|
epirawwrite.o
|
||||||
|
epirawdma.o
|
||||||
|
epiwrite.o
|
||||||
|
epiread.o
|
||||||
|
epidma.o
|
||||||
|
epigettype.o
|
||||||
|
epilinkhandle.o
|
||||||
|
cartrominit.o
|
||||||
|
leodiskinit.o
|
||||||
|
leointerrupt.o
|
||||||
|
driverominit.o
|
||||||
|
devmgr.o
|
||||||
|
piacs.o
|
||||||
|
piwrite.o
|
||||||
|
piread.o
|
||||||
|
pidma.o
|
||||||
|
giorawinterrupt.o
|
||||||
|
giointerrupt.o
|
||||||
|
region.o
|
||||||
|
malloc.o
|
||||||
|
free.o
|
||||||
|
getbufcount.o
|
||||||
|
getsize.o
|
||||||
|
printregion.o
|
||||||
|
rmonrcp.o
|
||||||
|
rmonbrk.o
|
||||||
|
rmoncmds.o
|
||||||
|
rmonmem.o
|
||||||
|
rmonmisc.o
|
||||||
|
rmonprint.o
|
||||||
|
rmonregs.o
|
||||||
|
rmontask.o
|
||||||
|
rmonmain.o
|
||||||
|
rmonsio.o
|
||||||
|
bcmp.o
|
||||||
|
bcopy.o
|
||||||
|
bzero.o
|
||||||
|
ll.o
|
||||||
|
llcvt.o
|
||||||
|
string.o
|
||||||
|
ldiv.o
|
||||||
|
llbit.o
|
||||||
|
xlitob.o
|
||||||
|
xldtob.o
|
||||||
|
xprintf.o
|
||||||
|
sprintf.o
|
||||||
|
syncprintf.o
|
||||||
|
delay.o
|
||||||
|
log.o
|
||||||
|
logfloat.o
|
||||||
|
sched.o
|
||||||
404
lib/hackerlibultra/base/I/libgultra_d.txt
Normal file
404
lib/hackerlibultra/base/I/libgultra_d.txt
Normal file
@@ -0,0 +1,404 @@
|
|||||||
|
gt.o
|
||||||
|
dumpturbo.o
|
||||||
|
sqrtf.o
|
||||||
|
libm_vals.o
|
||||||
|
align.o
|
||||||
|
cosf.o
|
||||||
|
coss.o
|
||||||
|
frustum.o
|
||||||
|
lookat.o
|
||||||
|
lookatref.o
|
||||||
|
lookathil.o
|
||||||
|
lookatstereo.o
|
||||||
|
mtxutil.o
|
||||||
|
mtxcatf.o
|
||||||
|
mtxcatl.o
|
||||||
|
normalize.o
|
||||||
|
ortho.o
|
||||||
|
perspective.o
|
||||||
|
rotate.o
|
||||||
|
rotaterpy.o
|
||||||
|
scale.o
|
||||||
|
sinf.o
|
||||||
|
sins.o
|
||||||
|
translate.o
|
||||||
|
loadtextureblockmipmap.o
|
||||||
|
guloadtile_bug.o
|
||||||
|
position.o
|
||||||
|
poslight.o
|
||||||
|
poslighthil.o
|
||||||
|
random.o
|
||||||
|
usprite.o
|
||||||
|
us2dex.o
|
||||||
|
us2dex_emu.o
|
||||||
|
parse_rdp.o
|
||||||
|
parse_gbi.o
|
||||||
|
dump_gbi.o
|
||||||
|
parse_string.o
|
||||||
|
exceptasm.o
|
||||||
|
getcause.o
|
||||||
|
getcompare.o
|
||||||
|
getconfig.o
|
||||||
|
getcount.o
|
||||||
|
getfpccsr.o
|
||||||
|
getsr.o
|
||||||
|
getintmask.o
|
||||||
|
gettlbasid.o
|
||||||
|
gettlbhi.o
|
||||||
|
gettlblo0.o
|
||||||
|
gettlblo1.o
|
||||||
|
gettlbpagemask.o
|
||||||
|
invaldcache.o
|
||||||
|
invalicache.o
|
||||||
|
interrupt.o
|
||||||
|
maptlb.o
|
||||||
|
parameters.o
|
||||||
|
probetlb.o
|
||||||
|
setintmask.o
|
||||||
|
setcause.o
|
||||||
|
setcompare.o
|
||||||
|
setconfig.o
|
||||||
|
setcount.o
|
||||||
|
setfpccsr.o
|
||||||
|
setsr.o
|
||||||
|
settlbasid.o
|
||||||
|
unmaptlb.o
|
||||||
|
unmaptlball.o
|
||||||
|
writebackdcache.o
|
||||||
|
writebackdcacheall.o
|
||||||
|
maptlbrdb.o
|
||||||
|
errorasm.o
|
||||||
|
assertbreak.o
|
||||||
|
atomic.o
|
||||||
|
createmesgqueue.o
|
||||||
|
createthread.o
|
||||||
|
destroythread.o
|
||||||
|
getactivequeue.o
|
||||||
|
getthreadid.o
|
||||||
|
getthreadpri.o
|
||||||
|
gettime.o
|
||||||
|
initialize.o
|
||||||
|
jammesg.o
|
||||||
|
kdebugserver.o
|
||||||
|
physicaltovirtual.o
|
||||||
|
recvmesg.o
|
||||||
|
resetglobalintmask.o
|
||||||
|
sendmesg.o
|
||||||
|
seteventmesg.o
|
||||||
|
setglobalintmask.o
|
||||||
|
sethwinterrupt.o
|
||||||
|
setthreadpri.o
|
||||||
|
settime.o
|
||||||
|
settimer.o
|
||||||
|
startthread.o
|
||||||
|
stopthread.o
|
||||||
|
stoptimer.o
|
||||||
|
syncputchars.o
|
||||||
|
thread.o
|
||||||
|
timerintr.o
|
||||||
|
virtualtophysical.o
|
||||||
|
yieldthread.o
|
||||||
|
getcurrfaultthread.o
|
||||||
|
getnextfaultthread.o
|
||||||
|
initrdb.o
|
||||||
|
rdbsend.o
|
||||||
|
getmemsize.o
|
||||||
|
error.o
|
||||||
|
seterrorhandler.o
|
||||||
|
assert.o
|
||||||
|
exit.o
|
||||||
|
profile.o
|
||||||
|
readhost.o
|
||||||
|
testhost.o
|
||||||
|
writehost.o
|
||||||
|
ackramromread.o
|
||||||
|
ackramromwrite.o
|
||||||
|
host_ptn64.o
|
||||||
|
drvrnew.o
|
||||||
|
load.o
|
||||||
|
auxbus.o
|
||||||
|
bnkf.o
|
||||||
|
env.o
|
||||||
|
event.o
|
||||||
|
filter.o
|
||||||
|
mainbus.o
|
||||||
|
resample.o
|
||||||
|
reverb.o
|
||||||
|
save.o
|
||||||
|
seq.o
|
||||||
|
sl.o
|
||||||
|
heapcheck.o
|
||||||
|
heapinit.o
|
||||||
|
heapalloc.o
|
||||||
|
copy.o
|
||||||
|
seqpdelete.o
|
||||||
|
seqpgetfxmix.o
|
||||||
|
seqpgetpan.o
|
||||||
|
seqpgetchlvol.o
|
||||||
|
seqpgetpriority.o
|
||||||
|
seqpgetprogram.o
|
||||||
|
seqpgetseq.o
|
||||||
|
seqpgettempo.o
|
||||||
|
seqpgetvol.o
|
||||||
|
seqpgetstate.o
|
||||||
|
seqploop.o
|
||||||
|
seqpplay.o
|
||||||
|
seqpsendmidi.o
|
||||||
|
seqpsetbank.o
|
||||||
|
seqpsetfxmix.o
|
||||||
|
seqpsetpan.o
|
||||||
|
seqpsetchlvol.o
|
||||||
|
seqpsetpriority.o
|
||||||
|
seqpsetprogram.o
|
||||||
|
seqpsetseq.o
|
||||||
|
seqpsettempo.o
|
||||||
|
seqpsetvol.o
|
||||||
|
seqpstop.o
|
||||||
|
seqplayer.o
|
||||||
|
cseq.o
|
||||||
|
cspdelete.o
|
||||||
|
cspgetfxmix.o
|
||||||
|
cspgetpan.o
|
||||||
|
cspgetchlvol.o
|
||||||
|
cspgetpriority.o
|
||||||
|
cspgetprogram.o
|
||||||
|
cspgetseq.o
|
||||||
|
cspgettempo.o
|
||||||
|
cspgetvol.o
|
||||||
|
cspgetstate.o
|
||||||
|
cspplay.o
|
||||||
|
cspsendmidi.o
|
||||||
|
cspsetbank.o
|
||||||
|
cspsetfxmix.o
|
||||||
|
cspsetpan.o
|
||||||
|
cspsetchlvol.o
|
||||||
|
cspsetpriority.o
|
||||||
|
cspsetprogram.o
|
||||||
|
cspsetseq.o
|
||||||
|
cspsettempo.o
|
||||||
|
cspsetvol.o
|
||||||
|
cspstop.o
|
||||||
|
csplayer.o
|
||||||
|
sndplayer.o
|
||||||
|
sndpdelete.o
|
||||||
|
sndpallocate.o
|
||||||
|
sndpdeallocate.o
|
||||||
|
sndpsetsound.o
|
||||||
|
sndpplay.o
|
||||||
|
sndpplayat.o
|
||||||
|
sndpgetsound.o
|
||||||
|
sndpstop.o
|
||||||
|
sndpgetstate.o
|
||||||
|
sndpsetpitch.o
|
||||||
|
sndpsetpriority.o
|
||||||
|
sndpsetvol.o
|
||||||
|
sndpsetpan.o
|
||||||
|
sndpsetfxmix.o
|
||||||
|
synthesizer.o
|
||||||
|
syndelete.o
|
||||||
|
synaddplayer.o
|
||||||
|
synremoveplayer.o
|
||||||
|
synfreevoice.o
|
||||||
|
synallocvoice.o
|
||||||
|
synstopvoice.o
|
||||||
|
synstartvoice.o
|
||||||
|
synstartvoiceparam.o
|
||||||
|
synsetpitch.o
|
||||||
|
synsetvol.o
|
||||||
|
synsetfxmix.o
|
||||||
|
synsetpan.o
|
||||||
|
syngetpriority.o
|
||||||
|
synsetpriority.o
|
||||||
|
synallocfx.o
|
||||||
|
synfreefx.o
|
||||||
|
syngetfxref.o
|
||||||
|
synsetfxparam.o
|
||||||
|
cents2ratio.o
|
||||||
|
parse_abi.o
|
||||||
|
color.o
|
||||||
|
clearattribute.o
|
||||||
|
hide.o
|
||||||
|
spscale.o
|
||||||
|
setattribute.o
|
||||||
|
show.o
|
||||||
|
sprite.o
|
||||||
|
ai.o
|
||||||
|
aigetlen.o
|
||||||
|
aigetstat.o
|
||||||
|
aisetfreq.o
|
||||||
|
aisetnextbuf.o
|
||||||
|
dp.o
|
||||||
|
dpgetstat.o
|
||||||
|
dpsetstat.o
|
||||||
|
dpsetnextbuf.o
|
||||||
|
dpctr.o
|
||||||
|
sp.o
|
||||||
|
spgetstat.o
|
||||||
|
spsetstat.o
|
||||||
|
spsetpc.o
|
||||||
|
sprawread.o
|
||||||
|
sprawwrite.o
|
||||||
|
sprawdma.o
|
||||||
|
sptask.o
|
||||||
|
sptaskyield.o
|
||||||
|
sptaskyielded.o
|
||||||
|
vi.o
|
||||||
|
vigetcurrcontext.o
|
||||||
|
vigetfield.o
|
||||||
|
vigetcurrframebuf.o
|
||||||
|
vigetnextframebuf.o
|
||||||
|
vigetline.o
|
||||||
|
vigetmode.o
|
||||||
|
vigetnextcontext.o
|
||||||
|
vigetstat.o
|
||||||
|
vimgr.o
|
||||||
|
visetevent.o
|
||||||
|
visetmode.o
|
||||||
|
visetspecial.o
|
||||||
|
visetxscale.o
|
||||||
|
visetyscale.o
|
||||||
|
viswapbuf.o
|
||||||
|
viswapcontext.o
|
||||||
|
vitbl.o
|
||||||
|
viblack.o
|
||||||
|
virepeatline.o
|
||||||
|
vifade.o
|
||||||
|
si.o
|
||||||
|
sigetstat.o
|
||||||
|
sirawread.o
|
||||||
|
sirawwrite.o
|
||||||
|
sirawdma.o
|
||||||
|
siacs.o
|
||||||
|
contquery.o
|
||||||
|
contreaddata.o
|
||||||
|
contreset.o
|
||||||
|
controller.o
|
||||||
|
contsetch.o
|
||||||
|
crc.o
|
||||||
|
contramread.o
|
||||||
|
contramwrite.o
|
||||||
|
contpfs.o
|
||||||
|
pfsreformat.o
|
||||||
|
pfschecker.o
|
||||||
|
pfsinit.o
|
||||||
|
pfsallocatefile.o
|
||||||
|
pfsdeletefile.o
|
||||||
|
pfsreadwritefile.o
|
||||||
|
pfsfilestate.o
|
||||||
|
pfssearchfile.o
|
||||||
|
pfssetlabel.o
|
||||||
|
pfsgetlabel.o
|
||||||
|
pfsisplug.o
|
||||||
|
pfsfreeblocks.o
|
||||||
|
pfsnumfiles.o
|
||||||
|
conteepread.o
|
||||||
|
conteepwrite.o
|
||||||
|
conteepprobe.o
|
||||||
|
conteeplongwrite.o
|
||||||
|
conteeplongread.o
|
||||||
|
pfsinitpak.o
|
||||||
|
pfsrepairid.o
|
||||||
|
pfsgetstatus.o
|
||||||
|
motor.o
|
||||||
|
vimodentsclpn1.o
|
||||||
|
vimodentsclpf1.o
|
||||||
|
vimodentsclan1.o
|
||||||
|
vimodentsclaf1.o
|
||||||
|
vimodentsclpn2.o
|
||||||
|
vimodentsclpf2.o
|
||||||
|
vimodentsclan2.o
|
||||||
|
vimodentsclaf2.o
|
||||||
|
vimodentschpn1.o
|
||||||
|
vimodentschpf1.o
|
||||||
|
vimodentschan1.o
|
||||||
|
vimodentschaf1.o
|
||||||
|
vimodentschpn2.o
|
||||||
|
vimodentschpf2.o
|
||||||
|
vimodepallpn1.o
|
||||||
|
vimodepallpf1.o
|
||||||
|
vimodepallan1.o
|
||||||
|
vimodepallaf1.o
|
||||||
|
vimodepallpn2.o
|
||||||
|
vimodepallpf2.o
|
||||||
|
vimodepallan2.o
|
||||||
|
vimodepallaf2.o
|
||||||
|
vimodepalhpn1.o
|
||||||
|
vimodepalhpf1.o
|
||||||
|
vimodepalhan1.o
|
||||||
|
vimodepalhaf1.o
|
||||||
|
vimodepalhpn2.o
|
||||||
|
vimodepalhpf2.o
|
||||||
|
vimodempallpn1.o
|
||||||
|
vimodempallpf1.o
|
||||||
|
vimodempallan1.o
|
||||||
|
vimodempallaf1.o
|
||||||
|
vimodempallpn2.o
|
||||||
|
vimodempallpf2.o
|
||||||
|
vimodempallan2.o
|
||||||
|
vimodempallaf2.o
|
||||||
|
vimodempalhpn1.o
|
||||||
|
vimodempalhpf1.o
|
||||||
|
vimodempalhan1.o
|
||||||
|
vimodempalhaf1.o
|
||||||
|
vimodempalhpn2.o
|
||||||
|
vimodempalhpf2.o
|
||||||
|
pi.o
|
||||||
|
pigettype.o
|
||||||
|
pigetstat.o
|
||||||
|
pirawread.o
|
||||||
|
pirawwrite.o
|
||||||
|
pirawdma.o
|
||||||
|
pigetcmdq.o
|
||||||
|
pimgr.o
|
||||||
|
epirawread.o
|
||||||
|
epirawwrite.o
|
||||||
|
epirawdma.o
|
||||||
|
epiwrite.o
|
||||||
|
epiread.o
|
||||||
|
epidma.o
|
||||||
|
epigettype.o
|
||||||
|
epilinkhandle.o
|
||||||
|
cartrominit.o
|
||||||
|
leodiskinit.o
|
||||||
|
leointerrupt.o
|
||||||
|
driverominit.o
|
||||||
|
devmgr.o
|
||||||
|
piacs.o
|
||||||
|
piwrite.o
|
||||||
|
piread.o
|
||||||
|
pidma.o
|
||||||
|
giorawinterrupt.o
|
||||||
|
giointerrupt.o
|
||||||
|
region.o
|
||||||
|
malloc.o
|
||||||
|
free.o
|
||||||
|
getbufcount.o
|
||||||
|
getsize.o
|
||||||
|
printregion.o
|
||||||
|
rmonrcp.o
|
||||||
|
rmonbrk.o
|
||||||
|
rmoncmds.o
|
||||||
|
rmonmem.o
|
||||||
|
rmonmisc.o
|
||||||
|
rmonprint.o
|
||||||
|
rmonregs.o
|
||||||
|
rmontask.o
|
||||||
|
rmonmain.o
|
||||||
|
rmonsio.o
|
||||||
|
bcmp.o
|
||||||
|
bcopy.o
|
||||||
|
bzero.o
|
||||||
|
ll.o
|
||||||
|
llcvt.o
|
||||||
|
string.o
|
||||||
|
ldiv.o
|
||||||
|
llbit.o
|
||||||
|
xlitob.o
|
||||||
|
xldtob.o
|
||||||
|
xprintf.o
|
||||||
|
sprintf.o
|
||||||
|
syncprintf.o
|
||||||
|
delay.o
|
||||||
|
log.o
|
||||||
|
logfloat.o
|
||||||
|
sched.o
|
||||||
404
lib/hackerlibultra/base/I/libgultra_rom.txt
Normal file
404
lib/hackerlibultra/base/I/libgultra_rom.txt
Normal file
@@ -0,0 +1,404 @@
|
|||||||
|
gt.o
|
||||||
|
dumpturbo.o
|
||||||
|
sqrtf.o
|
||||||
|
libm_vals.o
|
||||||
|
align.o
|
||||||
|
cosf.o
|
||||||
|
coss.o
|
||||||
|
frustum.o
|
||||||
|
lookat.o
|
||||||
|
lookatref.o
|
||||||
|
lookathil.o
|
||||||
|
lookatstereo.o
|
||||||
|
mtxutil.o
|
||||||
|
mtxcatf.o
|
||||||
|
mtxcatl.o
|
||||||
|
normalize.o
|
||||||
|
ortho.o
|
||||||
|
perspective.o
|
||||||
|
rotate.o
|
||||||
|
rotaterpy.o
|
||||||
|
scale.o
|
||||||
|
sinf.o
|
||||||
|
sins.o
|
||||||
|
translate.o
|
||||||
|
loadtextureblockmipmap.o
|
||||||
|
guloadtile_bug.o
|
||||||
|
position.o
|
||||||
|
poslight.o
|
||||||
|
poslighthil.o
|
||||||
|
random.o
|
||||||
|
usprite.o
|
||||||
|
us2dex.o
|
||||||
|
us2dex_emu.o
|
||||||
|
parse_rdp.o
|
||||||
|
parse_gbi.o
|
||||||
|
dump_gbi.o
|
||||||
|
parse_string.o
|
||||||
|
exceptasm.o
|
||||||
|
getcause.o
|
||||||
|
getcompare.o
|
||||||
|
getconfig.o
|
||||||
|
getcount.o
|
||||||
|
getfpccsr.o
|
||||||
|
getsr.o
|
||||||
|
getintmask.o
|
||||||
|
gettlbasid.o
|
||||||
|
gettlbhi.o
|
||||||
|
gettlblo0.o
|
||||||
|
gettlblo1.o
|
||||||
|
gettlbpagemask.o
|
||||||
|
invaldcache.o
|
||||||
|
invalicache.o
|
||||||
|
interrupt.o
|
||||||
|
maptlb.o
|
||||||
|
parameters.o
|
||||||
|
probetlb.o
|
||||||
|
setintmask.o
|
||||||
|
setcause.o
|
||||||
|
setcompare.o
|
||||||
|
setconfig.o
|
||||||
|
setcount.o
|
||||||
|
setfpccsr.o
|
||||||
|
setsr.o
|
||||||
|
settlbasid.o
|
||||||
|
unmaptlb.o
|
||||||
|
unmaptlball.o
|
||||||
|
writebackdcache.o
|
||||||
|
writebackdcacheall.o
|
||||||
|
maptlbrdb.o
|
||||||
|
errorasm.o
|
||||||
|
assertbreak.o
|
||||||
|
atomic.o
|
||||||
|
createmesgqueue.o
|
||||||
|
createthread.o
|
||||||
|
destroythread.o
|
||||||
|
getactivequeue.o
|
||||||
|
getthreadid.o
|
||||||
|
getthreadpri.o
|
||||||
|
gettime.o
|
||||||
|
initialize.o
|
||||||
|
jammesg.o
|
||||||
|
kdebugserver.o
|
||||||
|
physicaltovirtual.o
|
||||||
|
recvmesg.o
|
||||||
|
resetglobalintmask.o
|
||||||
|
sendmesg.o
|
||||||
|
seteventmesg.o
|
||||||
|
setglobalintmask.o
|
||||||
|
sethwinterrupt.o
|
||||||
|
setthreadpri.o
|
||||||
|
settime.o
|
||||||
|
settimer.o
|
||||||
|
startthread.o
|
||||||
|
stopthread.o
|
||||||
|
stoptimer.o
|
||||||
|
syncputchars.o
|
||||||
|
thread.o
|
||||||
|
timerintr.o
|
||||||
|
virtualtophysical.o
|
||||||
|
yieldthread.o
|
||||||
|
getcurrfaultthread.o
|
||||||
|
getnextfaultthread.o
|
||||||
|
initrdb.o
|
||||||
|
rdbsend.o
|
||||||
|
getmemsize.o
|
||||||
|
error.o
|
||||||
|
seterrorhandler.o
|
||||||
|
assert.o
|
||||||
|
exit.o
|
||||||
|
profile.o
|
||||||
|
readhost.o
|
||||||
|
testhost.o
|
||||||
|
writehost.o
|
||||||
|
ackramromread.o
|
||||||
|
ackramromwrite.o
|
||||||
|
host_ptn64.o
|
||||||
|
drvrnew.o
|
||||||
|
load.o
|
||||||
|
auxbus.o
|
||||||
|
bnkf.o
|
||||||
|
env.o
|
||||||
|
event.o
|
||||||
|
filter.o
|
||||||
|
mainbus.o
|
||||||
|
resample.o
|
||||||
|
reverb.o
|
||||||
|
save.o
|
||||||
|
seq.o
|
||||||
|
sl.o
|
||||||
|
heapcheck.o
|
||||||
|
heapinit.o
|
||||||
|
heapalloc.o
|
||||||
|
copy.o
|
||||||
|
seqpdelete.o
|
||||||
|
seqpgetfxmix.o
|
||||||
|
seqpgetpan.o
|
||||||
|
seqpgetchlvol.o
|
||||||
|
seqpgetpriority.o
|
||||||
|
seqpgetprogram.o
|
||||||
|
seqpgetseq.o
|
||||||
|
seqpgettempo.o
|
||||||
|
seqpgetvol.o
|
||||||
|
seqpgetstate.o
|
||||||
|
seqploop.o
|
||||||
|
seqpplay.o
|
||||||
|
seqpsendmidi.o
|
||||||
|
seqpsetbank.o
|
||||||
|
seqpsetfxmix.o
|
||||||
|
seqpsetpan.o
|
||||||
|
seqpsetchlvol.o
|
||||||
|
seqpsetpriority.o
|
||||||
|
seqpsetprogram.o
|
||||||
|
seqpsetseq.o
|
||||||
|
seqpsettempo.o
|
||||||
|
seqpsetvol.o
|
||||||
|
seqpstop.o
|
||||||
|
seqplayer.o
|
||||||
|
cseq.o
|
||||||
|
cspdelete.o
|
||||||
|
cspgetfxmix.o
|
||||||
|
cspgetpan.o
|
||||||
|
cspgetchlvol.o
|
||||||
|
cspgetpriority.o
|
||||||
|
cspgetprogram.o
|
||||||
|
cspgetseq.o
|
||||||
|
cspgettempo.o
|
||||||
|
cspgetvol.o
|
||||||
|
cspgetstate.o
|
||||||
|
cspplay.o
|
||||||
|
cspsendmidi.o
|
||||||
|
cspsetbank.o
|
||||||
|
cspsetfxmix.o
|
||||||
|
cspsetpan.o
|
||||||
|
cspsetchlvol.o
|
||||||
|
cspsetpriority.o
|
||||||
|
cspsetprogram.o
|
||||||
|
cspsetseq.o
|
||||||
|
cspsettempo.o
|
||||||
|
cspsetvol.o
|
||||||
|
cspstop.o
|
||||||
|
csplayer.o
|
||||||
|
sndplayer.o
|
||||||
|
sndpdelete.o
|
||||||
|
sndpallocate.o
|
||||||
|
sndpdeallocate.o
|
||||||
|
sndpsetsound.o
|
||||||
|
sndpplay.o
|
||||||
|
sndpplayat.o
|
||||||
|
sndpgetsound.o
|
||||||
|
sndpstop.o
|
||||||
|
sndpgetstate.o
|
||||||
|
sndpsetpitch.o
|
||||||
|
sndpsetpriority.o
|
||||||
|
sndpsetvol.o
|
||||||
|
sndpsetpan.o
|
||||||
|
sndpsetfxmix.o
|
||||||
|
synthesizer.o
|
||||||
|
syndelete.o
|
||||||
|
synaddplayer.o
|
||||||
|
synremoveplayer.o
|
||||||
|
synfreevoice.o
|
||||||
|
synallocvoice.o
|
||||||
|
synstopvoice.o
|
||||||
|
synstartvoice.o
|
||||||
|
synstartvoiceparam.o
|
||||||
|
synsetpitch.o
|
||||||
|
synsetvol.o
|
||||||
|
synsetfxmix.o
|
||||||
|
synsetpan.o
|
||||||
|
syngetpriority.o
|
||||||
|
synsetpriority.o
|
||||||
|
synallocfx.o
|
||||||
|
synfreefx.o
|
||||||
|
syngetfxref.o
|
||||||
|
synsetfxparam.o
|
||||||
|
cents2ratio.o
|
||||||
|
parse_abi.o
|
||||||
|
color.o
|
||||||
|
clearattribute.o
|
||||||
|
hide.o
|
||||||
|
spscale.o
|
||||||
|
setattribute.o
|
||||||
|
show.o
|
||||||
|
sprite.o
|
||||||
|
ai.o
|
||||||
|
aigetlen.o
|
||||||
|
aigetstat.o
|
||||||
|
aisetfreq.o
|
||||||
|
aisetnextbuf.o
|
||||||
|
dp.o
|
||||||
|
dpgetstat.o
|
||||||
|
dpsetstat.o
|
||||||
|
dpsetnextbuf.o
|
||||||
|
dpctr.o
|
||||||
|
sp.o
|
||||||
|
spgetstat.o
|
||||||
|
spsetstat.o
|
||||||
|
spsetpc.o
|
||||||
|
sprawread.o
|
||||||
|
sprawwrite.o
|
||||||
|
sprawdma.o
|
||||||
|
sptask.o
|
||||||
|
sptaskyield.o
|
||||||
|
sptaskyielded.o
|
||||||
|
vi.o
|
||||||
|
vigetcurrcontext.o
|
||||||
|
vigetfield.o
|
||||||
|
vigetcurrframebuf.o
|
||||||
|
vigetnextframebuf.o
|
||||||
|
vigetline.o
|
||||||
|
vigetmode.o
|
||||||
|
vigetnextcontext.o
|
||||||
|
vigetstat.o
|
||||||
|
vimgr.o
|
||||||
|
visetevent.o
|
||||||
|
visetmode.o
|
||||||
|
visetspecial.o
|
||||||
|
visetxscale.o
|
||||||
|
visetyscale.o
|
||||||
|
viswapbuf.o
|
||||||
|
viswapcontext.o
|
||||||
|
vitbl.o
|
||||||
|
viblack.o
|
||||||
|
virepeatline.o
|
||||||
|
vifade.o
|
||||||
|
si.o
|
||||||
|
sigetstat.o
|
||||||
|
sirawread.o
|
||||||
|
sirawwrite.o
|
||||||
|
sirawdma.o
|
||||||
|
siacs.o
|
||||||
|
contquery.o
|
||||||
|
contreaddata.o
|
||||||
|
contreset.o
|
||||||
|
controller.o
|
||||||
|
contsetch.o
|
||||||
|
crc.o
|
||||||
|
contramread.o
|
||||||
|
contramwrite.o
|
||||||
|
contpfs.o
|
||||||
|
pfsreformat.o
|
||||||
|
pfschecker.o
|
||||||
|
pfsinit.o
|
||||||
|
pfsallocatefile.o
|
||||||
|
pfsdeletefile.o
|
||||||
|
pfsreadwritefile.o
|
||||||
|
pfsfilestate.o
|
||||||
|
pfssearchfile.o
|
||||||
|
pfssetlabel.o
|
||||||
|
pfsgetlabel.o
|
||||||
|
pfsisplug.o
|
||||||
|
pfsfreeblocks.o
|
||||||
|
pfsnumfiles.o
|
||||||
|
conteepread.o
|
||||||
|
conteepwrite.o
|
||||||
|
conteepprobe.o
|
||||||
|
conteeplongwrite.o
|
||||||
|
conteeplongread.o
|
||||||
|
pfsinitpak.o
|
||||||
|
pfsrepairid.o
|
||||||
|
pfsgetstatus.o
|
||||||
|
motor.o
|
||||||
|
vimodentsclpn1.o
|
||||||
|
vimodentsclpf1.o
|
||||||
|
vimodentsclan1.o
|
||||||
|
vimodentsclaf1.o
|
||||||
|
vimodentsclpn2.o
|
||||||
|
vimodentsclpf2.o
|
||||||
|
vimodentsclan2.o
|
||||||
|
vimodentsclaf2.o
|
||||||
|
vimodentschpn1.o
|
||||||
|
vimodentschpf1.o
|
||||||
|
vimodentschan1.o
|
||||||
|
vimodentschaf1.o
|
||||||
|
vimodentschpn2.o
|
||||||
|
vimodentschpf2.o
|
||||||
|
vimodepallpn1.o
|
||||||
|
vimodepallpf1.o
|
||||||
|
vimodepallan1.o
|
||||||
|
vimodepallaf1.o
|
||||||
|
vimodepallpn2.o
|
||||||
|
vimodepallpf2.o
|
||||||
|
vimodepallan2.o
|
||||||
|
vimodepallaf2.o
|
||||||
|
vimodepalhpn1.o
|
||||||
|
vimodepalhpf1.o
|
||||||
|
vimodepalhan1.o
|
||||||
|
vimodepalhaf1.o
|
||||||
|
vimodepalhpn2.o
|
||||||
|
vimodepalhpf2.o
|
||||||
|
vimodempallpn1.o
|
||||||
|
vimodempallpf1.o
|
||||||
|
vimodempallan1.o
|
||||||
|
vimodempallaf1.o
|
||||||
|
vimodempallpn2.o
|
||||||
|
vimodempallpf2.o
|
||||||
|
vimodempallan2.o
|
||||||
|
vimodempallaf2.o
|
||||||
|
vimodempalhpn1.o
|
||||||
|
vimodempalhpf1.o
|
||||||
|
vimodempalhan1.o
|
||||||
|
vimodempalhaf1.o
|
||||||
|
vimodempalhpn2.o
|
||||||
|
vimodempalhpf2.o
|
||||||
|
pi.o
|
||||||
|
pigettype.o
|
||||||
|
pigetstat.o
|
||||||
|
pirawread.o
|
||||||
|
pirawwrite.o
|
||||||
|
pirawdma.o
|
||||||
|
pigetcmdq.o
|
||||||
|
pimgr.o
|
||||||
|
epirawread.o
|
||||||
|
epirawwrite.o
|
||||||
|
epirawdma.o
|
||||||
|
epiwrite.o
|
||||||
|
epiread.o
|
||||||
|
epidma.o
|
||||||
|
epigettype.o
|
||||||
|
epilinkhandle.o
|
||||||
|
cartrominit.o
|
||||||
|
leodiskinit.o
|
||||||
|
leointerrupt.o
|
||||||
|
driverominit.o
|
||||||
|
devmgr.o
|
||||||
|
piacs.o
|
||||||
|
piwrite.o
|
||||||
|
piread.o
|
||||||
|
pidma.o
|
||||||
|
giorawinterrupt.o
|
||||||
|
giointerrupt.o
|
||||||
|
region.o
|
||||||
|
malloc.o
|
||||||
|
free.o
|
||||||
|
getbufcount.o
|
||||||
|
getsize.o
|
||||||
|
printregion.o
|
||||||
|
rmonrcp.o
|
||||||
|
rmonbrk.o
|
||||||
|
rmoncmds.o
|
||||||
|
rmonmem.o
|
||||||
|
rmonmisc.o
|
||||||
|
rmonprint.o
|
||||||
|
rmonregs.o
|
||||||
|
rmontask.o
|
||||||
|
rmonmain.o
|
||||||
|
rmonsio.o
|
||||||
|
bcmp.o
|
||||||
|
bcopy.o
|
||||||
|
bzero.o
|
||||||
|
ll.o
|
||||||
|
llcvt.o
|
||||||
|
string.o
|
||||||
|
ldiv.o
|
||||||
|
llbit.o
|
||||||
|
xlitob.o
|
||||||
|
xldtob.o
|
||||||
|
xprintf.o
|
||||||
|
sprintf.o
|
||||||
|
syncprintf.o
|
||||||
|
delay.o
|
||||||
|
log.o
|
||||||
|
logfloat.o
|
||||||
|
sched.o
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user