Compare commits

..

6 Commits

203 changed files with 4705 additions and 23543 deletions

View File

@@ -31,7 +31,7 @@
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "linux-gcc-x86"
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4

View File

@@ -119,31 +119,31 @@ else ifeq ($(GRUCODE),super3d) # Super3D
DEFINES += SUPER3D_GBI=1 F3D_NEW=1
endif
LIBRARIES := nustd hvqm2 z goddard
# TEXT ENGINES
# s2dex_text_engine - Text Engine by someone2639
TEXT_ENGINE := none
$(eval $(call validate-option,TEXT_ENGINE,none s2dex_text_engine))
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
SRC_DIRS += src/s2d_engine
LIBRARIES += s2d_engine
DUMMY != make -C src/s2d_engine COPY_DIR=$(shell pwd)/lib/
endif
# add more text engines here
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
#==============================================================================#
# Optimization flags #
#==============================================================================#
# Default non-gcc opt flags
DEFAULT_OPT_FLAGS = -Ofast
# Note: -fno-associative-math is used here to suppress warnings, ideally we would enable this as an optimization but
# this conflicts with -ftrapping-math apparently.
# TODO: Figure out how to allow -fassociative-math to be enabled
SAFETY_OPT_FLAGS = -ftrapping-math -fno-associative-math
# Main opt flags
GCC_MAIN_OPT_FLAGS = \
$(DEFAULT_OPT_FLAGS) $(SAFETY_OPT_FLAGS) \
-Ofast \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=10 \
--param max-unrolled-insns=10 \
@@ -154,7 +154,7 @@ GCC_MAIN_OPT_FLAGS = \
# Surface Collision
GCC_COLLISION_OPT_FLAGS = \
$(DEFAULT_OPT_FLAGS) $(SAFETY_OPT_FLAGS) \
-Ofast \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=100 \
--param max-unrolled-insns=100 \
@@ -167,7 +167,7 @@ GCC_COLLISION_OPT_FLAGS = \
# Math Util
GCC_MATH_UTIL_OPT_FLAGS = \
$(DEFAULT_OPT_FLAGS) $(SAFETY_OPT_FLAGS) \
-Ofast \
-fno-unroll-loops \
-fno-peel-loops \
--param case-values-threshold=20 \
@@ -179,7 +179,7 @@ GCC_MATH_UTIL_OPT_FLAGS = \
# Rendering graph node
GCC_GRAPH_NODE_OPT_FLAGS = \
$(DEFAULT_OPT_FLAGS) $(SAFETY_OPT_FLAGS) \
-Ofast \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=100 \
--param max-unrolled-insns=100 \
@@ -210,15 +210,10 @@ endif
# 0 - does not
UNF ?= 0
$(eval $(call validate-option,UNF,0 1))
# if `unf` is a target, make sure that UNF is set
ifneq ($(filter unf,$(MAKECMDGOALS)),)
UNF = 1
endif
ifeq ($(UNF),1)
DEFINES += UNF=1
SRC_DIRS += src/usb
USE_DEBUG := 1
endif
# ISVPRINT - whether to fake IS-Viewer presence,
@@ -234,13 +229,10 @@ endif
ifeq ($(USE_DEBUG),1)
ULTRALIB := ultra_d
DEFINES += DEBUG=1 OVERWRITE_OSPRINT=1
else ifeq ($(UNF),1)
ULTRALIB := ultra
DEFINES += _FINALROM=1 NDEBUG=1 OVERWRITE_OSPRINT=1
DEFINES += DEBUG=1
else
ULTRALIB := ultra_rom
DEFINES += _FINALROM=1 NDEBUG=1 OVERWRITE_OSPRINT=0
DEFINES += _FINALROM=1 NDEBUG=1
endif
# HVQM - whether to use HVQM fmv library
@@ -419,10 +411,6 @@ else
$(error Unable to detect a suitable MIPS toolchain installed)
endif
LIBRARIES := nustd hvqm2 z goddard
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
export LD_LIBRARY_PATH=./tools
AS := $(CROSS)as
@@ -500,7 +488,6 @@ VADPCM_ENC := $(TOOLS_DIR)/vadpcm_enc
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
SKYCONV := $(TOOLS_DIR)/skyconv
FIXLIGHTS_PY := $(TOOLS_DIR)/fixlights.py
FLIPS := $(TOOLS_DIR)/flips
ifeq ($(GZIPVER),std)
GZIP := gzip
else
@@ -515,13 +502,8 @@ endif
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
EMULATOR = mupen64plus
EMU_FLAGS =
ifneq (,$(call find-command,wslview))
LOADER = ./$(TOOLS_DIR)/UNFLoader.exe
else
LOADER = ./$(TOOLS_DIR)/UNFLoader
endif
LOADER = loader64
LOADER_FLAGS = -vwf
SHA1SUM = sha1sum
PRINT = printf
@@ -558,6 +540,7 @@ all: $(ROM)
clean:
$(RM) -r $(BUILD_DIR_BASE)
make -C src/s2d_engine clean
distclean: clean
$(PYTHON) extract_assets.py --clean
@@ -570,26 +553,13 @@ test-pj64: $(ROM)
wine ~/Desktop/new64/Project64.exe $<
# someone2639
# download and extract most recent unfloader build if needed
$(LOADER):
ifeq (,$(wildcard $(LOADER)))
@$(PRINT) "Downloading latest UNFLoader...$(NO_COL)\n"
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(TOOLS_DIR)
endif
load: $(ROM) $(LOADER)
$(LOADER) -r $<
unf: $(ROM) $(LOADER)
$(LOADER) -d -r $<
load: $(ROM)
$(LOADER) $(LOADER_FLAGS) $<
libultra: $(BUILD_DIR)/libultra.a
patch: $(ROM)
$(FLIPS) --create --bps ./baserom.$(VERSION).z64 $(ROM) $(BUILD_DIR)/$(TARGET_STRING).bps
# Extra object file dependencies
$(BUILD_DIR)/asm/ipl3.o: $(IPL3_RAW_FILES)
$(BUILD_DIR)/asm/boot.o: $(IPL3_RAW_FILES)
$(BUILD_DIR)/src/game/crash_screen.o: $(CRASH_TEXTURE_C_FILES)
$(BUILD_DIR)/src/game/version.o: $(BUILD_DIR)/src/game/version_data.h
$(BUILD_DIR)/lib/aspMain.o: $(BUILD_DIR)/rsp/audio.bin
@@ -694,11 +664,9 @@ $(BUILD_DIR)/%.ci4.inc.c: %.ci4.png
$(BUILD_DIR)/%.elf: $(BUILD_DIR)/%.o
$(call print,Linking ELF file:,$<,$@)
$(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map -o $@ $<
# Override for leveldata.elf, which otherwise matches the above pattern.
# Has to be a static pattern rule for make-4.4 and above to trigger the second
# expansion.
# Override for leveldata.elf, which otherwise matches the above pattern
.SECONDEXPANSION:
$(LEVEL_ELF_FILES): $(BUILD_DIR)/levels/%/leveldata.elf: $(BUILD_DIR)/levels/%/leveldata.o $(BUILD_DIR)/bin/$$(TEXTURE_BIN).elf
$(BUILD_DIR)/levels/%/leveldata.elf: $(BUILD_DIR)/levels/%/leveldata.o $(BUILD_DIR)/bin/$$(TEXTURE_BIN).elf
$(call print,Linking ELF file:,$<,$@)
$(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map --just-symbols=$(BUILD_DIR)/bin/$(TEXTURE_BIN).elf -o $@ $<
@@ -846,7 +814,7 @@ $(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s
# Run linker script through the C preprocessor
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(BUILD_DIR)/goddard.txt
$(call print,Preprocessing linker script:,$<,$@)
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -DULTRALIB=lib$(ULTRALIB) $(DEBUG_MAP_STACKTRACE_FLAG) -MMD -MP -MT $@ -MF $@.d -o $@ $<
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) $(DEBUG_MAP_STACKTRACE_FLAG) -MMD -MP -MT $@ -MF $@.d -o $@ $<
# Link libgoddard
$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
@@ -861,11 +829,11 @@ $(BUILD_DIR)/libz.a: $(LIBZ_O_FILES)
# SS2: Goddard rules to get size
$(BUILD_DIR)/sm64_prelim.ld: sm64.ld $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/libgoddard.a $(BUILD_DIR)/libz.a
$(call print,Preprocessing preliminary linker script:,$<,$@)
$(V)$(CPP) $(CPPFLAGS) -DPRELIMINARY=1 -DBUILD_DIR=$(BUILD_DIR) -DULTRALIB=lib$(ULTRALIB) -MMD -MP -MT $@ -MF $@.d -o $@ $<
$(V)$(CPP) $(CPPFLAGS) -DPRELIMINARY=1 -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
$(BUILD_DIR)/sm64_prelim.elf: $(BUILD_DIR)/sm64_prelim.ld
@$(PRINT) "$(GREEN)Linking Preliminary ELF file: $(BLUE)$@ $(NO_COL)\n"
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $< -Map $(BUILD_DIR)/sm64_prelim.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 undefined_syms.txt -T $< -Map $(BUILD_DIR)/sm64_prelim.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_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf
$(call print,Getting Goddard size...)
@@ -873,25 +841,17 @@ $(BUILD_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf
$(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
$(call print,Assembling:,$<,$@)
$(V)python3 tools/mapPacker.py $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/bin/addr.bin $(BUILD_DIR)/bin/name.bin
$(V)python3 tools/mapPacker.py $(BUILD_DIR)/sm64_prelim.map $(BUILD_DIR)/bin/addr.bin $(BUILD_DIR)/bin/name.bin
$(V)$(CROSS)gcc -c $(ASMFLAGS) $(foreach i,$(INCLUDE_DIRS),-Wa,-I$(i)) -x assembler-with-cpp -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
# 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
$(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(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 undefined_syms.txt -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))))
# run with -n / --dry-run
$(ROM):
@$(PRINT) "$(BLUE)DRY RUNS ARE DISABLED$(NO_COL)\n"
else
# not running with -n / --dry-run
$(ROM): $(ELF)
$(call print,Building ROM:,$<,$@)
endif
ifeq ($(CONSOLE),n64)
$(V)$(OBJCOPY) --pad-to=0x101000 --gap-fill=0xFF $< $@ -O binary
else ifeq ($(CONSOLE),bb)

View File

@@ -39,8 +39,6 @@ ACTOR_GROUPS := \
LEVEL_FILES := $(addsuffix leveldata,$(LEVEL_DIRS))
LEVEL_ELF_FILES := $(foreach level_dir,$(LEVEL_DIRS),$(BUILD_DIR)/levels/$(level_dir)leveldata.elf)
SEG_FILES := \
$(SEGMENTS:%=$(BUILD_DIR)/bin/%.elf) \
$(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.elf) \

View File

@@ -14,7 +14,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- **ArcticJaguar725**: Most audio configuration and layout changes, colored ia4 text, floombas, various bugfixes, and more
- **CowQuack**: Adjustable skybox sizes, area-specific skybox function
- **thecozies**: Water surface types, general maintenance, and time
- **MrComit**: General use object defines, JUMP_KICK_FIX
- **MrComit**: General use object defines, JUMP_KICK_FIX, LEDGE_GRABS_CHECK_SLOPE_ANGLE
- **aglab2**: Bugfixes (particularly puppycam), refactor stuff
- **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine
- **Arthurtilly**: Platform Displacement 2
@@ -61,6 +61,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Toggle to disable fall damage and the fall damage sound *
- Nonstop stars *
- Removed course-specific camera processing *
- You can increase the number of frames that you have to perform a firsty *
- Ability to set Mario's movement speed when hanging from a ceiling *
- Tighter hanging controls (Mario will face the direction of the analog stick directly while hanging from a ceiling) *
- reonucam3: custom camera by Reonu. This is included as a .patch file in the enhancements folder, you need to apply it if you want this camera.
@@ -121,7 +122,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Use `render_multi_image` to draw large texture rectangles consisting of multiple images on the screen.
- More info in `puppyprint.c`
- Wiseguy's Farcall TLB mapping allows to store executable code inside uncompressed segments, that can be loaded and ran as needed, instead of it having to be loaded at all times. See `farcall.h` in the include folder for instructions and details.
- Red Coin Stars now support up to 99 red coins! In addition, multi-area red coin missions can now be created by setting the 2nd behavior paramater of the red coin star to the number of reds required for the star to spawn.
# UltraSM64
- This repo contains a full decompilation of Super Mario 64 (J), (U), (E), and (SH).

View File

@@ -1 +1 @@
v2.0.9
v2.0.3

View File

@@ -27,6 +27,6 @@
#include "sparkle_animation/model.inc.c"
#ifdef S2DEX_TEXT_ENGINE
#include "src/s2d_engine/s2d_config.h"
#include "src/s2d_engine/config.h"
#include FONT_C_FILE
#endif

View File

@@ -4,39 +4,24 @@
.set gp=64
#include "macros.inc"
#undef _LANGUAGE_C
#include <PR/rcp.h>
#define PHYS_TO_CART(addr) ((addr) | 0xB0000000)
.set CART_ENTRYPOINT, 0x00000008
.set CART_CHECKSUM0, 0x00000010
.set CART_CHECKSUM1, 0x00000014
// initial DMEM state
.set SP_DMEM_UNK0, 0x040004C0
.set SP_DMEM_UNK1, 0x04000774
// Used for documentation; changing these can and will break your ROM!
.set INITIAL_DMA_LEN, 0x00100000
.set INITIAL_DMA_ROMPOS, 0x1000
// 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000
// 0xA4000000-0xA4000FFF: RSP DMEM
// 0xA4000000-0xA400003F: ROM header
.section .text, "ax"
// 0xA4000040-0xA4000B6F: IPL3
// IPL3 entry point jumped to from IPL2
glabel ipl3_entry // 0xA4000040
.ent ipl3_entry
mtc0 $zero, C0_CAUSE
mtc0 $zero, C0_COUNT
mtc0 $zero, C0_COMPARE
lui $t0, %hi(PHYS_TO_K1(RI_BASE_REG))
addiu $t0, %lo(PHYS_TO_K1(RI_BASE_REG))
lw $t1, %lo(RI_SELECT_REG)($t0)
mtc0 $zero, $13
mtc0 $zero, $9
mtc0 $zero, $11
lui $t0, %hi(RI_MODE_REG)
addiu $t0, %lo(RI_MODE_REG)
lw $t1, 0xc($t0)
bnez $t1, .LA4000410
nop
addiu $sp, $sp, -0x18
@@ -45,24 +30,24 @@ glabel ipl3_entry // 0xA4000040
sw $s5, 8($sp)
sw $s6, 0xc($sp)
sw $s7, 0x10($sp)
lui $t0, %hi(PHYS_TO_K1(RI_BASE_REG))
addiu $t0, %lo(PHYS_TO_K1(RI_BASE_REG))
lui $t2, %hi(PHYS_TO_K1(RDRAM_BASE_REG + 0x80000))
lui $t3, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
lui $t4, %hi(PHYS_TO_K1(MI_BASE_REG))
addiu $t4, %lo(PHYS_TO_K1(MI_BASE_REG))
lui $t0, %hi(RI_MODE_REG)
addiu $t0, %lo(RI_MODE_REG)
lui $t2, (0xa3f80000 >> 16)
lui $t3, (0xa3f00000 >> 16)
lui $t4, %hi(MI_MODE_REG)
addiu $t4, %lo(MI_MODE_REG)
ori $t1, $zero, 64
sw $t1, %lo(MI_VERSION_REG)($t0)
sw $t1, 4($t0)
li $s1, 8000
.LA400009C:
nop
addi $s1, $s1, -1
bnez $s1, .LA400009C
nop
sw $zero, %lo(RI_CURRENT_LOAD_REG)($t0)
ori $t1, $zero, 0x14
sw $t1, %lo(RI_SELECT_REG)($t0)
sw $zero, %lo(RI_MODE_REG)($t0)
sw $zero, 8($t0)
ori $t1, $zero, 20
sw $t1, 0xc($t0)
sw $zero, ($t0)
li $s1, 4
.LA40000C0:
nop
@@ -70,34 +55,34 @@ glabel ipl3_entry // 0xA4000040
bnez $s1, .LA40000C0
nop
ori $t1, $zero, 14
sw $t1, %lo(RI_MODE_REG)($t0)
sw $t1, ($t0)
li $s1, 32
.LA40000DC:
addi $s1, $s1, -1
bnez $s1, .LA40000DC
ori $t1, $zero, (MI_SET_INIT | 0xF)
sw $t1, %lo(MI_MODE_REG)($t4)
ori $t1, $zero, 271
sw $t1, ($t4)
lui $t1, (0x18082838 >> 16)
ori $t1, (0x18082838 & 0xFFFF)
sw $t1, %lo(RDRAM_DELAY_REG)($t2)
sw $zero, %lo(RDRAM_REF_ROW_REG)($t2)
sw $t1, 0x8($t2)
sw $zero, 0x14($t2)
lui $t1, 0x8000
sw $t1, %lo(RDRAM_DEVICE_ID_REG)($t2)
sw $t1, 0x4($t2)
move $t5, $zero
move $t6, $zero
lui $t7, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
lui $t7, (0xA3F00000 >> 16)
move $t8, $zero
lui $t9, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
lui $t9, (0xA3F00000 >> 16)
lui $s6, (0xA0000000 >> 16)
move $s7, $zero
lui $a2, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
lui $a2, (0xA3F00000 >> 16)
lui $a3, (0xA0000000 >> 16)
move $s2, $zero
lui $s4, (0xA0000000 >> 16)
addiu $sp, $sp, -0x48
move $fp, $sp
lui $s0, %hi(PHYS_TO_K1(MI_VERSION_REG))
lw $s0, %lo(PHYS_TO_K1(MI_VERSION_REG))($s0)
lui $s0, %hi(MI_VERSION_REG)
lw $s0, %lo(MI_VERSION_REG)($s0)
lui $s1, (0x01010101 >> 16)
addiu $s1, (0x01010101 & 0xFFFF)
bne $s0, $s1, .LA4000160
@@ -118,14 +103,14 @@ glabel ipl3_entry // 0xA4000040
nop
sw $v0, ($sp)
li $t1, 8192
sw $t1, %lo(MI_MODE_REG)($t4)
lw $t3, %lo(RDRAM_CONFIG_REG)($t7)
sw $t1, ($t4)
lw $t3, ($t7)
lui $t0, 0xf0ff
and $t3, $t3, $t0
sw $t3, 4($sp)
addi $sp, $sp, 8
li $t1, 4096
sw $t1, %lo(MI_MODE_REG)($t4)
sw $t1, ($t4)
lui $t0, 0xb019
bne $t3, $t0, .LA40001E0
nop
@@ -145,11 +130,11 @@ glabel ipl3_entry // 0xA4000040
add $s4, $s4, $t0
.LA40001E8:
li $t0, 8192
sw $t0, %lo(MI_MODE_REG)($t4)
lw $t1, %lo(RDRAM_DEVICE_MANUF_REG)($t7)
lw $k0, %lo(RDRAM_CONFIG_REG)($t7)
sw $t0, ($t4)
lw $t1, 0x24($t7)
lw $k0, ($t7)
li $t0, 4096
sw $t0, %lo(MI_MODE_REG)($t4)
sw $t0, ($t4)
andi $t1, $t1, 0xffff
li $t0, 1280
bne $t1, $t0, .LA4000230
@@ -177,9 +162,9 @@ glabel ipl3_entry // 0xA4000040
nop
.LA400025C:
li $t0, 0xc4000000
sw $t0, %lo(RDRAM_MODE_REG)($t2)
sw $t0, 0xc($t2)
li $t0, 0x80000000
sw $t0, %lo(RDRAM_DEVICE_ID_REG)($t2)
sw $t0, 0x4($t2)
move $sp, $fp
move $v1, $zero
.LA4000274:
@@ -247,7 +232,7 @@ glabel ipl3_entry // 0xA4000040
slt $t0, $v1, $t5
bnez $t0, .LA4000274
nop
lui $t2, %hi(PHYS_TO_K1(RI_BASE_REG))
lui $t2, %hi(RI_REFRESH_REG)
sll $s2, $s2, 0x13
lui $t1, (0x00063634 >> 16)
ori $t1, (0x00063634 & 0xFFFF)
@@ -268,8 +253,8 @@ glabel ipl3_entry // 0xA4000040
lw $s6, 0xc($sp)
lw $s7, 0x10($sp)
addiu $sp, $sp, 0x18
lui $t0, %hi(UT_VEC)
addiu $t0, $t0, %lo(UT_VEC)
lui $t0, %hi(EXCEPTION_TLB_MISS)
addiu $t0, $t0, %lo(EXCEPTION_TLB_MISS)
addiu $t1, $t0, 0x4000
addiu $t1, $t1, -0x20
mtc0 $zero, $28
@@ -279,8 +264,8 @@ glabel ipl3_entry // 0xA4000040
sltu $at, $t0, $t1
bnez $at, .LA40003D8
addiu $t0, $t0, 0x20
lui $t0, %hi(UT_VEC)
addiu $t0, %lo(UT_VEC)
lui $t0, %hi(EXCEPTION_TLB_MISS)
addiu $t0, %lo(EXCEPTION_TLB_MISS)
addiu $t1, $t0, 0x2000
addiu $t1, $t1, -0x10
.LA40003F8:
@@ -291,8 +276,8 @@ glabel ipl3_entry // 0xA4000040
b .LA4000458
nop
.LA4000410:
lui $t0, %hi(UT_VEC)
addiu $t0, %lo(UT_VEC)
lui $t0, %hi(EXCEPTION_TLB_MISS)
addiu $t0, %lo(EXCEPTION_TLB_MISS)
addiu $t1, $t0, 0x4000
addiu $t1, $t1, -0x20
mtc0 $zero, $28
@@ -302,8 +287,8 @@ glabel ipl3_entry // 0xA4000040
sltu $at, $t0, $t1
bnez $at, .LA4000428
addiu $t0, $t0, 0x20
lui $t0, %hi(UT_VEC)
addiu $t0, %lo(UT_VEC)
lui $t0, %hi(EXCEPTION_TLB_MISS)
addiu $t0, %lo(EXCEPTION_TLB_MISS)
addiu $t1, $t0, 0x2000
addiu $t1, $t1, -0x10
.LA4000448:
@@ -312,16 +297,16 @@ glabel ipl3_entry // 0xA4000040
bnez $at, .LA4000448
addiu $t0, $t0, 0x10
.LA4000458:
lui $t2, %hi(PHYS_TO_K1(SP_DMEM_START))
addiu $t2, $t2, %lo(PHYS_TO_K1(SP_DMEM_START))
lui $t2, %hi(SP_DMEM)
addiu $t2, $t2, %lo(SP_DMEM)
lui $t3, 0xfff0
lui $t1, 0x0010
and $t2, $t2, $t3
lui $t0, %hi(PHYS_TO_K1(SP_DMEM_UNK0))
lui $t0, %hi(SP_DMEM_UNK0)
addiu $t1, -1
lui $t3, %hi(PHYS_TO_K1(SP_DMEM_UNK1))
addiu $t0, %lo(PHYS_TO_K1(SP_DMEM_UNK0))
addiu $t3, %lo(PHYS_TO_K1(SP_DMEM_UNK1))
lui $t3, %hi(SP_DMEM_UNK1)
addiu $t0, %lo(SP_DMEM_UNK0)
addiu $t3, %lo(SP_DMEM_UNK1)
and $t0, $t0, $t1
and $t3, $t3, $t1
lui $t1, 0xa000
@@ -335,32 +320,32 @@ glabel ipl3_entry // 0xA4000040
addiu $t1, $t1, 4
bnez $at, .LA4000498
sw $t5, -4($t1)
lui $t4, %hi(UT_VEC)
addiu $t4, %lo(UT_VEC)
lui $t4, %hi(EXCEPTION_TLB_MISS)
addiu $t4, %lo(EXCEPTION_TLB_MISS)
jr $t4
nop
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
lw $t1, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
lui $t3, %hi(D_B0000008)
lw $t1, %lo(D_B0000008)($t3)
lui $t2, (0x1FFFFFFF >> 16)
ori $t2, (0x1FFFFFFF & 0xFFFF)
lui $at, %hi(PHYS_TO_K1(PI_DRAM_ADDR_REG))
lui $at, %hi(PI_DRAM_ADDR_REG)
and $t1, $t1, $t2
sw $t1, %lo(PHYS_TO_K1(PI_DRAM_ADDR_REG))($at)
lui $t0, %hi(PHYS_TO_K1(PI_STATUS_REG))
sw $t1, %lo(PI_DRAM_ADDR_REG)($at)
lui $t0, %hi(PI_STATUS_REG)
.LA40004D0:
lw $t0, %lo(PHYS_TO_K1(PI_STATUS_REG))($t0)
andi $t0, $t0, PI_STATUS_IO_BUSY
lw $t0, %lo(PI_STATUS_REG)($t0)
andi $t0, $t0, 2
bnezl $t0, .LA40004D0
lui $t0, %hi(PHYS_TO_K1(PI_STATUS_REG))
li $t0, INITIAL_DMA_ROMPOS
lui $t0, %hi(PI_STATUS_REG)
li $t0, 0x1000
add $t0, $t0, $t3
and $t0, $t0, $t2
lui $at, %hi(PHYS_TO_K1(PI_CART_ADDR_REG))
sw $t0, %lo(PHYS_TO_K1(PI_CART_ADDR_REG))($at)
li $t2, INITIAL_DMA_LEN
addiu $t2, -1
lui $at, %hi(PHYS_TO_K1(PI_WR_LEN_REG))
sw $t2, %lo(PHYS_TO_K1(PI_WR_LEN_REG))($at)
lui $at, %hi(PI_CART_ADDR_REG)
sw $t0, %lo(PI_CART_ADDR_REG)($at)
lui $t2, 0x0010
addiu $t2, 0xFFFF
lui $at, %hi(PI_WR_LEN_REG)
sw $t2, %lo(PI_WR_LEN_REG)($at)
.LA4000514:
nop
@@ -391,13 +376,13 @@ glabel ipl3_entry // 0xA4000040
nop
nop
nop
lui $t3, %hi(PHYS_TO_K1(PI_STATUS_REG))
lw $t3, %lo(PHYS_TO_K1(PI_STATUS_REG))($t3)
lui $t3, %hi(PI_STATUS_REG)
lw $t3, %lo(PI_STATUS_REG)($t3)
andi $t3, $t3, 0x1
bnez $t3, .LA4000514
nop
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
lw $a0, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
lui $t3, %hi(D_B0000008)
lw $a0, %lo(D_B0000008)($t3)
move $a1, $s6
lui $at, (0x5D588B65 >> 16)
ori $at, (0x5D588B65 & 0xFFFF)
@@ -451,54 +436,52 @@ glabel ipl3_entry // 0xA4000040
xor $a3, $t6, $t3
xor $t8, $s0, $a2
xor $s0, $t8, $t4
// verifies checksum
lui $t3, %hi(PHYS_TO_CART(CART_CHECKSUM0))
lw $t0, %lo(PHYS_TO_CART(CART_CHECKSUM0))($t3)
lui $t3, %hi(D_B0000010)
lw $t0, %lo(D_B0000010)($t3)
bne $a3, $t0, halt
nop
lw $t0, %lo(PHYS_TO_CART(CART_CHECKSUM1))($t3)
lw $t0, %lo(D_B0000014)($t3)
bne $s0, $t0, halt
nop
bal func_A4000690
nop
// In a permanent loop that cannot be exited.
halt:
bal halt
nop
func_A4000690:
lui $t1, %hi(PHYS_TO_K1(SP_PC_REG))
lw $t1, %lo(PHYS_TO_K1(SP_PC_REG))($t1)
lui $t1, %hi(SP_PC)
lw $t1, %lo(SP_PC)($t1)
lw $s0, 0x14($sp)
lw $ra, 0x1c($sp)
beqz $t1, .LA40006BC
addiu $sp, $sp, 0x20
li $t2, 65
lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
sw $t2, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
lui $at, %hi(PHYS_TO_K1(SP_PC_REG))
sw $zero, %lo(PHYS_TO_K1(SP_PC_REG))($at)
lui $at, %hi(SP_STATUS_REG)
sw $t2, %lo(SP_STATUS_REG)($at)
lui $at, %hi(SP_PC)
sw $zero, %lo(SP_PC)($at)
.LA40006BC:
lui $t3, (0x00AAAAAE >> 16)
ori $t3, (0x00AAAAAE & 0xFFFF)
lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
sw $t3, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
lui $at, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
lui $at, %hi(SP_STATUS_REG)
sw $t3, %lo(SP_STATUS_REG)($at)
lui $at, %hi(MI_INTR_MASK_REG)
li $t0, 1365
sw $t0, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($at)
lui $at, %hi(PHYS_TO_K1(SI_STATUS_REG))
sw $zero, %lo(PHYS_TO_K1(SI_STATUS_REG))($at)
lui $at, %hi(PHYS_TO_K1(AI_STATUS_REG))
sw $zero, %lo(PHYS_TO_K1(AI_STATUS_REG))($at)
lui $at, %hi(PHYS_TO_K1(MI_BASE_REG))
sw $t0, %lo(MI_INTR_MASK_REG)($at)
lui $at, %hi(SI_STATUS_REG)
sw $zero, %lo(SI_STATUS_REG)($at)
lui $at, %hi(AI_STATUS_REG)
sw $zero, %lo(AI_STATUS_REG)($at)
lui $at, %hi(MI_MODE_REG)
li $t1, 2048
sw $t1, %lo(PHYS_TO_K1(MI_BASE_REG))($at)
sw $t1, %lo(MI_MODE_REG)($at)
li $t1, 2
lui $at, %hi(PHYS_TO_K1(PI_STATUS_REG))
lui $at, %hi(PI_STATUS_REG)
lui $t0, (0xA0000300 >> 16)
ori $t0, (0xA0000300 & 0xFFFF)
sw $t1, %lo(PHYS_TO_K1(PI_STATUS_REG))($at)
sw $t1, %lo(PI_STATUS_REG)($at)
sw $s7, 0x14($t0)
sw $s5, 0xc($t0)
sw $s3, 0x4($t0)
@@ -512,22 +495,22 @@ func_A4000690:
addiu $t1, $t1, 0
.LA4000730:
sw $t1, 0x8($t0)
lui $t0, %hi(PHYS_TO_K1(SP_DMEM_START))
addiu $t0, %lo(PHYS_TO_K1(SP_DMEM_START))
lui $t0, %hi(SP_DMEM)
addiu $t0, %lo(SP_DMEM)
addi $t1, $t0, 0x1000
.LA4000740:
addiu $t0, $t0, 4
bne $t0, $t1, .LA4000740
sw $zero, -4($t0)
lui $t0, %hi(PHYS_TO_K1(SP_IMEM_START))
addiu $t0, %lo(PHYS_TO_K1(SP_IMEM_START))
lui $t0, %hi(SP_IMEM)
addiu $t0, %lo(SP_IMEM)
addi $t1, $t0, 0x1000
.LA4000758:
addiu $t0, $t0, 4
bne $t0, $t1, .LA4000758
sw $zero, -4($t0)
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
lw $t1, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
lui $t3, %hi(D_B0000008)
lw $t1, %lo(D_B0000008)($t3)
jr $t1
nop
nop
@@ -764,8 +747,8 @@ func_A4000A40:
li $k1, 1
bne $a1, $k1, .LA4000AC0
sw $t7, ($s5)
lui $k0, %hi(PHYS_TO_K1(MI_BASE_REG))
sw $zero, %lo(PHYS_TO_K1(MI_BASE_REG))($k0)
lui $k0, %hi(MI_MODE_REG)
sw $zero, %lo(MI_MODE_REG)($k0)
.LA4000AC0:
lw $ra, 0x1c($sp)
addiu $sp, $sp, 0x28
@@ -776,12 +759,12 @@ func_A4000AD0:
addiu $sp, $sp, -0x28
sw $ra, 0x1c($sp)
li $k0, 0x2000
lui $k1, %hi(PHYS_TO_K1(MI_BASE_REG))
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
lui $k1, %hi(MI_MODE_REG)
sw $k0, %lo(MI_MODE_REG)($k1)
move $fp, $zero
lw $fp, ($s5)
li $k0, 0x1000
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
sw $k0, %lo(MI_MODE_REG)($k1)
li $k1, 0x40
and $k1, $k1, $fp
srl $k1, $k1, 6
@@ -814,8 +797,6 @@ func_A4000AD0:
nop
nop
.end ipl3_entry
// 0xA4000B70-0xA4000FFF: IPL3 Font
glabel ipl3_font
.incbin "textures/ipl3_raw/ipl3_font_00.ia1"

View File

@@ -15,14 +15,9 @@
.word 0x00000000 /* Unknown */
.word 0x00000000 /* Unknown */
.ascii INTERNAL_ROM_NAME /* Internal ROM name */
#if defined(USE_GAMECUBE_CONTROLLER)
/* Advanced homebrew ROM header bytes: https://n64brew.dev/wiki/ROM_Header#Advanced_Homebrew_ROM_Header */
.word 0x82000000
#else
.word 0x00000000 /* Unknown */
#endif
.word 0x0000004E /* Cartridge */
#if defined(EEP4K) && !defined(USE_GAMECUBE_CONTROLLER)
#if defined(EEP4K)
.ascii "SM" /* Cartridge ID */
#else
.ascii "ED" /* Cartridge ID */

View File

@@ -1,10 +0,0 @@
.include "macros.inc"
.section .text
.set noreorder
.set abi_arg0, $f12
glabel roundf
round.w.s $f0, abi_arg0
jr $ra
mfc1 $v0, $f0

View File

@@ -5,152 +5,40 @@
#include "macros.h"
#include "types.h"
#include "game/ingame_menu.h"
#include "game/puppyprint.h"
#include "make_const_nonconst.h"
// SM64 (US/JP/EU/SH) Segment 02
#ifdef PUPPYPRINT
ALIGNED8 static const Texture small_font_default[] = {
ALIGNED8 static const Texture small_font_1[] = {
#include "textures/segment2/custom_text.i4.inc.c"
};
ALIGNED8 static const Texture small_font_outline[] = {
#include "textures/segment2/custom_text2.ia4.inc.c"
};
ALIGNED8 static const Texture small_font_plain[] = {
#include "textures/segment2/custom_text3.i4.inc.c"
};
ALIGNED8 static const Texture small_font_vanilla[] = {
#include "textures/segment2/custom_text4.i4.inc.c"
ALIGNED8 static const Texture small_font_2[] = {
#include "textures/segment2/custom_text2.i4.inc.c"
};
const u8 small_font_kerning_default[] = {
/*!*/ 4, /*"*/ 5, /*#*/ 0, /*$*/ 0, /*%*/ 8, /*&*/ 8, /*'*/ 2, /*(*/ 5, /*)*/ 5, /***/ 0, /*+*/ 8, /*,*/ 3, /*-*/ 8, /*.*/ 3, /*/*/ 8, /*0*/ 6,
/*1*/ 5, /*2*/ 7, /*3*/ 7, /*4*/ 7, /*5*/ 7, /*6*/ 8, /*7*/ 7, /*8*/ 7, /*9*/ 6, /*:*/ 3, /*;*/ 3, /*<*/ 0, /*=*/ 0, /*>*/ 0, /*?*/ 6, /*@*/ 0,
/*A*/ 7, /*B*/ 7, /*C*/ 7, /*D*/ 7, /*E*/ 6, /*F*/ 5, /*G*/ 8, /*H*/ 6, /*I*/ 6, /*J*/ 5, /*K*/ 7, /*L*/ 6, /*M*/ 7, /*N*/ 7, /*O*/ 7, /*P*/ 6,
/*Q*/ 8, /*R*/ 6, /*S*/ 7, /*T*/ 7, /*U*/ 7, /*V*/ 7, /*W*/ 8, /*X*/ 7, /*Y*/ 7, /*Z*/ 7, /*[*/ 0, /*\\*/ 0, /*]*/ 0, /*^*/ 8, /*_*/ 0, /*`*/ 0,
/*a*/ 7, /*b*/ 7, /*c*/ 6, /*d*/ 7, /*e*/ 7, /*f*/ 7, /*g*/ 7, /*h*/ 7, /*i*/ 3, /*j*/ 5, /*k*/ 8, /*l*/ 4, /*m*/ 7, /*n*/ 7, /*o*/ 7, /*p*/ 7,
/*q*/ 7, /*r*/ 6, /*s*/ 6, /*t*/ 6, /*u*/ 6, /*v*/ 7, /*w*/ 8, /*x*/ 6, /*y*/ 8, /*z*/ 7, /*~*/ 8,
const Texture *const puppyprint_font_lut[2] = {
small_font_1, small_font_2
};
const u16 small_font_offsets_default[] = {
/*!*/ 0, /*"*/ 8, /*#*/ 16, /*$*/ 24, /*%*/ 32, /*&*/ 40, /*'*/ 48, /*(*/ 56, /*)*/ 64, /***/ 72, /*+*/ 80, /*,*/ 88, /*-*/ 96, /*.*/ 104, /*/*/ 112,
/*0*/ 120, /*1*/ 128, /*2*/ 136, /*3*/ 144, /*4*/ 152, /*5*/ 160, /*6*/ 168, /*7*/ 176, /*8*/ 184, /*9*/ 192, /*:*/ 200, /*;*/ 208, /*<*/ 216, /*=*/ 216,
/*>*/ 0, /*?*/ 216, /*@*/ 0, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
/*L*/ 312, /*M*/ 320, /*N*/ 328, /*O*/ 336, /*P*/ 344, /*Q*/ 352, /*R*/ 360, /*S*/ 368, /*T*/ 376, /*U*/ 384, /*V*/ 392, /*W*/ 400, /*X*/ 408, /*Y*/ 416,
/*Z*/ 424, /*[*/ 432, /*\*/ 432, /*]*/ 432, /*^*/ 432, /*_*/ 440, /*`*/ 440, /*a*/ 440, /*b*/ 448, /*c*/ 456, /*d*/ 464, /*e*/ 472, /*f*/ 480, /*g*/ 488,
/*h*/ 496, /*i*/ 504, /*j*/ 512, /*k*/ 520, /*l*/ 528, /*m*/ 536, /*n*/ 544, /*o*/ 552, /*p*/ 560, /*q*/ 568, /*r*/ 576, /*s*/ 584, /*t*/ 592, /*u*/ 600,
/*v*/ 608, /*w*/ 616, /*x*/ 624, /*y*/ 632, /*z*/ 640, /*{*/ 648, /*|*/ 648, /*}*/ 648, /*~*/ 648, /*:)*/ 656
static const u8 small_font_kerning_1[80] = {
/*0*/ 6, /*1*/ 5, /*2*/ 7, /*3*/ 7, /*4*/ 7, /*5*/ 7, /*6*/ 8, /*7*/ 7, /*8*/ 7, /*9*/ 6, /*-*/ 8, /*+*/ 8, /*(*/ 5, /*)*/ 5, /*!*/ 4, /*?*/ 6,
/*A*/ 7, /*B*/ 7, /*C*/ 7, /*D*/ 7, /*E*/ 6, /*F*/ 5, /*G*/ 8, /*H*/ 6, /*I*/ 6, /*J*/ 5, /*K*/ 7, /*L*/ 6, /*M*/ 7, /*N*/ 7, /*O*/ 7, /*P*/ 6,
/*Q*/ 8, /*R*/ 6, /*S*/ 7, /*T*/ 7, /*U*/ 7, /*V*/ 7, /*W*/ 8, /*X*/ 7, /*Y*/ 7, /*Z*/ 7, /*"*/ 5, /*'*/ 2, /*:*/ 3, /*;*/ 3, /*.*/ 3, /*,*/ 3,
/*a*/ 7, /*b*/ 7, /*c*/ 6, /*d*/ 7, /*e*/ 7, /*f*/ 7, /*g*/ 7, /*h*/ 7, /*i*/ 3, /*j*/ 5, /*k*/ 8, /*l*/ 4, /*m*/ 7, /*n*/ 7, /*o*/ 7, /*p*/ 7,
/*q*/ 7, /*r*/ 6, /*s*/ 6, /*t*/ 6, /*u*/ 6, /*v*/ 7, /*w*/ 8, /*x*/ 6, /*y*/ 8, /*z*/ 7, /*~*/ 8, /*¨*/ 7, /*^*/ 8, /*/*/ 8, /*%*/ 8, /*&*/ 8,
};
static const u8 small_font_kerning_outline[] = {
/*!*/ 3, /*"*/ 4, /*#*/ 0, /*$*/ 0, /*%*/ 6, /*&*/ 6, /*'*/ 2, /*(*/ 4, /*)*/ 4, /***/ 0, /*+*/ 6, /*,*/ 2, /*-*/ 6, /*.*/ 2, /*/*/ 6, /*0*/ 6,
/*1*/ 6, /*2*/ 6, /*3*/ 6, /*4*/ 6, /*5*/ 6, /*6*/ 6, /*7*/ 6, /*8*/ 6, /*9*/ 6, /*:*/ 2, /*;*/ 2, /*<*/ 0, /*=*/ 0, /*>*/ 0, /*?*/ 6, /*@*/ 0,
/*A*/ 6, /*B*/ 6, /*C*/ 6, /*D*/ 6, /*E*/ 6, /*F*/ 6, /*G*/ 6, /*H*/ 6, /*I*/ 5, /*J*/ 7, /*K*/ 6, /*L*/ 6, /*M*/ 6, /*N*/ 6, /*O*/ 6, /*P*/ 6,
/*Q*/ 6, /*R*/ 6, /*S*/ 6, /*T*/ 6, /*U*/ 6, /*V*/ 6, /*W*/ 6, /*X*/ 6, /*Y*/ 6, /*Z*/ 6, /*[*/ 0, /*\\*/ 0, /*]*/ 0, /*^*/ 7, /*_*/ 0, /*`*/ 0,
/*a*/ 5, /*b*/ 5, /*c*/ 5, /*d*/ 5, /*e*/ 5, /*f*/ 5, /*g*/ 5, /*h*/ 5, /*i*/ 2, /*j*/ 6, /*k*/ 4, /*l*/ 2, /*m*/ 5, /*n*/ 5, /*o*/ 5, /*p*/ 5,
/*q*/ 5, /*r*/ 5, /*s*/ 5, /*t*/ 5, /*u*/ 5, /*v*/ 5, /*w*/ 5, /*x*/ 5, /*y*/ 5, /*z*/ 5, /*~*/ 6,
static const u8 small_font_kerning_2[80] = {
/*0*/ 6, /*1*/ 6, /*2*/ 6, /*3*/ 6, /*4*/ 6, /*5*/ 6, /*6*/ 6, /*7*/ 6, /*8*/ 6, /*9*/ 6, /*-*/ 6, /*+*/ 6, /*(*/ 3, /*)*/ 3, /*!*/ 4, /*?*/ 5,
/*A*/ 6, /*B*/ 6, /*C*/ 6, /*D*/ 6, /*E*/ 6, /*F*/ 6, /*G*/ 6, /*H*/ 6, /*I*/ 6, /*J*/ 6, /*K*/ 6, /*L*/ 6, /*M*/ 6, /*N*/ 6, /*O*/ 6, /*P*/ 6,
/*Q*/ 6, /*R*/ 6, /*S*/ 6, /*T*/ 6, /*U*/ 6, /*V*/ 6, /*W*/ 6, /*X*/ 6, /*Y*/ 6, /*Z*/ 6, /*"*/ 4, /*'*/ 1, /*:*/ 2, /*;*/ 2, /*.*/ 2, /*,*/ 2,
/*a*/ 5, /*b*/ 5, /*c*/ 5, /*d*/ 5, /*e*/ 5, /*f*/ 5, /*g*/ 5, /*h*/ 5, /*i*/ 1, /*j*/ 5, /*k*/ 5, /*l*/ 3, /*m*/ 5, /*n*/ 5, /*o*/ 5, /*p*/ 5,
/*q*/ 5, /*r*/ 5, /*s*/ 5, /*t*/ 5, /*u*/ 5, /*v*/ 5, /*w*/ 5, /*x*/ 5, /*y*/ 5, /*z*/ 5, /*~*/ 6, /*¨*/ 5, /*^*/ 6, /*/*/ 5, /*%*/ 5, /*&*/ 6,
};
const u16 small_font_offsets_outline[] = {
/*!*/ 0, /*"*/ 8, /*#*/ 16, /*$*/ 24, /*%*/ 32, /*&*/ 40, /*'*/ 48, /*(*/ 56, /*)*/ 64, /***/ 72, /*+*/ 80, /*,*/ 88, /*-*/ 96, /*.*/ 104, /*/*/ 112,
/*0*/ 120, /*1*/ 128, /*2*/ 136, /*3*/ 144, /*4*/ 152, /*5*/ 160, /*6*/ 168, /*7*/ 176, /*8*/ 184, /*9*/ 192, /*:*/ 200, /*;*/ 208, /*<*/ 216, /*=*/ 216,
/*>*/ 0, /*?*/ 216, /*@*/ 0, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
/*L*/ 312, /*M*/ 320, /*N*/ 328, /*O*/ 336, /*P*/ 344, /*Q*/ 352, /*R*/ 360, /*S*/ 368, /*T*/ 376, /*U*/ 384, /*V*/ 392, /*W*/ 400, /*X*/ 408, /*Y*/ 416,
/*Z*/ 424, /*[*/ 432, /*\*/ 432, /*]*/ 432, /*^*/ 432, /*_*/ 440, /*`*/ 440, /*a*/ 440, /*b*/ 448, /*c*/ 456, /*d*/ 464, /*e*/ 472, /*f*/ 480, /*g*/ 488,
/*h*/ 496, /*i*/ 504, /*j*/ 512, /*k*/ 520, /*l*/ 528, /*m*/ 536, /*n*/ 544, /*o*/ 552, /*p*/ 560, /*q*/ 568, /*r*/ 576, /*s*/ 584, /*t*/ 592, /*u*/ 600,
/*v*/ 608, /*w*/ 616, /*x*/ 624, /*y*/ 632, /*z*/ 640, /*{*/ 648, /*|*/ 648, /*}*/ 648, /*~*/ 648, /*:)*/ 656
};
static const u8 small_font_kerning_plain[] = {
/*!*/ 5, /*"*/ 4, /*#*/ 0, /*$*/ 0, /*%*/ 6, /*&*/ 7, /*'*/ 2, /*(*/ 4, /*)*/ 4, /***/ 0, /*+*/ 6, /*,*/ 2, /*-*/ 6, /*.*/ 2, /*/*/ 6, /*0*/ 6,
/*1*/ 5, /*2*/ 5, /*3*/ 5, /*4*/ 5, /*5*/ 5, /*6*/ 5, /*7*/ 5, /*8*/ 5, /*9*/ 5, /*:*/ 3, /*;*/ 3, /*<*/ 0, /*=*/ 0, /*>*/ 0, /*?*/ 6, /*@*/ 0,
/*A*/ 6, /*B*/ 6, /*C*/ 6, /*D*/ 6, /*E*/ 6, /*F*/ 6, /*G*/ 6, /*H*/ 6, /*I*/ 4, /*J*/ 6, /*K*/ 6, /*L*/ 6, /*M*/ 7, /*N*/ 7, /*O*/ 6, /*P*/ 6,
/*Q*/ 6, /*R*/ 6, /*S*/ 6, /*T*/ 6, /*U*/ 6, /*V*/ 6, /*W*/ 7, /*X*/ 6, /*Y*/ 6, /*Z*/ 6, /*[*/ 0, /*\\*/ 0, /*]*/ 0, /*^*/ 7, /*_*/ 0, /*`*/ 0,
/*a*/ 6, /*b*/ 6, /*c*/ 6, /*d*/ 6, /*e*/ 6, /*f*/ 6, /*g*/ 6, /*h*/ 6, /*i*/ 3, /*j*/ 4, /*k*/ 6, /*l*/ 5, /*m*/ 7, /*n*/ 6, /*o*/ 6, /*p*/ 6,
/*q*/ 6, /*r*/ 6, /*s*/ 6, /*t*/ 6, /*u*/ 6, /*v*/ 6, /*w*/ 7, /*x*/ 6, /*y*/ 6, /*z*/ 6, /*~*/ 7,
};
const u16 small_font_offsets_plain[] = {
/*!*/ 0, /*"*/ 8, /*#*/ 16, /*$*/ 24, /*%*/ 32, /*&*/ 40, /*'*/ 48, /*(*/ 56, /*)*/ 64, /***/ 72, /*+*/ 80, /*,*/ 88, /*-*/ 96, /*.*/ 104, /*/*/ 112,
/*0*/ 120, /*1*/ 128, /*2*/ 136, /*3*/ 144, /*4*/ 152, /*5*/ 160, /*6*/ 168, /*7*/ 176, /*8*/ 184, /*9*/ 192, /*:*/ 200, /*;*/ 208, /*<*/ 216, /*=*/ 216,
/*>*/ 0, /*?*/ 216, /*@*/ 0, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
/*L*/ 312, /*M*/ 320, /*N*/ 328, /*O*/ 336, /*P*/ 344, /*Q*/ 352, /*R*/ 360, /*S*/ 368, /*T*/ 376, /*U*/ 384, /*V*/ 392, /*W*/ 400, /*X*/ 408, /*Y*/ 416,
/*Z*/ 424, /*[*/ 432, /*\*/ 432, /*]*/ 432, /*^*/ 432, /*_*/ 440, /*`*/ 440, /*a*/ 440, /*b*/ 448, /*c*/ 456, /*d*/ 464, /*e*/ 472, /*f*/ 480, /*g*/ 488,
/*h*/ 496, /*i*/ 504, /*j*/ 512, /*k*/ 520, /*l*/ 528, /*m*/ 536, /*n*/ 544, /*o*/ 552, /*p*/ 560, /*q*/ 568, /*r*/ 576, /*s*/ 584, /*t*/ 592, /*u*/ 600,
/*v*/ 608, /*w*/ 616, /*x*/ 624, /*y*/ 632, /*z*/ 640, /*{*/ 648, /*|*/ 648, /*}*/ 648, /*~*/ 648, /*:)*/ 656
};
static const u8 small_font_kerning_vanilla[] = {
/*!*/ 4, /*"*/ 4, /*#*/ 0, /*$*/ 0, /*%*/ 6, /*&*/ 7, /*'*/ 3, /*(*/ 4, /*)*/ 4, /***/ 0, /*+*/ 6, /*,*/ 2, /*-*/ 4, /*.*/ 3, /*/*/ 4, /*0*/ 5,
/*1*/ 5, /*2*/ 6, /*3*/ 6, /*4*/ 6, /*5*/ 6, /*6*/ 6, /*7*/ 6, /*8*/ 6, /*9*/ 6, /*:*/ 4, /*;*/ 4, /*<*/ 0, /*=*/ 0, /*>*/ 0, /*?*/ 5, /*@*/ 0,
/*A*/ 5, /*B*/ 5, /*C*/ 5, /*D*/ 5, /*E*/ 5, /*F*/ 5, /*G*/ 5, /*H*/ 5, /*I*/ 3, /*J*/ 5, /*K*/ 5, /*L*/ 5, /*M*/ 7, /*N*/ 7, /*O*/ 6, /*P*/ 5,
/*Q*/ 6, /*R*/ 5, /*S*/ 5, /*T*/ 5, /*U*/ 5, /*V*/ 5, /*W*/ 7, /*X*/ 6, /*Y*/ 5, /*Z*/ 5, /*[*/ 0, /*\\*/ 0, /*]*/ 0, /*^*/ 7, /*_*/ 0, /*`*/ 0,
/*a*/ 5, /*b*/ 4, /*c*/ 4, /*d*/ 4, /*e*/ 4, /*f*/ 5, /*g*/ 5, /*h*/ 4, /*i*/ 3, /*j*/ 4, /*k*/ 3, /*l*/ 2, /*m*/ 6, /*n*/ 4, /*o*/ 4, /*p*/ 4,
/*q*/ 5, /*r*/ 4, /*s*/ 4, /*t*/ 4, /*u*/ 4, /*v*/ 4, /*w*/ 7, /*x*/ 5, /*y*/ 4, /*z*/ 5, /*~*/ 6,
};
const u16 small_font_offsets_vanilla[] = {
/*!*/ 0, /*"*/ 8, /*#*/ 16, /*$*/ 24, /*%*/ 32, /*&*/ 40, /*'*/ 48, /*(*/ 56, /*)*/ 64, /***/ 72, /*+*/ 80, /*,*/ 88, /*-*/ 96, /*.*/ 104, /*/*/ 112,
/*0*/ 120, /*1*/ 128, /*2*/ 136, /*3*/ 144, /*4*/ 152, /*5*/ 160, /*6*/ 168, /*7*/ 176, /*8*/ 184, /*9*/ 192, /*:*/ 200, /*;*/ 208, /*<*/ 216, /*=*/ 216,
/*>*/ 0, /*?*/ 216, /*@*/ 0, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
/*L*/ 312, /*M*/ 320, /*N*/ 328, /*O*/ 336, /*P*/ 344, /*Q*/ 352, /*R*/ 360, /*S*/ 368, /*T*/ 376, /*U*/ 384, /*V*/ 392, /*W*/ 400, /*X*/ 408, /*Y*/ 416,
/*Z*/ 424, /*[*/ 432, /*\*/ 432, /*]*/ 432, /*^*/ 432, /*_*/ 440, /*`*/ 440, /*a*/ 440, /*b*/ 448, /*c*/ 456, /*d*/ 464, /*e*/ 472, /*f*/ 480, /*g*/ 488,
/*h*/ 496, /*i*/ 504, /*j*/ 512, /*k*/ 520, /*l*/ 528, /*m*/ 536, /*n*/ 544, /*o*/ 552, /*p*/ 560, /*q*/ 568, /*r*/ 576, /*s*/ 584, /*t*/ 592, /*u*/ 600,
/*v*/ 608, /*w*/ 616, /*x*/ 624, /*y*/ 632, /*z*/ 640, /*{*/ 648, /*|*/ 648, /*}*/ 648, /*~*/ 648, /*:)*/ 656
};
const struct PPTextFont sPPFont_default = {
small_font_default,
small_font_kerning_default,
small_font_offsets_default,
NULL,
G_IM_FMT_I, G_IM_SIZ_4b,
672, 12,
8, 12
};
const struct PPTextFont sPPFont_outline = {
small_font_outline,
small_font_kerning_outline,
small_font_offsets_outline,
NULL,
G_IM_FMT_IA, G_IM_SIZ_4b,
672, 12,
8, 12
};
const struct PPTextFont sPPFont_plain = {
small_font_plain,
small_font_kerning_plain,
small_font_offsets_plain,
NULL,
G_IM_FMT_I, G_IM_SIZ_4b,
672, 12,
8, 12
};
const struct PPTextFont sPPFont_vanilla = {
small_font_vanilla,
small_font_kerning_vanilla,
small_font_offsets_vanilla,
NULL,
G_IM_FMT_I, G_IM_SIZ_4b,
672, 12,
8, 12
};
const struct PPTextFont *const gPuppyPrintFontTable[] = {
&sPPFont_default, &sPPFont_outline, &sPPFont_plain, &sPPFont_vanilla
};
const Texture *const puppyprint_font_lut[] = {
small_font_default, small_font_outline, small_font_plain, small_font_vanilla
};
const u8 *const puppyprint_kerning_lut[][95] = {
small_font_kerning_default, small_font_kerning_outline, small_font_kerning_plain, small_font_kerning_vanilla
const u8 *const puppyprint_kerning_lut[2][80] = {
small_font_kerning_1, small_font_kerning_2
};
#endif
@@ -2328,23 +2216,6 @@ const Gfx dl_rgba16_text_end[] = {
gsSPEndDisplayList(),
};
const Gfx dl_shade_screen_begin[] = {
gsDPPipeSync(),
gsDPSetRenderMode(G_RM_CLD_SURF, G_RM_CLD_SURF2),
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPSetPrimColor(0, 0, 0, 0, 0, 127),
gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PRIMITIVE),
gsSPEndDisplayList(),
};
const Gfx dl_shade_screen_end[] = {
gsDPPipeSync(),
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
gsDPSetPrimColor(0, 0, 255, 255, 255, 255),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPEndDisplayList(),
};
// 0x0200EDA8 - 0x0200EDE8
static const Vtx vertex_text_bg_box[] = {
{{{ 0, -80, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
@@ -2882,7 +2753,6 @@ const Gfx dl_waterbox_rgba16_begin[] = {
gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA),
gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsSPClipRatio(FRUSTRATIO_1),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, (G_TX_WRAP | G_TX_NOMIRROR), 5, G_TX_NOLOD, (G_TX_WRAP | G_TX_NOMIRROR), 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, ((32 - 1) << G_TEXTURE_IMAGE_FRAC), ((32 - 1) << G_TEXTURE_IMAGE_FRAC)),
@@ -2895,7 +2765,6 @@ const Gfx dl_waterbox_ia16_begin[] = {
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsSPClipRatio(FRUSTRATIO_1),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, (G_TX_WRAP | G_TX_NOMIRROR), 5, G_TX_NOLOD, (G_TX_WRAP | G_TX_NOMIRROR), 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, ((32 - 1) << G_TEXTURE_IMAGE_FRAC), ((32 - 1) << G_TEXTURE_IMAGE_FRAC)),
@@ -2905,7 +2774,6 @@ const Gfx dl_waterbox_ia16_begin[] = {
// 0x02014810 - 0x02014838
const Gfx dl_waterbox_end[] = {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsSPClipRatio(FRUSTRATIO_2),
gsDPPipeSync(),
gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),

View File

@@ -403,8 +403,8 @@ const BehaviorScript bhvStarDoor[] = {
SET_INT(oIntangibleTimer, 0),
BEGIN_LOOP(),
CALL_NATIVE(bhv_star_door_loop),
CALL_NATIVE(load_object_collision_model),
CALL_NATIVE(bhv_door_rendering_loop),
CALL_NATIVE(load_object_collision_model),
END_LOOP(),
};
@@ -1679,9 +1679,9 @@ const BehaviorScript bhvWfSolidTowerPlatform[] = {
BEGIN(OBJ_LIST_SURFACE),
OR_INT(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
LOAD_COLLISION_DATA(wf_seg7_collision_platform),
CALL_NATIVE(load_object_static_model),
BEGIN_LOOP(),
CALL_NATIVE(bhv_wf_solid_tower_platform_loop),
CALL_NATIVE(load_object_collision_model),
END_LOOP(),
};
@@ -2626,7 +2626,6 @@ const BehaviorScript bhvExclamationBox[] = {
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
SET_FLOAT(oCollisionDistance, 300),
SET_HOME(),
CALL_NATIVE(bhv_init_room),
BEGIN_LOOP(),
CALL_NATIVE(bhv_exclamation_box_loop),
END_LOOP(),
@@ -3773,7 +3772,6 @@ const BehaviorScript bhvMessagePanel[] = {
DROP_TO_FLOOR(),
SET_HITBOX(/*Radius*/ 150, /*Height*/ 80),
SET_INT(oWoodenPostTotalMarioAngle, 0),
CALL_NATIVE(bhv_init_room),
CALL_NATIVE(load_object_static_model),
BEGIN_LOOP(),
SET_INT(oIntangibleTimer, 0),
@@ -4581,7 +4579,6 @@ const BehaviorScript bhvRedCoin[] = {
const BehaviorScript bhvBowserCourseRedCoinStar[] = {
BEGIN(OBJ_LIST_LEVEL),
OR_INT(oFlags, (OBJ_FLAG_PERSISTENT_RESPAWN | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
CALL_NATIVE(bhv_bowser_course_red_coin_star_init),
BEGIN_LOOP(),
CALL_NATIVE(bhv_bowser_course_red_coin_star_loop),
END_LOOP(),
@@ -4863,6 +4860,7 @@ const BehaviorScript bhvOrangeNumber[] = {
BEGIN(OBJ_LIST_LEVEL),
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
BILLBOARD(),
SET_HOME(),
CALL_NATIVE(bhv_orange_number_init),
BEGIN_LOOP(),
CALL_NATIVE(bhv_orange_number_loop),
@@ -5602,7 +5600,6 @@ const BehaviorScript bhvActivatedBackAndForthPlatform[] = {
const BehaviorScript bhvRecoveryHeart[] = {
BEGIN(OBJ_LIST_LEVEL),
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
CALL_NATIVE(bhv_init_room),
BEGIN_LOOP(),
CALL_NATIVE(bhv_recovery_heart_loop),
END_LOOP(),

View File

@@ -1,29 +0,0 @@
#include "game/puppycam2.h"
///This is the bit that defines where the angles happen. They're basically environment boxes that dictate camera behaviour.
///Permaswap is a boolean that simply determines wether or not when the camera changes at this point it stays changed. 0 means it resets when you leave, and 1 means it stays changed.
///The camera position fields accept "32767" as an ignore flag.
///The script supports anything that does not take an argument. It's reccomended to keep the scripts in puppycam_scripts.inc.c for the sake of cleanliness.
///If you do not wish to use a script in the angle, then just leave the field as 0.
// #define PUPPYCAM_SAMPLES
struct newcam_hardpos newcam_fixedcam[] =
{
#ifdef PUPPYCAM_SAMPLES
// Example Scripts
{/*Level ID*/ 16,/*Area ID*/ 1,/*Permaswap*/ 0,/*Mode*/ NC_MODE_FIXED_NOMOVE,/*Script*/ 0, //Standard params.
/*X begin*/ -540,/*Y begin*/ 800,/*Z begin*/ -3500, //Where the activation box begins
/*X end*/ 540,/*Y end*/ 2000,/*Z end*/ -1500, //Where the activation box ends.
/*Cam X*/ 0,/*Cam Y*/ 1500,/*Cam Z*/ -1000, //The position the camera gets placed for NC_MODE_FIXED and NC_MODE_FIXED_NOMOVE
/*Look X*/ 0,/*Look Y*/ 800,/*Look Z*/ -2500}, //The position the camera looks at for NC_MODE_FIXED_NOMOVE
///Another example angle. This activates a script that slowly rotates the camera around the area.
{/*Level ID*/ 16,/*Area ID*/ 1,/*Permaswap*/ 0,/*Mode*/ NC_MODE_NOROTATE,/*Script*/ 0, //Standard params.
/*X begin*/ 5716,/*Y begin*/ 400,/*Z begin*/ -859, //Where the activation box begins
/*X end*/ 6908,/*Y end*/ 1000,/*Z end*/ 62, //Where the activation box ends.
/*Cam X*/ 32767,/*Cam Y*/ 32767,/*Cam Z*/ 32767, //The position the camera gets placed for NC_MODE_FIXED and NC_MODE_FIXED_NOMOVE
/*Look X*/ 32767,/*Look Y*/ 32767,/*Look Z*/ 32767}, //The position the camera looks at for NC_MODE_FIXED_NOMOVE
#endif
};

View File

@@ -14,22 +14,6 @@
*/
// #define JP_RED_COIN_SOUND
/**
* In vanilla, Mario's sounds are pitch shifted in real time in order to maintain a sense of consistency. This can be annoying when replacing Mario's sounds.
* This define will disable this behavior, making sound replacements easier to manage. Use of this is not recommended unless you're actually replacing Mario's sounds.
* When toggling this define, you will need to run `make clean` for it to apply.
*/
// #define DISABLE_MARIO_PITCH_SHIFTING
/**
* Enables the additional spacial processing that takes place with sound effects in vanilla.
* SM64's implementation of this isn't the best, which causes some sounds like the waterfall in castle grounds to sound more unpleasant than necessary.
* This is not the same thing as enabling stereo audio, but it does represent the sole differences between the Stereo and Headset sound options.
* Because of this, the Headset sound option will also not appear in the file select menu with this disabled.
* Leaving this disabled may also be slightly beneficial for CPU performance.
*/
// #define ENABLE_STEREO_HEADSET_EFFECTS
/**
* Increase audio heap size to allow for larger/more custom sequences/banks/sfx to be imported without causing issues (not supported for SH).
* Note that this is REQUIRED in order to use the extended 0C audio bank. Do not disable this if you're planning on using it.
@@ -47,6 +31,6 @@
/**
* Uses a much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general.
* Reverb presets can be configured in audio/data.c to meet desired aesthetic/performance needs. More detailed usage info can also be found on the HackerSM64 Wiki page.
* Reverb parameters can be configured in audio/synthesis.c to meet desired aesthetic/performance needs. Currently US/JP only. Hurts emulator and console performance.
*/
// #define BETTER_REVERB

View File

@@ -9,9 +9,3 @@
* Currently this just starts the credits, and enables PUPPYPRINT_DEBUG.
*/
// #define ENABLE_CREDITS_BENCHMARK
#ifdef ENABLE_CREDITS_BENCHMARK
#define DEBUG_ALL
#define ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
#define TEST_LEVEL LEVEL_CASTLE_GROUNDS
#endif

View File

@@ -17,7 +17,6 @@
/**
* Allows all surfaces types to have force, (doesn't require setting force, just allows it to be optional).
* Also allows you to pass a warp node to warp floors (SURFACE_WARP, SURFACE_DEATH_PLANE, SURFACE_VERTICAL_WIND) via the second byte of the force parameter.
*/
#define ALL_SURFACES_HAVE_FORCE

View File

@@ -12,21 +12,26 @@
/**
* Disables all debug options (except PUPPYPRINT).
*/
// #define DISABLE_ALL
#define DISABLE_ALL
/**
* Enables a comprehensive standalone profiler. Automatically enabled by PUPPYPRINT_DEBUG.
* If not using PUPPYPRINT_DEBUG, press L + D-Pad Up to toggle the profiler.
* If not using PUPPYPRINT_DEBUG, press L to toggle the profiler.
*/
#define USE_PROFILER
/**
* -- TEST LEVEL --
* Uncomment this define and set a test level in order to boot straight into said level.
* This allows you to quickly test the level you're working on.
* If you want the game to boot normally, just comment out the define again.
* -- DEBUG STARTUP SPAWN PARAMETERS --
* Sets a level in order to boot straight into said level, skipping the title screen and file select.
* This allows you to quickly test the level or location you're working on.
* NOTE: STARTUP_SPAWN_LEVEL is required for the other parameters to have an effect.
* NOTE: It is recommended to set STARTUP_SPAWN_POS in addition to STARTUP_SPAWN_AREA, otherwise the default position may be out of bounds.
* NOTE: STARTUP_SPAWN_ANGLE is an s16 angle.
*/
// #define TEST_LEVEL LEVEL_BOB
// #define STARTUP_SPAWN_LEVEL LEVEL_BOB
// #define STARTUP_SPAWN_AREA 1
// #define STARTUP_SPAWN_POS 0, 0, 0
// #define STARTUP_SPAWN_ANGLE 0x0
/**
* Enables debug level select. Hold L while the game boots to turn it on.
@@ -41,7 +46,7 @@
/**
* Enables a custom, enhanced performance profiler. (Enables PUPPYPRINT by default in config_safeguards).
*/
// #define PUPPYPRINT_DEBUG
// #define PUPPYPRINT_DEBUG 1
/**
* Uses cycles instead of microseconds in Puppyprint debug output.

View File

@@ -6,6 +6,7 @@
/**
* Enables some mechanics that change behavior depending on hardcoded level numbers.
* You may also need to change sLevelsWithRooms in object_helpers.c.
* TODO: separate this into separate defines, behavior params, or make these mechanics otherwise dynamic.
*/
// #define ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS

View File

@@ -123,6 +123,11 @@
*/
// #define FIX_REFLECT_MTX
/**
* This improves performance a bit, and does not seem to break anything.
*/
#define DISABLE_GRAPH_NODE_TYPE_FUNCTIONAL
/**
* Disables all object shadows. You'll probably only want this either as a last resort for performance or if you're making a super stylized hack.
*/
@@ -133,20 +138,3 @@
* NOTE: When this is enabled, The 49th hardcoded rectangle shadow will act as a regular circular shadow, due to Mario's shadow ID being 99 in vanilla.
*/
#define LEGACY_SHADOW_IDS
/**
* Limits the horizontal fov on emulator like on console. May break viewport widescreen hacks.
*/
//#define HORIZONTAL_CULLING_ON_EMULATOR
/**
* Makes objects bellow the screen be culled.
*/
#define VERTICAL_CULLING
/**
* If the first command of an object´s geolayout is not GEO_CULLING_RADIUS, DEFAULT_CULLING_RADIUS
* will be used instead.
*/
#define DEFAULT_CULLING_RADIUS 300

View File

@@ -17,13 +17,7 @@
#define EXIT_COURSE_WHILE_MOVING
/**
* Decides whether to treat exiting course as if the player had died.
* If enabled, the player will get warped to the failure warp node when selecting EXIT COURSE. (Has no effect if you disable Exit Course)
*/
// #define DEATH_ON_EXIT_COURSE
/**
* Decides which level, area and warp ID the "Exit Course" option takes you to (has no effect if you disable Exit Course or enable DEATH_ON_EXIT_COURSE).
* Decides which level, area and warp ID the "Exit Course" option takes you to (has no effect if you disable Exit Course).
* Ensure that the warp exists, or else the game will crash.
*/
#define EXIT_COURSE_LEVEL LEVEL_CASTLE

View File

@@ -108,15 +108,20 @@
*/
#define HANGING_FIX
/**
* The last frame after hitting a wall that will be considered a firsty when wallkicking.
*/
#define FIRSTY_LAST_FRAME 1
/**
* The maximum angle the player can wall kick, in degrees. 0..90. To allow 45 degree wall kicks, you must supply `46` to allow 45 and under.
*/
#define WALL_KICK_DEGREES 45
/**
* Makes Mario unable to ledge grab steep slopes to prevent false ledge grabs.
* This is vanilla behavior, disable it to allow ledge grabbing regardless of floor pitch.
*/
#define DONT_LEDGE_GRAB_STEEP_SLOPES
// #define LEDGE_GRABS_CHECK_SLOPE_ANGLE
/**
* Disables BLJs and crushes SimpleFlips's dreams.

Some files were not shown because too many files have changed in this diff Show More