You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
230 Commits
develop/2.
...
develop/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87c634b3cb | ||
|
|
3cae3580c1 | ||
|
|
64b2e2d855 | ||
|
|
05b5b91674 | ||
|
|
e53e6d25a0 | ||
|
|
3a24ce70cb | ||
|
|
93c2bd12d1 | ||
|
|
48f15f2fcc | ||
|
|
889d7aabdb | ||
|
|
83efeffeee | ||
|
|
8be4beddc4 | ||
|
|
0e2d170798 | ||
|
|
0a0950b471 | ||
|
|
19ce4c0834 | ||
|
|
5ba2c31d18 | ||
|
|
76d41a03b6 | ||
|
|
ee38bd51ca | ||
|
|
8f61244f57 | ||
|
|
64e07e086a | ||
|
|
32c16846b2 | ||
|
|
dc0b97a65f | ||
|
|
567fbf2957 | ||
|
|
6a5cf577c2 | ||
|
|
daa429fa32 | ||
|
|
dbcaba5815 | ||
|
|
2f80e3eb99 | ||
|
|
c06431b040 | ||
|
|
ac96010c70 | ||
|
|
baac7073fd | ||
|
|
c880c4fab5 | ||
|
|
fb5c68f14f | ||
|
|
1351c41196 | ||
|
|
b05b92e035 | ||
|
|
58c93a0c25 | ||
|
|
519747d1a4 | ||
|
|
c091960a9b | ||
|
|
371296f94a | ||
|
|
b19f24e605 | ||
|
|
55fd98b253 | ||
|
|
0cab016a0f | ||
|
|
a6aab07352 | ||
|
|
ffb663006f | ||
|
|
8583d10bd6 | ||
|
|
65eba3548a | ||
|
|
1798c72dd4 | ||
|
|
ad1c9e9c70 | ||
|
|
30865abfaf | ||
|
|
d12881298e | ||
|
|
0767c76425 | ||
|
|
59acce3da8 | ||
|
|
9ab67e6ebf | ||
|
|
deb53bc973 | ||
|
|
9089607f9e | ||
|
|
9e6d027620 | ||
|
|
86b0966e5d | ||
|
|
ba420d4028 | ||
|
|
6cc1975127 | ||
|
|
00e5dd6da0 | ||
|
|
b3a4eda167 | ||
|
|
4fb3c843cd | ||
|
|
42c52817c2 | ||
|
|
3c29d9806e | ||
|
|
bfebadc244 | ||
|
|
d3708ebd94 | ||
|
|
f1c2c94c93 | ||
|
|
ebb5253de8 | ||
|
|
8afd5122ea | ||
|
|
369ef6734c | ||
|
|
f93d47b7ba | ||
|
|
338eee167c | ||
|
|
5dc044590d | ||
|
|
4d79f57f68 | ||
|
|
7dfa6a90d4 | ||
|
|
0dbf0fbb32 | ||
|
|
126253f954 | ||
|
|
650654d033 | ||
|
|
6d3a2eeb2d | ||
|
|
47e0f25a15 | ||
|
|
d8b9bb73e6 | ||
|
|
1bf7a6cb47 | ||
|
|
ad90eba00a | ||
|
|
9b3e5f971e | ||
|
|
cb9ced8abe | ||
|
|
13a81ebdea | ||
|
|
9b903d42d5 | ||
|
|
4b3f9e8ec0 | ||
|
|
8b4cd14cb6 | ||
|
|
15e5a17fca | ||
|
|
ec880fb46b | ||
|
|
482405db67 | ||
|
|
8314034280 | ||
|
|
7e7813f2bc | ||
|
|
947fc5d2ea | ||
|
|
ed5f628486 | ||
|
|
1c8db3d9ae | ||
|
|
b531611f13 | ||
|
|
983612df1b | ||
|
|
73b7a61bde | ||
|
|
fc977ed3e0 | ||
|
|
8b861a2d3f | ||
|
|
cfd87e0ad5 | ||
|
|
6b95114c03 | ||
|
|
ec6bda79aa | ||
|
|
82f0da7d2e | ||
|
|
59dc86234d | ||
|
|
bba724e6f8 | ||
|
|
bc6c42e366 | ||
|
|
69055c9401 | ||
|
|
3ecadf796b | ||
|
|
9894152534 | ||
|
|
f1642d58af | ||
|
|
bfd3e59290 | ||
|
|
3220d74b0d | ||
|
|
b38bce56d7 | ||
|
|
1f5e7512b6 | ||
|
|
bb8a5f3987 | ||
|
|
8b1f359555 | ||
|
|
6a1f78d284 | ||
|
|
7f3d6ace49 | ||
|
|
4c853afb87 | ||
|
|
d3eed5d5f7 | ||
|
|
ea628dd113 | ||
|
|
fe02f58004 | ||
|
|
2d6bf908f7 | ||
|
|
e8fc703fd0 | ||
|
|
ea72987c43 | ||
|
|
92f3a7d2ba | ||
|
|
da66b48f7d | ||
|
|
f821dbfce5 | ||
|
|
e27e0d61f1 | ||
|
|
30ac33ae61 | ||
|
|
cef1be2d40 | ||
|
|
c509e8253d | ||
|
|
d8fb2f668c | ||
|
|
fd345e9908 | ||
|
|
7a94b73be2 | ||
|
|
8c56cd6654 | ||
|
|
93c5fea323 | ||
|
|
3fe898cc41 | ||
|
|
cf1d9f06e4 | ||
|
|
c06d960572 | ||
|
|
ec7d8c3eec | ||
|
|
9b83166ca7 | ||
|
|
4313cef92d | ||
|
|
1a2254fad7 | ||
|
|
c588c13c44 | ||
|
|
b1acbc234f | ||
|
|
7e8ecb0ebb | ||
|
|
43a6d84786 | ||
|
|
1ddd3aa2b8 | ||
|
|
b4bc5a9d1a | ||
|
|
17e05f89e1 | ||
|
|
2f967d5797 | ||
|
|
e46dff54f4 | ||
|
|
9540005838 | ||
|
|
84e5576e3d | ||
|
|
3afad8da04 | ||
|
|
995bc74e19 | ||
|
|
5a7b919729 | ||
|
|
2017928237 | ||
|
|
4567dd9a77 | ||
|
|
782a0afd9e | ||
|
|
1defcd176f | ||
|
|
7aceb9c08e | ||
|
|
ddf0642ef4 | ||
|
|
ec4c78298a | ||
|
|
cbd1054230 | ||
|
|
ba7fb77587 | ||
|
|
b88afce952 | ||
|
|
5666ffac16 | ||
|
|
08ad5a8908 | ||
|
|
116e249c91 | ||
|
|
54a3e39f75 | ||
|
|
d6b4e57166 | ||
|
|
5516d041ab | ||
|
|
8a371bfdbb | ||
|
|
a6ea957eac | ||
|
|
8a803d8455 | ||
|
|
71b064e847 | ||
|
|
addeae8680 | ||
|
|
d95933bde0 | ||
|
|
b2ce18639a | ||
|
|
23b58dc989 | ||
|
|
12ed8686ac | ||
|
|
dd2ee3508b | ||
|
|
ab9a19c509 | ||
|
|
9a0605fee4 | ||
|
|
500a629c6f | ||
|
|
59231305e6 | ||
|
|
0701b54570 | ||
|
|
ab31650de1 | ||
|
|
c7b80e9abd | ||
|
|
4b7d0daa47 | ||
|
|
764833a2bc | ||
|
|
b46061d6a2 | ||
|
|
f12bd61f05 | ||
|
|
a9ef064935 | ||
|
|
d6d9142425 | ||
|
|
5470095a78 | ||
|
|
6697e9498c | ||
|
|
975070f5a2 | ||
|
|
95c007f23b | ||
|
|
db050377e7 | ||
|
|
e60fa6261f | ||
|
|
0954af0cf4 | ||
|
|
d0e9c8f597 | ||
|
|
25b128db7c | ||
|
|
bf8f170b8c | ||
|
|
387c6c3954 | ||
|
|
0c5eadcb99 | ||
|
|
9af5a968dc | ||
|
|
aa730a6231 | ||
|
|
1157bbf582 | ||
|
|
6a14b81798 | ||
|
|
fb100373de | ||
|
|
7cf6573b0d | ||
|
|
038a4ecbff | ||
|
|
2615ddb8f0 | ||
|
|
1703041a61 | ||
|
|
0cf12b263a | ||
|
|
af81838da2 | ||
|
|
614788ba5a | ||
|
|
c0d15634e9 | ||
|
|
ff81ccb0a9 | ||
|
|
b5e22a1019 | ||
|
|
c17510cb4c | ||
|
|
3b2ea062d0 | ||
|
|
f273539077 | ||
|
|
6fec1b6fa6 | ||
|
|
efd0bf40c9 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2149,6 +2149,3 @@ 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,8 +27,7 @@
|
||||
"F3DEX_GBI_2=1",
|
||||
"F3DZEX_NON_GBI_2=1",
|
||||
"F3DEX_GBI_SHARED=1",
|
||||
"LIBPL=1",
|
||||
"SDATA=1"
|
||||
"LIBPL=1"
|
||||
],
|
||||
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
|
||||
"cStandard": "gnu17",
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
# 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 @gheskett @arthurtilly
|
||||
* @Reonu
|
||||
* @thecozies
|
||||
* @gheskett
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
# So if a pull request only touches javascript files, only these owners
|
||||
|
||||
104
Makefile
104
Makefile
@@ -265,20 +265,11 @@ 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 ?= yay0
|
||||
COMPRESS ?= rnc1
|
||||
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
|
||||
ifeq ($(COMPRESS),gzip)
|
||||
DEFINES += GZIP=1
|
||||
@@ -408,9 +399,6 @@ 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/*)
|
||||
@@ -453,12 +441,8 @@ 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
|
||||
@@ -475,10 +459,6 @@ 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++
|
||||
@@ -519,25 +499,17 @@ C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
|
||||
DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
|
||||
|
||||
# C compiler options
|
||||
CFLAGS = $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS)
|
||||
CFLAGS = -G 0 $(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-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces
|
||||
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 ifeq ($(COMPILER),clang)
|
||||
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
|
||||
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
|
||||
else
|
||||
CFLAGS += -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -signed -32
|
||||
endif
|
||||
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
|
||||
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
|
||||
|
||||
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
|
||||
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
|
||||
@@ -576,28 +548,13 @@ ifneq (,$(call find-command,armips))
|
||||
else
|
||||
RSPASM := $(TOOLS_DIR)/armips
|
||||
endif
|
||||
|
||||
ifneq (,$(call find-command,wslview))
|
||||
EMULATOR = "/mnt/c/Program Files (x86)/parallel-launcher/parallel-launcher.exe"
|
||||
else
|
||||
EMULATOR = parallel-launcher
|
||||
endif
|
||||
|
||||
EMULATOR = mupen64plus
|
||||
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
|
||||
LOADER = ./$(TOOLS_DIR)/UNFLoader.exe
|
||||
else
|
||||
LOADER_EXEC = $(LOADER_DIR)/UNFLoader
|
||||
LOADER = ./$(TOOLS_DIR)/UNFLoader
|
||||
endif
|
||||
|
||||
SHA1SUM = sha1sum
|
||||
@@ -653,17 +610,17 @@ test-pj64: $(ROM)
|
||||
# someone2639
|
||||
|
||||
# download and extract most recent unfloader build if needed
|
||||
$(LOADER_EXEC):
|
||||
ifeq (,$(wildcard $(LOADER_EXEC)))
|
||||
$(LOADER):
|
||||
ifeq (,$(wildcard $(LOADER)))
|
||||
@$(PRINT) "Downloading latest UNFLoader...$(NO_COL)\n"
|
||||
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(LOADER_DIR)
|
||||
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(TOOLS_DIR)
|
||||
endif
|
||||
|
||||
load: $(ROM) $(LOADER_EXEC)
|
||||
$(LOADER_EXEC) -r $<
|
||||
load: $(ROM) $(LOADER)
|
||||
$(LOADER) -r $<
|
||||
|
||||
unf: $(ROM) $(LOADER_EXEC)
|
||||
$(LOADER_EXEC) -d -r $<
|
||||
unf: $(ROM) $(LOADER)
|
||||
$(LOADER) -d -r $<
|
||||
|
||||
libultra: $(BUILD_DIR)/libultra.a
|
||||
|
||||
@@ -717,13 +674,8 @@ $(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
|
||||
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/audio/heap.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -Os -fno-jump-tables
|
||||
|
||||
$(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)
|
||||
@@ -817,7 +769,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,$^),$@)
|
||||
@@ -905,23 +857,9 @@ 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 $@ $<
|
||||
@@ -975,7 +913,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
|
||||
$(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
|
||||
|
||||
# Build ROM
|
||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||
|
||||
@@ -21,7 +21,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- **Fazana**: PuppyLib, ucode swapping, audio load time optimisations (with Arctic), general hacker qol improvements, visual debug
|
||||
- **Reonu**: Starting the project/repo, widescreen, reonucam, various defines for hacker QoL
|
||||
- **JoshDuMan**: Decomp guy, general assistance
|
||||
- **Arceveti**: Silhouette, shadow optimisation, better hanging, breath meter, 4 controller support
|
||||
- **Arceveti**: Silhouette, various optimizations including shadows, implementation of better wall collision, better hanging, breath meter, 4 controller support, major input refactoring, controller reassignment, controller icons, alternate rumble graphics
|
||||
- **axollyon**: Console testing, bugfixes, idea-guying, and had a hand in silhouettes
|
||||
- **Wiseguy**: World scale reimplementation, silhouette, graph node optimisations, instant input patch, cake screen fix, segmented code support, and various optimizations/fixes
|
||||
- **Kaze**: Graph node optimisations, automatic optimal collision distance
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.3.0
|
||||
v2.2.0
|
||||
|
||||
18
asm/setgp.s
18
asm/setgp.s
@@ -1,18 +0,0 @@
|
||||
#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
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "types.h"
|
||||
#include "game/ingame_menu.h"
|
||||
#include "game/puppyprint.h"
|
||||
#include "game/segment2.h"
|
||||
|
||||
#include "make_const_nonconst.h"
|
||||
|
||||
@@ -2474,7 +2475,6 @@ 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),
|
||||
@@ -2491,7 +2491,6 @@ 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(),
|
||||
@@ -2671,7 +2670,7 @@ ALIGNED8 static const Texture texture_shadow_quarter_square[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
UNUSED ALIGNED8 static const Texture texture_radial_light[] = {
|
||||
UNUSED ALIGNED8 const Texture texture_radial_light[] = {
|
||||
#include "textures/segment2/light_quarter_circle.ia16.inc.c"
|
||||
};
|
||||
|
||||
@@ -2970,7 +2969,8 @@ const Gfx dl_ia8_up_arrow_end[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x02014958 - 0x02014960
|
||||
#include "segment2/controllers.c.in"
|
||||
#include "segment2/rumble_pak.c.in"
|
||||
|
||||
// 0x02014970 - 0x020149A8
|
||||
const Gfx dl_paintings_rippling_begin[] = {
|
||||
|
||||
55
bin/segment2/controllers.c.in
Normal file
55
bin/segment2/controllers.c.in
Normal file
@@ -0,0 +1,55 @@
|
||||
#ifdef ENABLE_STATUS_REPOLLING_GUI
|
||||
|
||||
ALIGNED8 const Texture texture_controller_port[] = {
|
||||
#include "textures/segment2/controller_port.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_unknown[] = {
|
||||
#include "textures/segment2/controller_unknown.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_n64_normal[] = {
|
||||
#include "textures/segment2/controller_n64_normal.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_n64_mouse[] = {
|
||||
#include "textures/segment2/controller_n64_mouse.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_n64_voice[] = {
|
||||
#include "textures/segment2/controller_n64_voice.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_n64_keyboard[] = {
|
||||
#include "textures/segment2/controller_n64_keyboard.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gba[] = {
|
||||
#include "textures/segment2/controller_gba.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_normal[] = {
|
||||
#include "textures/segment2/controller_gcn_normal.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_receiver[] = {
|
||||
#include "textures/segment2/controller_gcn_receiver.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_wavebird[] = {
|
||||
#include "textures/segment2/controller_gcn_wavebird.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_wheel[] = {
|
||||
#include "textures/segment2/controller_gcn_wheel.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_keyboard[] = {
|
||||
#include "textures/segment2/controller_gcn_keyboard.rgba16.inc.c"
|
||||
};
|
||||
|
||||
ALIGNED8 const Texture texture_controller_gcn_dancepad[] = {
|
||||
#include "textures/segment2/controller_gcn_dancepad.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#endif // ENABLE_STATUS_REPOLLING_GUI
|
||||
40
bin/segment2/rumble_pak.c.in
Normal file
40
bin/segment2/rumble_pak.c.in
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifdef ENABLE_RUMBLE
|
||||
|
||||
//! TODO: Move rumble pak graphic textures to src/menu/intro_geo.c once build order is fixed.
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_en[] = {
|
||||
#include "textures/segment2/rumble_pak_en.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#if MULTILANG //! TODO: Use these after ASCII/multilang is merged.
|
||||
|
||||
#ifdef ENABLE_FRENCH
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_fr[] = {
|
||||
#include "textures/segment2/rumble_pak_fr.rgba16.inc.c"
|
||||
};
|
||||
#endif // ENABLE_FRENCH
|
||||
|
||||
#ifdef ENABLE_GERMAN
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_de[] = {
|
||||
#include "textures/segment2/rumble_pak_de.rgba16.inc.c"
|
||||
};
|
||||
#endif // ENABLE_GERMAN
|
||||
|
||||
#ifdef ENABLE_JAPANESE
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_jp[] = {
|
||||
#include "textures/segment2/rumble_pak_jp.rgba16.inc.c"
|
||||
};
|
||||
#endif // ENABLE_JAPANESE
|
||||
|
||||
#if defined(ENABLE_SPANISH_SPAIN) || defined(ENABLE_SPANISH_LATIN_AMERICA)
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_es[] = {
|
||||
#include "textures/segment2/rumble_pak_es.rgba16.inc.c"
|
||||
};
|
||||
#endif // (ENABLE_SPANISH_SPAIN || ENABLE_SPANISH_LATIN_AMERICA)
|
||||
|
||||
#endif // MULTILANG
|
||||
|
||||
ALIGNED8 const Texture title_texture_rumble_pak_controller[] = {
|
||||
#include "textures/segment2/rumble_pak_controller.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#endif // ENABLE_RUMBLE
|
||||
@@ -121,8 +121,6 @@ const Texture *const game_over_texture_table[] = {
|
||||
title_texture_game_over_0, title_texture_game_over_1, title_texture_game_over_2, title_texture_game_over_3,
|
||||
};
|
||||
|
||||
UNUSED static const u64 title_screen_bg_unused_0 = 0;
|
||||
|
||||
#ifdef GODDARD_EASTER_EGG
|
||||
const Gfx title_screen_bg_dl_face_easter_egg_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
@@ -142,27 +140,3 @@ const Gfx title_screen_bg_dl_face_easter_egg_end[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
// Not part of segment2, but define still covers same use case
|
||||
#if (defined(COMPLETE_EN_US_SEGMENT2) && ENABLE_RUMBLE)
|
||||
ALIGNED8 static const Texture title_texture_rumble_pak[] = {
|
||||
#include "textures/title_screen_bg/title_screen_bg.06648.rgba16.inc.c"
|
||||
};
|
||||
|
||||
const Gfx title_screen_bg_dl_rumble_pak[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCycleType(G_CYC_COPY),
|
||||
gsDPSetTexturePersp(G_TP_NONE),
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2),
|
||||
gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, 319, 239),
|
||||
gsDPLoadTextureTile(title_texture_rumble_pak, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 0, 0, 0, 79, 23, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 7, 5, G_TX_NOLOD, G_TX_NOLOD),
|
||||
gsSPTextureRectangle(220 << 2, 200 << 2, 299 << 2, 223 << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
gsDPSetTexturePersp(G_TP_PERSP),
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -2694,7 +2694,7 @@ const BehaviorScript bhvSushiShark[] = {
|
||||
|
||||
const BehaviorScript bhvJrbSlidingBox[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
|
||||
LOAD_COLLISION_DATA(jrb_seg7_collision_floating_box),
|
||||
SET_HOME(),
|
||||
BEGIN_LOOP(),
|
||||
@@ -5437,7 +5437,11 @@ const BehaviorScript bhvTTCPendulum[] = {
|
||||
|
||||
const BehaviorScript bhvTTCTreadmill[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT)),
|
||||
#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
|
||||
SET_FLOAT(oCollisionDistance, 750),
|
||||
CALL_NATIVE(bhv_ttc_treadmill_init),
|
||||
DELAY(1),
|
||||
|
||||
@@ -177,15 +177,9 @@ def main():
|
||||
# presence of the correct roms automatically
|
||||
|
||||
# Make sure tools exist
|
||||
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)
|
||||
subprocess.check_call(
|
||||
["make", "-s", "-C", "tools/", "n64graphics", "skyconv", "mio0", "aifc_decode"]
|
||||
)
|
||||
|
||||
# Go through the assets in roughly alphabetical order (but assets in the same
|
||||
# mio0 file still go together).
|
||||
|
||||
28
fast64.json
28
fast64.json
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"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,10 +19,6 @@
|
||||
#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"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/**
|
||||
* Enables Goddard (the Mario head).
|
||||
*/
|
||||
// #define KEEP_MARIO_HEAD
|
||||
#define KEEP_MARIO_HEAD
|
||||
|
||||
/**
|
||||
* Enables the Goddard easter egg from Shindou (has no effect if KEEP_MARIO_HEAD is disabled).
|
||||
|
||||
@@ -136,8 +136,14 @@
|
||||
*/
|
||||
#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
|
||||
|
||||
@@ -19,23 +19,45 @@
|
||||
|
||||
/**
|
||||
* Enables Rumble Pak Support.
|
||||
* Currently not recommended, as it may cause random crashes.
|
||||
*/
|
||||
// #define ENABLE_RUMBLE (1 || VERSION_SH)
|
||||
#define ENABLE_RUMBLE
|
||||
|
||||
/**
|
||||
* The maximum number of supported players/controllers. 1-4.
|
||||
* This will save performance if the player has extra unused controllers plugged in.
|
||||
* NOTE: Default is 2, maximum is 4.
|
||||
* NOTE: This needs to be at least 2 for now for gamecube controller swap to work.
|
||||
* NOTE: Default is 1, maximum is 4.
|
||||
* NOTE: If this is 1, the first controller with input after boot will become player 1. Otherwise, player numbers are automatically assigned via port order.
|
||||
* NOTE: It is highly recommended to enable ENABLE_STATUS_REPOLLING_GUI if this is greater than 1.
|
||||
*/
|
||||
#define MAX_NUM_PLAYERS 2
|
||||
#define MAX_NUM_PLAYERS 1
|
||||
|
||||
/**
|
||||
* Enables a GUI that, while opem, allows plugging/unplugging controllers and changing the controller order.
|
||||
* Triggered by unplugging any active controller.
|
||||
*/
|
||||
#define ENABLE_STATUS_REPOLLING_GUI
|
||||
|
||||
/**
|
||||
* Allows the player to use the button combo defined in input.h to trigger status repolling at any time during gameplay.
|
||||
*/
|
||||
#define ENABLE_STATUS_REPOLLING_COMBO_IN_GAMEPLAY
|
||||
|
||||
/**
|
||||
* Highlights the currently pressed buttons on controllers in the status repolling GUI.
|
||||
*/
|
||||
#define CONTROLLERS_INPUT_DISPLAY
|
||||
|
||||
/**
|
||||
* Informs supported emulators to default to GameCube controller inputs.
|
||||
*/
|
||||
// #define EMU_DEFAULT_TO_GCN
|
||||
|
||||
/**
|
||||
* RCVI hack. Increases performance on emulator, and does nothing on console.
|
||||
* Might break on some emulators. Use at your own risk, and don't use it unless you actually need the extra performance.
|
||||
*/
|
||||
// #define RCVI_HACK
|
||||
|
||||
/**
|
||||
* Screen Size Defines.
|
||||
*/
|
||||
@@ -48,9 +70,3 @@
|
||||
*/
|
||||
#define BORDER_HEIGHT_CONSOLE 0
|
||||
#define BORDER_HEIGHT_EMULATOR 0
|
||||
|
||||
/**
|
||||
* RCVI hack. Increases performance on emulator, and does nothing on console.
|
||||
* Might break on some emulators. Use at your own risk, and don't use it unless you actually need the extra performance.
|
||||
*/
|
||||
// #define RCVI_HACK
|
||||
|
||||
@@ -188,6 +188,15 @@
|
||||
* config_rom.h
|
||||
*/
|
||||
|
||||
#ifdef VERSION_SH
|
||||
#undef ENABLE_RUMBLE
|
||||
#define ENABLE_RUMBLE
|
||||
#endif // VERSION_SH
|
||||
|
||||
#ifndef ENABLE_STATUS_REPOLLING_GUI
|
||||
#undef CONTROLLERS_INPUT_DISPLAY
|
||||
#endif // !ENABLE_STATUS_REPOLLING_GUI
|
||||
|
||||
#ifndef TARGET_N64
|
||||
#undef BORDER_HEIGHT_CONSOLE
|
||||
#define BORDER_HEIGHT_CONSOLE 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user