Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant and unused microcodes + their supporting code (S2DEX2 and HVQM) #789

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
82e0fdf
Update libpl
mpharoah Mar 6, 2024
7353db5
Merge pull request #774 from mpharoah/mpharoah/update-libpl
mpharoah Mar 6, 2024
ca937d2
Label unlabelled audio func (func_80321080 to stop_secondary_music) (…
Reonu Apr 15, 2024
2ae3426
Change compression type to yay0 and ignore .inc.c files in most direc…
gheskett Apr 21, 2024
f852ff4
Platform Displacement 2.1 (#776)
arthurtilly Apr 21, 2024
e494069
Add support for a user-defined config_local.h file (#785)
gheskett Apr 22, 2024
0005bbb
Save up to 130KB of RAM at literally zero cost (#786)
arthurtilly Apr 22, 2024
d12b4b7
Remove redundant microcode options
Apr 23, 2024
c8819a3
Update descriptions
Apr 23, 2024
7879119
Remove rsp/
Apr 23, 2024
6135347
Remove EX and EX2 PosLight grucode source
Apr 23, 2024
058a3d3
Remove microcodes with dedicated folders
Apr 23, 2024
3d05fde
Oops I forgot about f3dex2
Apr 23, 2024
4cda81e
ditto
Apr 23, 2024
53672dd
Remove n_aspMain.o
Apr 23, 2024
c1d1623
Remove xbus variants and use microcode binaries
Apr 23, 2024
e3daab9
Restore F3DEX2 Rej
Apr 23, 2024
e956687
adjust rsptext/data to match
Apr 23, 2024
4b4fd01
Remove PosLight from naming
Apr 23, 2024
96234de
Remove S2DEX2 engine
Apr 23, 2024
db59178
Remove HQVM
Apr 23, 2024
df00d1a
Remove HVQM and S2DEX2 Makefile options
Apr 23, 2024
7620311
Remove rsp.old
Apr 23, 2024
e97e49f
Remove S2DEX2/HVQM from README.md
Apr 23, 2024
1ceee60
Remove game code references to S2DEX and HVQM
Apr 23, 2024
8b0fe22
Remove more S2DEX2 and HVQM references
Apr 23, 2024
9a97c57
Remove hqvm from include/
Apr 23, 2024
c9bae5e
Remove useless hvqm threads that I missed
Apr 24, 2024
b1f1c97
Clean up game_init.c
Apr 24, 2024
8d4f3af
remove tab
Apr 24, 2024
8686d33
dont talk about it
Apr 25, 2024
a66818b
Dont talk about this either
Apr 25, 2024
1957e0a
Remove hvqm segment
Apr 25, 2024
2b39ab1
Merge branch 'develop/2.3.0' into ucode
mountainflaw Apr 25, 2024
0e68c15
rtc
Apr 25, 2024
82d88c6
Remove redundant microcode options
Apr 23, 2024
27fa6f2
Update descriptions
Apr 23, 2024
1f86f53
Remove rsp/
Apr 23, 2024
805d00c
Remove EX and EX2 PosLight grucode source
Apr 23, 2024
602bf8a
Remove microcodes with dedicated folders
Apr 23, 2024
9d8da10
Oops I forgot about f3dex2
Apr 23, 2024
7d69ef2
ditto
Apr 23, 2024
4ba88c5
Remove n_aspMain.o
Apr 23, 2024
8b985ca
Remove xbus variants and use microcode binaries
Apr 23, 2024
b1bf36a
Restore F3DEX2 Rej
Apr 23, 2024
dc1d059
adjust rsptext/data to match
Apr 23, 2024
ad8f723
Remove PosLight from naming
Apr 23, 2024
1c7350b
Remove S2DEX2 engine
Apr 23, 2024
29b37a7
Remove HQVM
Apr 23, 2024
71104c3
Remove HVQM and S2DEX2 Makefile options
Apr 23, 2024
a41657d
Remove rsp.old
Apr 23, 2024
906e0b3
Remove S2DEX2/HVQM from README.md
Apr 23, 2024
b3fda0b
Remove game code references to S2DEX and HVQM
Apr 23, 2024
c7c27e4
Remove more S2DEX2 and HVQM references
Apr 23, 2024
6bf0e11
Remove hqvm from include/
Apr 23, 2024
2762868
Remove useless hvqm threads that I missed
Apr 24, 2024
f4bea26
Clean up game_init.c
Apr 24, 2024
44846e0
remove tab
Apr 24, 2024
3374063
dont talk about it
Apr 25, 2024
ad774d1
Dont talk about this either
Apr 25, 2024
59d93d8
Remove hvqm segment
Apr 25, 2024
d22731e
Update libpl
mpharoah Mar 6, 2024
65ddc0a
Label unlabelled audio func (func_80321080 to stop_secondary_music) (…
Reonu Apr 15, 2024
e3d2bfa
Change compression type to yay0 and ignore .inc.c files in most direc…
gheskett Apr 21, 2024
aa1e3c2
Platform Displacement 2.1 (#776)
arthurtilly Apr 21, 2024
51f9091
Add support for a user-defined config_local.h file (#785)
gheskett Apr 22, 2024
7c3bb1d
Save up to 130KB of RAM at literally zero cost (#786)
arthurtilly Apr 22, 2024
0866df4
Merge branch 'ucode' of https://github.com/mountainflaw/hacker_rgfx i…
Jun 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2149,3 +2149,6 @@ lib/libs2d_engine.a

# :Zone_Identifier files
*Zone.Identifier

# user-specific config file
include/config/config_local.h
54 changes: 11 additions & 43 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,42 +94,19 @@ DEBUG_MAP_STACKTRACE_FLAG := -D DEBUG_MAP_STACKTRACE

TARGET := sm64

# GRUCODE - selects which RSP graphics microcode to use.
# f3dex - Upgraded version of the Fast3D microcode.
# f3dzex - newer, experimental microcode used in Majora's Mask

# GRUCODE - selects which RSP microcode to use.
# f3dex -
# f3dex2 -
# l3dex2 - F3DEX2 version that only renders in wireframe
# f3dzex - newer, experimental microcode used in Animal Crossing
# super3d - extremely experimental version of Fast3D lacking many features for speed
GRUCODE ?= f3dzex
$(eval $(call validate-option,GRUCODE,f3dex f3dex2 f3dex2pl f3dzex super3d l3dex2))
$(eval $(call validate-option,GRUCODE,f3dex f3dzex))

ifeq ($(GRUCODE),f3dex) # Fast3DEX
DEFINES += F3DEX_GBI=1 F3DEX_GBI_SHARED=1
else ifeq ($(GRUCODE),f3dex2) # Fast3DEX2
DEFINES += F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
else ifeq ($(GRUCODE),l3dex2) # Line3DEX2
DEFINES += L3DEX2_GBI=1 L3DEX2_ALONE=1 F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
else ifeq ($(GRUCODE),f3dex2pl) # Fast3DEX2_PosLight
DEFINES += F3DEX2PL_GBI=1 F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
else ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.08J / Animal Forest - Dōbutsu no Mori)
else ifeq ($(GRUCODE),f3dzex) # Fast3DZEX 2 (Majora's Mask)
DEFINES += F3DZEX_NON_GBI_2=1 F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
else ifeq ($(GRUCODE),super3d) # Super3D
$(warning Super3D is experimental. Try at your own risk.)
DEFINES += SUPER3D_GBI=1 F3D_NEW=1
endif

# 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
endif
# add more text engines here

#==============================================================================#
# Optimization flags #
#==============================================================================#
Expand Down Expand Up @@ -243,16 +220,6 @@ else
DEFINES += _FINALROM=1 NDEBUG=1 OVERWRITE_OSPRINT=0
endif

# HVQM - whether to use HVQM fmv library
# 1 - includes code in ROM
# 0 - does not
HVQM ?= 0
$(eval $(call validate-option,HVQM,0 1))
ifeq ($(HVQM),1)
DEFINES += HVQM=1
SRC_DIRS += src/hvqm
endif

# LIBPL - whether to include libpl library for interfacing with Parallel Launcher
# (library will be pulled into repo after building with this enabled for the first time)
# 1 - includes code in ROM
Expand All @@ -269,7 +236,7 @@ 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
Expand Down Expand Up @@ -399,6 +366,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/*)
Expand All @@ -418,7 +388,6 @@ O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
$(foreach file,$(CPP_FILES),$(BUILD_DIR)/$(file:.cpp=.o)) \
$(foreach file,$(S_FILES),$(BUILD_DIR)/$(file:.s=.o)) \
$(foreach file,$(GENERATED_C_FILES),$(file:.c=.o)) \
lib/PR/hvqm/hvqm2sp1.o lib/PR/hvqm/hvqm2sp2.o

LIBZ_O_FILES := $(foreach file,$(LIBZ_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
GODDARD_O_FILES := $(foreach file,$(GODDARD_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
Expand Down Expand Up @@ -447,7 +416,7 @@ else
$(error Unable to detect a suitable MIPS toolchain installed)
endif

LIBRARIES := nustd hvqm2 z goddard
LIBRARIES := nustd z goddard

LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))

Expand Down Expand Up @@ -631,7 +600,6 @@ patch: $(ROM)
$(BUILD_DIR)/asm/ipl3.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
$(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/sequences.bin $(SOUND_BIN_DIR)/bank_sets
$(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h

Expand Down Expand Up @@ -913,7 +881,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))))
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
- Instant Input patch by Wiseguy (Removes all input lag caused by plugins supporting framebuffer)
- This means that you'll have to do your framebuffer effects on buffer 0 for emulator, but NOT for console. You can use the `gEmulator` variable to check for console when doing your framebuffer effects.
- Widescreen (16:9) support toggleable by pressing `L` in the pause menu. *
- S2DEX engine by someone2639! To use it, compile with `make TEXT_ENGINE=s2dex_text_engine` or just set `TEXT_ENGINE` to `s2dex_text_engine` in the makefile.
- ia8 (64x64) coins, the vanilla coin texture is upgraded to accomodate. *
- ia8 (64x64) 30 FPS coins (Textures by InTheBeef, cleaned up by Arceveti). *
- Floombas! Simply just retextured goombas with customizable behaviors (does not overwrite standard goombas). *
Expand Down Expand Up @@ -137,7 +136,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
This does mean that any framebuffer effects will have to be done on buffer 0 if targeting emulators
- Automatic console and emulator detection: Use the `gEmulator` variable to wrap your code in an emulator check.
- Separate defines for emulator and console black border height.
- Getting HVQM FMV support to work with the game is WIP.

Requirements are the same as regular SM64, however a GCC MIPS cross compiler is also required. If you're on Debian-like Linux, you can use the ``gcc-mips-linux-gnu`` package. The toolchain that comes with my SDK is also supported.

Expand Down
5 changes: 0 additions & 5 deletions actors/group0.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,3 @@
#include "white_particle_small/model.inc.c"

#include "sparkle_animation/model.inc.c"

#ifdef S2DEX_TEXT_ENGINE
#include "src/s2d_engine/s2d_config.h"
#include FONT_C_FILE
#endif
8 changes: 2 additions & 6 deletions data/behavior_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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),
Expand Down
6 changes: 5 additions & 1 deletion include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions include/config/config_movement.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
122 changes: 0 additions & 122 deletions include/hvqm/HVQM2File.h

This file was deleted.

22 changes: 0 additions & 22 deletions include/hvqm/HVQmd.h

This file was deleted.

33 changes: 0 additions & 33 deletions include/hvqm/adpcmdec.h

This file was deleted.

Loading