You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
42 Commits
v2.2.0
...
develop/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8676898ae9 | ||
|
|
c4c18b3d0e | ||
|
|
7298e94a1f | ||
|
|
27d328f86a | ||
|
|
27372fe74a | ||
|
|
3f1f7f41be | ||
|
|
bf70500b4d | ||
|
|
27fedee76f | ||
|
|
a918785a92 | ||
|
|
10720ea056 | ||
|
|
8dc47095e2 | ||
|
|
e3472e05cf | ||
|
|
74cb8ce062 | ||
|
|
9ef945296b | ||
|
|
e1c00d4bef | ||
|
|
aacf2c5e6d | ||
|
|
4500ffb579 | ||
|
|
a6782e6912 | ||
|
|
750ba10cb1 | ||
|
|
500507509b | ||
|
|
7381e35db4 | ||
|
|
6a3e7e7a87 | ||
|
|
9adb8c6de8 | ||
|
|
03ba81b5e3 | ||
|
|
98b6231216 | ||
|
|
252a900b91 | ||
|
|
92822c6412 | ||
|
|
0221d4ddf0 | ||
|
|
dcd58b2aad | ||
|
|
7ffa9a3bd7 | ||
|
|
dbba4871e1 | ||
|
|
520a6f3aed | ||
|
|
4d260f6885 | ||
|
|
aedae64e8b | ||
|
|
f3e1496d29 | ||
|
|
0005bbbd6a | ||
|
|
e494069b0a | ||
|
|
f852ff4359 | ||
|
|
2ae3426957 | ||
|
|
ca937d23ee | ||
|
|
7353db562c | ||
|
|
82e0fdf391 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2149,3 +2149,6 @@ lib/libs2d_engine.a
|
||||
|
||||
# :Zone_Identifier files
|
||||
*Zone.Identifier
|
||||
|
||||
# user-specific config file
|
||||
include/config/config_local.h
|
||||
|
||||
3
.vscode/c_cpp_properties.json
vendored
3
.vscode/c_cpp_properties.json
vendored
@@ -27,7 +27,8 @@
|
||||
"F3DEX_GBI_2=1",
|
||||
"F3DZEX_NON_GBI_2=1",
|
||||
"F3DEX_GBI_SHARED=1",
|
||||
"LIBPL=1"
|
||||
"LIBPL=1",
|
||||
"SDATA=1"
|
||||
],
|
||||
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
|
||||
"cStandard": "gnu17",
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# These owners will be the default owners for everything in the repo.
|
||||
* @Reonu
|
||||
* @thecozies
|
||||
* @gheskett
|
||||
* @Reonu @gheskett @arthurtilly
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
# So if a pull request only touches javascript files, only these owners
|
||||
|
||||
106
Makefile
106
Makefile
@@ -265,11 +265,20 @@ ifeq ($(LIBPL),1)
|
||||
SRC_DIRS += $(LIBPL_DIR)
|
||||
endif
|
||||
|
||||
# SDATA - use 64kb sdata and sbss sections to enhance performance (requires some housekeeping; recommended for experienced hackers only)
|
||||
# 1 - includes sdata and sbss in ROM
|
||||
# 0 - does not
|
||||
SDATA ?= 0
|
||||
$(eval $(call validate-option,SDATA,0 1))
|
||||
ifeq ($(SDATA),1)
|
||||
DEFINES += SDATA=1
|
||||
endif
|
||||
|
||||
BUILD_DIR_BASE := build
|
||||
# BUILD_DIR is the location where all build artifacts are placed
|
||||
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
|
||||
|
||||
COMPRESS ?= rnc1
|
||||
COMPRESS ?= yay0
|
||||
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
|
||||
ifeq ($(COMPRESS),gzip)
|
||||
DEFINES += GZIP=1
|
||||
@@ -399,6 +408,9 @@ GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
|
||||
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
|
||||
|
||||
# Ignore all .inc.c files
|
||||
C_FILES := $(filter-out %.inc.c,$(C_FILES))
|
||||
|
||||
# Sound files
|
||||
SOUND_BANK_FILES := $(wildcard sound/sound_banks/*.json)
|
||||
SOUND_SAMPLE_DIRS := $(wildcard sound/samples/*)
|
||||
@@ -441,8 +453,12 @@ else 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-none-elf-ld),)
|
||||
CROSS := mips64-none-elf-
|
||||
else ifneq ($(call find-command,mips-ld),)
|
||||
CROSS := mips-
|
||||
else ifneq ($(call find-command,mips-suse-linux-ld ),)
|
||||
CROSS := mips-suse-linux-
|
||||
else
|
||||
$(error Unable to detect a suitable MIPS toolchain installed)
|
||||
endif
|
||||
@@ -459,6 +475,10 @@ ifeq ($(COMPILER),gcc)
|
||||
CXX := $(CROSS)g++
|
||||
$(BUILD_DIR)/actors/%.o: OPT_FLAGS := -Ofast -mlong-calls
|
||||
$(BUILD_DIR)/levels/%.o: OPT_FLAGS := -Ofast -mlong-calls
|
||||
ifeq ($(SDATA),1)
|
||||
$(BUILD_DIR)/actors/%.o: CFLAGS += -G 0
|
||||
$(BUILD_DIR)/levels/%.o: CFLAGS += -G 0
|
||||
endif
|
||||
else ifeq ($(COMPILER),clang)
|
||||
CC := clang
|
||||
CXX := clang++
|
||||
@@ -499,17 +519,25 @@ C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
|
||||
DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
|
||||
|
||||
# C compiler options
|
||||
CFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS)
|
||||
CFLAGS = $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(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
|
||||
CFLAGS += -Wno-missing-braces
|
||||
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces
|
||||
else ifeq ($(COMPILER),clang)
|
||||
CFLAGS += -mfpxx -target mips -mabi=32 -G 0 -mhard-float -fomit-frame-pointer -fno-stack-protector -fno-common -I include -I src/ -I $(BUILD_DIR)/include -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra
|
||||
CFLAGS += -Wno-missing-braces
|
||||
CFLAGS += -mfpxx -target mips -mabi=32 -mhard-float -fomit-frame-pointer -fno-stack-protector -fno-common -I include -I src/ -I $(BUILD_DIR)/include -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces
|
||||
else
|
||||
CFLAGS += -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -signed -32
|
||||
endif
|
||||
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
|
||||
ASMFLAGS = -G 3 $(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
|
||||
|
||||
ifeq ($(SDATA),1)
|
||||
ASMFLAGS += -G 3
|
||||
else
|
||||
CFLAGS += -G 0
|
||||
ifeq ($(COMPILER),gcc)
|
||||
CFLAGS += -fno-zero-initialized-in-bss
|
||||
endif
|
||||
ASMFLAGS += -G 0
|
||||
endif
|
||||
|
||||
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
|
||||
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
|
||||
@@ -548,13 +576,28 @@ ifneq (,$(call find-command,armips))
|
||||
else
|
||||
RSPASM := $(TOOLS_DIR)/armips
|
||||
endif
|
||||
EMULATOR = mupen64plus
|
||||
EMU_FLAGS =
|
||||
|
||||
ifneq (,$(call find-command,wslview))
|
||||
LOADER = ./$(TOOLS_DIR)/UNFLoader.exe
|
||||
EMULATOR = "/mnt/c/Program Files (x86)/parallel-launcher/parallel-launcher.exe"
|
||||
else
|
||||
LOADER = ./$(TOOLS_DIR)/UNFLoader
|
||||
EMULATOR = parallel-launcher
|
||||
endif
|
||||
|
||||
EMU_FLAGS =
|
||||
|
||||
# Adding a txt file to this location will then reference a UNFLoader path specified in the file, instead of locally.
|
||||
# This is expecially important for WSL users because UNFLoader.exe is incredibly slow when run within WSL's filesystem, so this can be used to point to the C drive.
|
||||
# The file should only contain the directory path that contains UNFLoader[.exe] (do not specify the filename).
|
||||
LOADER_DIR_FILE_SPECIFICATION_PATH = ~/.local/share/HackerSM64/UNFLoader-dir.txt
|
||||
LOADER_DIR = ./$(TOOLS_DIR)
|
||||
|
||||
ifneq (,$(wildcard $(LOADER_DIR_FILE_SPECIFICATION_PATH)))
|
||||
LOADER_DIR = $(shell cat $(LOADER_DIR_FILE_SPECIFICATION_PATH))
|
||||
endif
|
||||
ifneq (,$(call find-command,wslview))
|
||||
LOADER_EXEC = $(LOADER_DIR)/UNFLoader.exe
|
||||
else
|
||||
LOADER_EXEC = $(LOADER_DIR)/UNFLoader
|
||||
endif
|
||||
|
||||
SHA1SUM = sha1sum
|
||||
@@ -610,17 +653,17 @@ test-pj64: $(ROM)
|
||||
# someone2639
|
||||
|
||||
# download and extract most recent unfloader build if needed
|
||||
$(LOADER):
|
||||
ifeq (,$(wildcard $(LOADER)))
|
||||
$(LOADER_EXEC):
|
||||
ifeq (,$(wildcard $(LOADER_EXEC)))
|
||||
@$(PRINT) "Downloading latest UNFLoader...$(NO_COL)\n"
|
||||
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(TOOLS_DIR)
|
||||
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(LOADER_DIR)
|
||||
endif
|
||||
|
||||
load: $(ROM) $(LOADER)
|
||||
$(LOADER) -r $<
|
||||
load: $(ROM) $(LOADER_EXEC)
|
||||
$(LOADER_EXEC) -r $<
|
||||
|
||||
unf: $(ROM) $(LOADER)
|
||||
$(LOADER) -d -r $<
|
||||
unf: $(ROM) $(LOADER_EXEC)
|
||||
$(LOADER_EXEC) -d -r $<
|
||||
|
||||
libultra: $(BUILD_DIR)/libultra.a
|
||||
|
||||
@@ -674,8 +717,13 @@ $(BUILD_DIR)/src/usb/usb.o: CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wn
|
||||
$(BUILD_DIR)/src/usb/debug.o: OPT_FLAGS := -O0
|
||||
$(BUILD_DIR)/src/usb/debug.o: CFLAGS += -Wno-unused-parameter -Wno-maybe-uninitialized
|
||||
# File specific opt flags
|
||||
$(BUILD_DIR)/src/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
ifeq ($(SDATA),1)
|
||||
$(BUILD_DIR)/src/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables -ffunction-sections -fdata-sections
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables -ffunction-sections -fdata-sections
|
||||
else
|
||||
$(BUILD_DIR)/src/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
endif
|
||||
|
||||
$(BUILD_DIR)/src/engine/surface_collision.o: OPT_FLAGS := $(COLLISION_OPT_FLAGS)
|
||||
$(BUILD_DIR)/src/engine/math_util.o: OPT_FLAGS := $(MATH_UTIL_OPT_FLAGS)
|
||||
@@ -769,7 +817,7 @@ endif
|
||||
|
||||
$(BUILD_DIR)/%.table: %.aiff
|
||||
$(call print,Extracting codebook:,$<,$@)
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< $@
|
||||
|
||||
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
|
||||
$(call print,Encoding ADPCM:,$(word 2,$^),$@)
|
||||
@@ -857,9 +905,23 @@ ifeq ($(FIXLIGHTS),1)
|
||||
DUMMY != $(PYTHON) $(FIXLIGHTS_PY) actors
|
||||
DUMMY != $(PYTHON) $(FIXLIGHTS_PY) levels
|
||||
endif
|
||||
|
||||
ifeq ($(SDATA),1)
|
||||
$(BUILD_DIR)/src/boot/%.o: src/boot/%.c
|
||||
$(call print,Compiling Boot:,$<,$@)
|
||||
$(V)$(CC) -c -G 0 $(CFLAGS) -MMD -MF $(BUILD_DIR)/src/boot/$*.d -o $@ $<
|
||||
$(BUILD_DIR)/src/%.o: src/%.c
|
||||
$(call print,Compiling:,$<,$@)
|
||||
$(V)$(CC) -c -G 64 $(CFLAGS) -MMD -MF $(BUILD_DIR)/src/$*.d -o $@ $<
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
$(call print,Compiling:,$<,$@)
|
||||
$(V)$(CC) -c -G 0 -fno-zero-initialized-in-bss $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
else
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
$(call print,Compiling:,$<,$@)
|
||||
$(V)$(CC) -c $(CFLAGS) -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
endif
|
||||
|
||||
$(BUILD_DIR)/%.o: %.cpp
|
||||
$(call print,Compiling (C++):,$<,$@)
|
||||
$(V)$(CXX) -c $(CFLAGS) -std=c++17 -Wno-register -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
@@ -913,7 +975,7 @@ $(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
|
||||
# Link SM64 ELF file
|
||||
$(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a
|
||||
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc -lrtc
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc
|
||||
|
||||
# Build ROM
|
||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.2.0
|
||||
v2.3.0
|
||||
|
||||
18
asm/setgp.s
Normal file
18
asm/setgp.s
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifdef SDATA
|
||||
|
||||
// assembler directives
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
glabel setgp
|
||||
lui $gp, %hi(_gp)
|
||||
jr $ra
|
||||
addiu $gp, %lo(_gp)
|
||||
|
||||
#endif
|
||||
@@ -2474,6 +2474,7 @@ static const Vtx vertex_billboard_num[] = {
|
||||
// 0x0200EFF0 - 0x0200F038
|
||||
const Gfx dl_billboard_num_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, (G_TX_WRAP | G_TX_NOMIRROR), G_TX_NOMASK, G_TX_NOLOD, (G_TX_WRAP | G_TX_NOMIRROR), G_TX_NOMASK, G_TX_NOLOD),
|
||||
@@ -2490,6 +2491,7 @@ const Gfx dl_billboard_num_end[] = {
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
|
||||
@@ -2694,7 +2694,7 @@ const BehaviorScript bhvSushiShark[] = {
|
||||
|
||||
const BehaviorScript bhvJrbSlidingBox[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT),
|
||||
LOAD_COLLISION_DATA(jrb_seg7_collision_floating_box),
|
||||
SET_HOME(),
|
||||
BEGIN_LOOP(),
|
||||
@@ -5437,11 +5437,7 @@ const BehaviorScript bhvTTCPendulum[] = {
|
||||
|
||||
const BehaviorScript bhvTTCTreadmill[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
#ifdef PLATFORM_DISPLACEMENT_2
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_VELOCITY_PLATFORM)),
|
||||
#else
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
#endif
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT)),
|
||||
SET_FLOAT(oCollisionDistance, 750),
|
||||
CALL_NATIVE(bhv_ttc_treadmill_init),
|
||||
DELAY(1),
|
||||
|
||||
@@ -177,9 +177,15 @@ def main():
|
||||
# presence of the correct roms automatically
|
||||
|
||||
# Make sure tools exist
|
||||
subprocess.check_call(
|
||||
["make", "-s", "-C", "tools/", "n64graphics", "skyconv", "mio0", "aifc_decode"]
|
||||
)
|
||||
tools = [ "n64graphics", "skyconv", "mio0", "aifc_decode" ]
|
||||
if os.name == 'nt':
|
||||
tools = [tool + ".exe" for tool in tools]
|
||||
make = "mingw32-make"
|
||||
else:
|
||||
make = "make"
|
||||
|
||||
cmd = [make, "-s", "-C", "tools/"] + tools
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
# Go through the assets in roughly alphabetical order (but assets in the same
|
||||
# mio0 file still go together).
|
||||
|
||||
28
fast64.json
Normal file
28
fast64.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"version": 1.0,
|
||||
"autoLoad": true,
|
||||
"microcode": "F3DEX2/LX2",
|
||||
"rdpDefaults": {
|
||||
"geometryMode": {
|
||||
"zBuffer": true,
|
||||
"shade": true,
|
||||
"cullBack": true,
|
||||
"lighting": true,
|
||||
"shadeSmooth": true
|
||||
},
|
||||
"otherModeH": {
|
||||
"textureConvert": "G_TC_FILT",
|
||||
"textureFilter": "G_TF_BILERP",
|
||||
"perspectiveCorrection": "G_TP_PERSP",
|
||||
"pipelineMode": "G_PM_1PRIMITIVE"
|
||||
},
|
||||
"otherModeL": {},
|
||||
"other": {}
|
||||
},
|
||||
"sm64": {
|
||||
"refresh_version": "HackerSM64 2.3.0",
|
||||
"compression_format": "yay0",
|
||||
"force_extended_ram": false,
|
||||
"matstack_fix": true
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,10 @@
|
||||
#include "config/config_objects.h"
|
||||
#include "config/config_rom.h"
|
||||
|
||||
// Local config - include a gitignore'd config file that's specific to just the user (if the file exists)
|
||||
#if __has_include("config/config_local.h")
|
||||
#include "config/config_local.h"
|
||||
#endif
|
||||
|
||||
/* WARNING: Compatibility safeguards - don't remove this file unless you know what you're doing */
|
||||
// WARNING: Compatibility safeguards - don't remove this file unless you know what you're doing
|
||||
#include "config/config_safeguards.h"
|
||||
|
||||
@@ -136,14 +136,8 @@
|
||||
*/
|
||||
#define BUGFIX_DIALOG_TIME_STOP
|
||||
|
||||
/**
|
||||
* Enables Platform Displacement 2, an upgrade to the physics involving moving platforms and how Mario interacts with them.
|
||||
*/
|
||||
#define PLATFORM_DISPLACEMENT_2
|
||||
|
||||
/**
|
||||
* Inertia defines; allow Mario to preserve his momemtum when leaving moving platforms.
|
||||
* These require Platform Displacement 2 to be enabled.
|
||||
*/
|
||||
#define MARIO_INERTIA_UPWARD
|
||||
// #define MARIO_INERTIA_LATERAL
|
||||
|
||||
@@ -103,6 +103,17 @@
|
||||
#define ALIGNED64
|
||||
#endif
|
||||
|
||||
// Assign to a section type.
|
||||
#if defined(SDATA) && defined(__GNUC__)
|
||||
#define SECTION(x) __attribute__((section(x)))
|
||||
#define SECTION_BSS SECTION(".bss")
|
||||
#define SECTION_DATA SECTION(".data")
|
||||
#else
|
||||
#define SECTION(x)
|
||||
#define SECTION_BSS
|
||||
#define SECTION_DATA
|
||||
#endif
|
||||
|
||||
#ifndef ALIGN
|
||||
#define ALIGN(VAL_, ALIGNMENT_) (((VAL_) + ((ALIGNMENT_) - 1)) & ~((ALIGNMENT_) - 1))
|
||||
#endif
|
||||
|
||||
@@ -81,6 +81,20 @@ extern "C" {
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(SDATA) && defined(__GNUC__)
|
||||
extern __attribute__((section(".data"))) s32 osRomType; /* Bulk or cartridge ROM. 0=cartridge 1=bulk */
|
||||
extern __attribute__((section(".data"))) void *osRomBase; /* Rom base address of the game image */
|
||||
extern __attribute__((section(".data"))) s32 osTvType; /* 0 = PAL, 1 = NTSC, 2 = MPAL */
|
||||
extern __attribute__((section(".data"))) s32 osResetType; /* 0 = cold reset, 1 = NMI */
|
||||
extern __attribute__((section(".data"))) s32 osCicId;
|
||||
extern __attribute__((section(".data"))) s32 osVersion;
|
||||
extern __attribute__((section(".data"))) u32 osMemSize; /* Memory Size */
|
||||
extern s32 osAppNMIBuffer[];
|
||||
|
||||
extern __attribute__((section(".data"))) u64 osClockRate;
|
||||
|
||||
extern __attribute__((section(".data"))) OSIntMask __OSGlobalIntMask; /* global interrupt mask */
|
||||
#else
|
||||
extern s32 osRomType; /* Bulk or cartridge ROM. 0=cartridge 1=bulk */
|
||||
extern void *osRomBase; /* Rom base address of the game image */
|
||||
extern s32 osTvType; /* 0 = PAL, 1 = NTSC, 2 = MPAL */
|
||||
@@ -93,6 +107,7 @@ extern s32 osAppNMIBuffer[];
|
||||
extern u64 osClockRate;
|
||||
|
||||
extern OSIntMask __OSGlobalIntMask; /* global interrupt mask */
|
||||
#endif
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
||||
@@ -47,7 +47,7 @@ enum ObjFlags {
|
||||
OBJ_FLAG_1000 = (1 << 12), // 0x00001000
|
||||
OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO = (1 << 13), // 0x00002000
|
||||
OBJ_FLAG_PERSISTENT_RESPAWN = (1 << 14), // 0x00004000
|
||||
OBJ_FLAG_VELOCITY_PLATFORM = (1 << 15), // 0x00008000
|
||||
OBJ_FLAG_NO_AUTO_DISPLACEMENT = (1 << 15), // 0x00008000
|
||||
OBJ_FLAG_DONT_CALC_COLL_DIST = (1 << 16), // 0x00010000
|
||||
OBJ_FLAG_SILHOUETTE = (1 << 19), // 0x00080000
|
||||
OBJ_FLAG_OCCLUDE_SILHOUETTE = (1 << 20), // 0x00100000
|
||||
|
||||
@@ -53,10 +53,13 @@ DECLARE_SEGMENT(assets)
|
||||
extern u8 _goddardSegmentStart[];
|
||||
extern u8 _goddardSegmentEnd[];
|
||||
extern u8 _engineSegmentStart[];
|
||||
extern u8 _engineSegmentEnd[];
|
||||
extern u8 _engineSegmentBssStart[];
|
||||
extern u8 _engineSegmentBssEnd[];
|
||||
extern u8 _mainSegmentStart[];
|
||||
extern u8 _mainSegmentEnd[];
|
||||
extern u8 _engineSegmentEnd[];
|
||||
extern u8 _mainSegmentBssStart[];
|
||||
extern u8 _mainSegmentBssEnd[];
|
||||
extern u8 _framebuffersSegmentBssStart[];
|
||||
extern u8 _framebuffersSegmentBssEnd[];
|
||||
extern u8 _zbufferSegmentBssStart[];
|
||||
@@ -64,6 +67,16 @@ extern u8 _zbufferSegmentBssEnd[];
|
||||
extern u8 _buffersSegmentBssStart[];
|
||||
extern u8 _buffersSegmentBssEnd[];
|
||||
|
||||
#ifdef SDATA
|
||||
extern u8 _sbssSegmentBssStart[];
|
||||
extern u8 _sbssSegmentBssEnd[];
|
||||
extern u8 _sdataSegmentStart[];
|
||||
extern u8 _sdataSegmentEnd[];
|
||||
extern u8 _sdataSegmentRomStart[];
|
||||
extern u8 _sdataSegmentRomEnd[];
|
||||
extern u8 _gp[];
|
||||
#endif
|
||||
|
||||
DECLARE_LEVEL_SEGMENT(menu)
|
||||
DECLARE_LEVEL_SEGMENT(intro)
|
||||
DECLARE_LEVEL_SEGMENT(ending)
|
||||
|
||||
@@ -36,15 +36,27 @@ enum SoundBank {
|
||||
SOUND_BANK_MENU,
|
||||
SOUND_BANK_GENERAL2,
|
||||
SOUND_BANK_OBJ2,
|
||||
SOUND_BANK_CUSTOM_FOREGROUND_1,
|
||||
SOUND_BANK_CUSTOM_FOREGROUND_2,
|
||||
SOUND_BANK_CUSTOM_FOREGROUND_3,
|
||||
SOUND_BANK_CUSTOM_BACKGROUND_1,
|
||||
SOUND_BANK_CUSTOM_BACKGROUND_2,
|
||||
SOUND_BANK_CUSTOM_BACKGROUND_3,
|
||||
|
||||
SOUND_BANK_COUNT
|
||||
};
|
||||
|
||||
#define SOUND_BANKS_ALL_BITS 0xffff
|
||||
#define SOUND_BANKS_ALL ((1 << SOUND_BANK_COUNT) - 1)
|
||||
|
||||
#define SOUND_BANKS_FOREGROUND (\
|
||||
(1 << SOUND_BANK_ACTION) |\
|
||||
(1 << SOUND_BANK_VOICE) |\
|
||||
(1 << SOUND_BANK_MENU))
|
||||
(1 << SOUND_BANK_MENU) |\
|
||||
(1 << SOUND_BANK_CUSTOM_FOREGROUND_1) |\
|
||||
(1 << SOUND_BANK_CUSTOM_FOREGROUND_2) |\
|
||||
(1 << SOUND_BANK_CUSTOM_FOREGROUND_3))
|
||||
|
||||
#define SOUND_BANKS_BACKGROUND (SOUND_BANKS_ALL & ~SOUND_BANKS_FOREGROUND)
|
||||
#define SOUND_BANKS_DISABLED_DURING_INTRO_CUTSCENE (\
|
||||
(1 << SOUND_BANK_ENV) |\
|
||||
@@ -589,4 +601,6 @@ enum SoundBank {
|
||||
#define SOUND_OBJ2_BOSS_DIALOG_GRUNT /* 0x90694081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x69, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_MRI_SPINNING /* 0x906B0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x6B, 0x00, SOUND_DISCRETE)
|
||||
|
||||
// Add defines for sounds using extra custom banks here!
|
||||
|
||||
#endif // SOUNDS_H
|
||||
|
||||
Submodule lib/libpl updated: cfc74e5898...f03352e5a2
BIN
lib/librtc.a
BIN
lib/librtc.a
Binary file not shown.
82
sm64.ld
82
sm64.ld
@@ -53,10 +53,10 @@ OUTPUT_ARCH (mips)
|
||||
END_SEG(name##_segment_7) \
|
||||
BEGIN_SEG(name, 0x0E000000) \
|
||||
{ \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.*data*)); \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.data*)); \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.text*)); \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.rodata*)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.*data*)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.data*)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.text*)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.rodata*)); \
|
||||
} \
|
||||
@@ -77,7 +77,7 @@ OUTPUT_ARCH (mips)
|
||||
END_SEG(name##_yay0) \
|
||||
BEGIN_SEG(name##_geo, geoAddr) \
|
||||
{ \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.*data*)); \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.data*)); \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.rodata*)); \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.text*)); \
|
||||
} \
|
||||
@@ -157,6 +157,7 @@ SECTIONS
|
||||
{
|
||||
KEEP(BUILD_DIR/asm/entry.o(.text*));
|
||||
KEEP(BUILD_DIR/asm/n64_assert.o(.text*));
|
||||
KEEP(BUILD_DIR/asm/setgp.o(.text*));
|
||||
#ifdef EEP
|
||||
KEEP(BUILD_DIR/asm/vc_bin.o(.text*));
|
||||
#endif
|
||||
@@ -175,10 +176,9 @@ SECTIONS
|
||||
#ifdef LIBPL
|
||||
BUILD_DIR/lib/libpl*.o(.text*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.text*);
|
||||
*ULTRALIB.a:*.o(.text*);
|
||||
*/libnustd.a:*.o(.text*);
|
||||
*/libgcc.a:*.o(.text*);
|
||||
*/librtc.a:*.o(.text*);
|
||||
*libgcc.a:*.o(.text*);
|
||||
*/libz.a:*.o(.text*);
|
||||
*/libhvqm2.a:*.o(.text*);
|
||||
lib/rspboot.o(.text*);
|
||||
@@ -189,18 +189,17 @@ SECTIONS
|
||||
_mainSegmentTextEnd = .;
|
||||
|
||||
/* data */
|
||||
BUILD_DIR/asm/n64_assert.o(.*data*);
|
||||
BUILD_DIR/src/boot*.o(.*data*);
|
||||
BUILD_DIR/src/audio*.o(.*data*);
|
||||
BUILD_DIR/asm/n64_assert.o(.data*);
|
||||
BUILD_DIR/src/boot*.o(.data*);
|
||||
BUILD_DIR/src/audio*.o(.data*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
BUILD_DIR/src/s2d_engine*.o(.*data*);
|
||||
BUILD_DIR/src/s2d_engine*.o(.data*);
|
||||
#endif
|
||||
#ifdef LIBPL
|
||||
BUILD_DIR/lib/libpl*.o(.*data*);
|
||||
BUILD_DIR/lib/libpl*.o(.data*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.data*);
|
||||
*ULTRALIB.a:*.o(.data*);
|
||||
*/libhvqm2.a:*.o(.data*);
|
||||
*/librtc.a:*.o(.data*);
|
||||
*/libz.a:*.o(.data*);
|
||||
#include "rspdata.inc.ld"
|
||||
BUILD_DIR/lib/aspMain.o(.data*);
|
||||
@@ -217,9 +216,8 @@ SECTIONS
|
||||
#ifdef LIBPL
|
||||
BUILD_DIR/lib/libpl*.o(.rodata*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.rodata*);
|
||||
*/libgcc.a:*.o(.rodata*);
|
||||
*/librtc.a:*.o(.rodata*);
|
||||
*ULTRALIB.a:*.o(.rodata*);
|
||||
*libgcc.a:*.o(.rodata*);
|
||||
*/libz.a:*.o(.rodata*);
|
||||
|
||||
lib/PR/hvqm/hvqm2sp1.o(.rodata*);
|
||||
@@ -227,21 +225,20 @@ SECTIONS
|
||||
END_SEG(main)
|
||||
BEGIN_NOLOAD(main)
|
||||
{
|
||||
BUILD_DIR/src/boot*.o(.*bss*);
|
||||
BUILD_DIR/src/hvqm*.o(.*bss*);
|
||||
BUILD_DIR/src/usb*.o(.*bss*);
|
||||
BUILD_DIR/src/audio*.o(.*bss*);
|
||||
BUILD_DIR/src/boot*.o(.bss*);
|
||||
BUILD_DIR/src/hvqm*.o(.bss*);
|
||||
BUILD_DIR/src/usb*.o(.bss*);
|
||||
BUILD_DIR/src/audio*.o(.bss*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
BUILD_DIR/src/s2d_engine*.o(.*bss*);
|
||||
BUILD_DIR/src/s2d_engine*.o(.bss*);
|
||||
#endif
|
||||
#ifdef LIBPL
|
||||
BUILD_DIR/lib/libpl*.o(.*bss*);
|
||||
BUILD_DIR/lib/libpl*.o(.bss*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(COMMON);
|
||||
*/ULTRALIB.a:*.o(.scommon);
|
||||
*/ULTRALIB.a:*.o(.*bss*);
|
||||
*ULTRALIB.a:*.o(COMMON);
|
||||
*ULTRALIB.a:*.o(.scommon);
|
||||
*ULTRALIB.a:*.o(.bss*);
|
||||
*/libhvqm2.a:*.o(.bss*);
|
||||
*/librtc.a:*.o(.bss*);
|
||||
*/libz.a:*.o(.bss*);
|
||||
. = ALIGN(0x8);
|
||||
}
|
||||
@@ -267,10 +264,6 @@ SECTIONS
|
||||
BUILD_DIR/src/game*.o(.data*);
|
||||
BUILD_DIR/src/engine*.o(.data*);
|
||||
BUILD_DIR/src/usb*.o(.data*);
|
||||
/* sdata */
|
||||
BUILD_DIR/src/game*.o(.sdata*);
|
||||
BUILD_DIR/src/engine*.o(.sdata*);
|
||||
BUILD_DIR/src/usb*.o(.data*);
|
||||
/* rodata */
|
||||
BUILD_DIR/src/game*.o(.rodata*);
|
||||
BUILD_DIR/src/engine*.o(.rodata*);
|
||||
@@ -280,13 +273,36 @@ SECTIONS
|
||||
END_SEG(engine)
|
||||
BEGIN_NOLOAD(engine)
|
||||
{
|
||||
BUILD_DIR/src/game*.o(.*bss*);
|
||||
BUILD_DIR/src/game*.o(.bss*);
|
||||
BUILD_DIR/src/engine*.o(.bss*);
|
||||
. = ALIGN(0x40);
|
||||
}
|
||||
END_NOLOAD(engine)
|
||||
|
||||
. = _engineSegmentBssEnd;
|
||||
#ifdef SDATA
|
||||
_gp = . + 0x8000;
|
||||
BEGIN_SEG(sdata, .)
|
||||
{
|
||||
BUILD_DIR/src/game*.o(.sdata*);
|
||||
BUILD_DIR/src/audio*.o(.sdata*);
|
||||
BUILD_DIR/src/engine*.o(.sdata*);
|
||||
BUILD_DIR/src/usb*.o(.sdata*);
|
||||
BUILD_DIR/src/menu*.o(.sdata*);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(sdata)
|
||||
BEGIN_NOLOAD(sbss)
|
||||
{
|
||||
BUILD_DIR/src/game*.o(.sbss*);
|
||||
BUILD_DIR/src/audio*.o(.sbss*);
|
||||
BUILD_DIR/src/engine*.o(.sbss*);
|
||||
BUILD_DIR/src/usb*.o(.sbss*);
|
||||
BUILD_DIR/src/menu*.o(.sbss*);
|
||||
. = ALIGN(0x40);
|
||||
}
|
||||
END_NOLOAD(sbss)
|
||||
#endif
|
||||
|
||||
BEGIN_NOLOAD(framebuffers)
|
||||
{
|
||||
BUILD_DIR/src/buffers/framebuffers.o(.bss*);
|
||||
@@ -413,7 +429,7 @@ SECTIONS
|
||||
/* 0x268020 0x268020-0 [0] */
|
||||
BEGIN_SEG(intro, 0x14000000)
|
||||
{
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.*data));
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.data*));
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.rodata*));
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.text*));
|
||||
KEEP(BUILD_DIR/levels/intro/geo.o(.data*));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user