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

Add Richter PSP overlay #2278

Merged
merged 3 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions Makefile.psp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Servant OVL options: tt_000 tt_001 tt_002 tt_003 tt_004 tt_005 tt_006

VERSION_PREFIX := PSP_EU
PSP_EU_GAME := dra
PSP_EU_GAME := dra ric
PSP_EU_STAGES := lib no4 st0 wrp
PSP_EU_STAGES +=
PSP_EU_BOSSES :=
Expand Down Expand Up @@ -54,6 +54,7 @@ $(MWCCGAP_APP):
git submodule update $(MWCCGAP_DIR)

dra_psp: $(BUILD_DIR)/dra.bin
ric_psp: $(BUILD_DIR)/ric.bin
stlib_psp: $(BUILD_DIR)/lib.bin
stno4_psp: $(BUILD_DIR)/no4.bin
stst0_psp: $(BUILD_DIR)/st0.bin
Expand All @@ -73,15 +74,21 @@ $(BUILD_DIR)/wrp.bin: $(BUILD_DIR)/stwrp.elf

$(BUILD_DIR)/dra.ld: $(CONFIG_DIR)/splat.pspeu.dra.yaml $(BASE_SYMBOLS) $(CONFIG_DIR)/symbols.pspeu.dra.txt
$(SPLAT) $<
$(BUILD_DIR)/ric.ld: $(CONFIG_DIR)/splat.pspeu.ric.yaml $(BASE_SYMBOLS) $(CONFIG_DIR)/symbols.pspeu.ric.txt
$(SPLAT) $<
$(BUILD_DIR)/st%.ld: $(CONFIG_DIR)/splat.pspeu.st%.yaml $(BASE_SYMBOLS) $(CONFIG_DIR)/symbols.pspeu.st%.txt
$(SPLAT) $<
$(BUILD_DIR)/tt_%.ld: $(CONFIG_DIR)/splat.pspeu.tt_%.yaml $(BASE_SYMBOLS) $(CONFIG_DIR)/symbols.pspeu.tt_%.txt
$(SPLAT) $<

ST_DRA_MERGE = 624DC 628AC 6BF64 alu_anim 6DF70 6E42C 6FDF8 704D0 7879C 7E4BC 84B88 8A0A4

$(BUILD_DIR)/dra.elf: $(BUILD_DIR)/dra.ld $(addprefix $(BUILD_DIR)/src/dra/,$(addsuffix .c.o,$(ST_DRA_MERGE))) $$(call list_o_files_psp,dra_psp)
$(call link_with_deadstrip,dra,$@)

RIC_MERGE =
$(BUILD_DIR)/ric.elf: $(BUILD_DIR)/ric.ld $(addprefix $(BUILD_DIR)/src/ric_psp/,$(addsuffix .c.o,$(RIC_MERGE))) $$(call list_o_files_psp,ric_psp) $(BUILD_DIR)/assets/ric/mwo_header.bin.o
$(call link_with_deadstrip,ric,$@)

$(BUILD_DIR)/tt_%.elf: $(BUILD_DIR)/tt_%.ld $$(call list_o_files_psp,servant/tt_$$*) $(BUILD_DIR)/assets/servant/tt_%/mwo_header.bin.o
$(call link_with_deadstrip,tt_$*,$@)

Expand Down
1 change: 1 addition & 0 deletions config/check.pspeu.sha
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
2ba697c152e240ee0d69619f4a460d145fae04c0 build/pspeu/dra.bin
9fd233b8334468c1c750547d0b772a8d58357f8c build/pspeu/ric.bin
f45dd42ccb88a374491c7c38c19cc80c1cd936ad build/pspeu/lib.bin
769a78f5c964dd8ff29754c346bbf5857ae67558 build/pspeu/no4.bin
c8c34ac1d46b31e2e5336df271aa2409f44c9d01 build/pspeu/tt_000.bin
Expand Down
54 changes: 54 additions & 0 deletions config/splat.pspeu.ric.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
options:
platform: psp
basename: ric
base_path: ..
build_path: build/pspeu
target_path: disks/pspeu/PSP_GAME/USRDIR/res/ps/PSPBIN/ric.bin
asm_path: asm/pspeu/ric_psp
asset_path: assets/ric
src_path: src/ric_psp
ld_script_path: build/pspeu/ric.ld
compiler: GCC
symbol_addrs_path:
- config/symbols.pspeu.txt
- config/symbols.pspeu.ric.txt
undefined_funcs_auto_path: config/undefined_funcs_auto.pspeu.ric.txt
undefined_syms_auto_path: config/undefined_syms_auto.pspeu.ric.txt
find_file_boundaries: true
use_legacy_include_asm: false
migrate_rodata_to_functions: true
asm_jtbl_label_macro: jlabel
symbol_name_format: pspeu_$VRAM
section_order:
- .text
- .data
- .rodata
- .bss
ld_bss_is_noload: true
disasm_unknown: true
disassemble_all: true
global_vram_start: 0x8000000
asm_inc_header: |
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
sha1: 9fd233b8334468c1c750547d0b772a8d58357f8c
segments:
- [0x0, bin, mwo_header]
- name: ric
type: code
start: 0x80
vram: 0x092A6280
bss_size: 0x1F80
align: 128
subalign: 8
subsegments:
- [0x80, c, 80]
- [0x90, c, 90]
- [0x410, c, 410]
- [0x4B60, c, 4B60]
- [0x6DB0, c, 6DB0]
- [0x28400, data]
- [0x30100, .rodata, 410]
- [0x30158, .rodata, 6DB0]
- {type: bss, vram: 0x92D6600}
- [0x30400]
124 changes: 124 additions & 0 deletions config/symbols.pspeu.ric.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
RicDebugEnter = 0x092A6290;
RicDebugExit = 0x092A62D8;
RicDebug = 0x092A6328;
func_80158B04 = 0x092A6610;
RicHandleStand = 0x092A6728;
RicHandleWalk = 0x092A6AF8;
RicHandleRun = 0x092A6B80;
RicHandleJump = 0x092A6C80;
RicHandleFall = 0x092A7340;
RicHandleCrouch = 0x092A73E8;
func_80159BC8 = 0x092A79F0;
func_80159C04 = 0x092A7A38;
RicHandleHit = 0x092A7B98;
RicHandleBossGrab = 0x092A8AD8;
RicHandleDead = 0x092A8D28;
RicHandleStandInAir = 0x092A94A0;
RicHandleEnableFlameWhip = 0x092A9560;
RicHandleHydrostorm = 0x092A9670;
RicHandleGenericSubwpnCrash = 0x092A96D8;
RicHandleThrowDaggers = 0x092A9738;
RicHandleDeadPrologue = 0x092A9840;
RicHandleSlide = 0x092A9EA0;
func_8015BB80 = 0x092AA248;
func_8015BCD0 = 0x092AA388;
RicHandleSlideKick = 0x092AA678;
RicHandleBladeDash = 0x092AA9F8;
RicHandleHighJump = 0x092AAB48;
RicEntitySubwpnAxe = 0x092AAD60;
RicEntityCrashAxe = 0x092AB7A8;
RicEntitySubwpnDagger = 0x092AC2A8;
DestroyEntity = 0x092ACF18;
GetTeleportToOtherCastle = 0x092ACFB0;
func_80156DE4 = 0x092AD108;
RicInit = 0x092AD298;
CheckStageCollision = 0x092AD730;
RicMain = 0x092AE368;
func_8015CC70 = 0x092AF450;
RicSetCrouch = 0x092AF4D0;
RicSetStand = 0x092AF5A8;
RicSetWalk = 0x092AF680;
RicSetFall = 0x092AF738;
RicSetJump = 0x092AF898;
RicDoCrash = 0x092B00F0;
RicSetDeadPrologue = 0x092B0580;
func_8015C4AC = 0x092B07A8;
RicSetStep = 0x092B0E38;
RicSetAnimation = 0x092B0E60;
RicDecelerateX = 0x092B0EA0;
RicCheckFacing = 0x092B0F40;
RicSetSpeedX = 0x092B1038;
func_8015CAAC = 0x092B1088;
RicSetInvincibilityFrames = 0x092B10D0;
DisableAfterImage = 0x092B1178;
func_8015CC28 = 0x092B1238;
RicCheckInput = 0x092B1270;
RicGetPlayerSensor = 0x092B1C60;
ReboundStoneBounce1 = 0x092B3468;
ReboundStoneBounce2 = 0x092B34F0;
RicEntitySubwpnReboundStone = 0x092B3578;
RicEntitySubwpnThrownVibhuti = 0x092B4030;
RicEntitySubwpnAgunea = 0x092B4758;
RicEntityAguneaHitEnemy = 0x092B4DE0;
RicEntityVibhutiCrashCloud = 0x092B5790;
RicEntityCrashVibhuti = 0x092B59F0;
RicEntityCrashReboundStoneParticles = 0x092B5EF8;
func_8016D9C4 = 0x092B5FC8;
RicEntityCrashReboundStoneExplosion = 0x092B6718;
RicEntityCrashReboundStone = 0x092B6C58;
RicEntityCrashBibleBeam = 0x092B6DD8;
RicEntityCrashBible = 0x092B7530;
func_8016F198 = 0x092B7FF8;
RicEntityCrashStopwatchDoneSparkle = 0x092B8978;
RicEntityStopwatchCrashLightning = 0x092BA148;
RicEntityCrashStopwatch = 0x092BA218;
RicEntityAguneaLightning = 0x092BA5F8;
RicEntityAguneaCircle = 0x092BAEE8;
RicEntitySubwpnStopwatchCircle = 0x092BB860;
RicEntitySubwpnStopwatch = 0x092BBD10;
RicEntitySubwpnBibleTrail = 0x092BDAC8;
RicEntitySubwpnBible = 0x092BDD88;
RicSetSubweaponParams = 0x092BE788;
RicEntityHitByHoly = 0x092BEC98;
RicEntityHitByDark = 0x092BF050;
RicEntityDummy = 0x092BF278;
RicUpdatePlayerEntities = 0x092BF288;
RicCreateEntFactoryFromEntity = 0x092BF628;
RicEntityFactory = 0x092BF718;
RicEntitySlideKick = 0x092BFDF0;
func_80160D2C = 0x092BFF48;
RicEntityBladeDash = 0x092C00B8;
func_80160F0C = 0x092C01C8;
RicEntitySmokePuff = 0x092C02B8;
RicEntityHitByCutBlood = 0x092C09D8;
func_80161C2C = 0x092C1478;
func_80161EF8 = 0x092C1868;
RicEntityApplyMariaPowerAnim = 0x092C19B8;
func_801623E0 = 0x092C1EF0;
func_80162604 = 0x092C2218;
RicEntityMariaPowers = 0x092C25A0;
RicEntityNotImplemented4 = 0x092C2B90;
RicEntityMaria = 0x092C2BA0;
RicEntityPlayerBlinkWhite = 0x092C2F50;
func_801641A0 = 0x092C4C00;
RicEntityShrinkingPowerUpRing = 0x092C4FF8;
RicEntityHitByIce = 0x092C5DD8;
RicEntityHitByLightning = 0x092C69A8;
RicEntityTeleport = 0x092C77D8;
RicEntityCrashCrossBeam = 0x092C8228;
RicEntityNotImplemented3 = 0x092C8D90;
func_80167A70 = 0x092C8DA0;
RicEntityCrashHydroStorm = 0x092C9480;
RicEntitySubwpnHolyWater = 0x092C9C98;
RicEntitySubwpnHolyWaterFlame = 0x092CA460;
RicEntityWhip = 0x092CAD68;
RicEntityArmBrandishWhip = 0x092CC700;
func_80167964 = 0x092CC930;
RicEntityNotImplemented1 = 0x092CCA78;
RicEntityNotImplemented2 = 0x092CCA88;
RicEntitySubwpnCrashCross = 0x092CCA98;
RicEntityRevivalColumn = 0x092CD120;
RicEntitySubwpnCross = 0x092CD528;
func_80169C10 = 0x092CDD08;
RicEntitySubwpnCrossTrail = 0x092CDF18;
RicEntitySubwpnCrashCrossParticles = 0x092CE170;
2 changes: 2 additions & 0 deletions config/symexport.pspeu.ric.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXTERN(_binary_assets_ric_mwo_header_bin_start);
EXTERN(func_pspeu_092C8D48)
51 changes: 51 additions & 0 deletions src/ric_psp/410.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "../ric/ric.h"
#include <player.h>

INCLUDE_ASM("ric_psp/nonmatchings/410", func_80158B04);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleStand);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleWalk);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleRun);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleJump);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleFall);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleCrouch);

INCLUDE_ASM("ric_psp/nonmatchings/410", func_80159BC8);

INCLUDE_ASM("ric_psp/nonmatchings/410", func_80159C04);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleHit);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleBossGrab);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleDead);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleStandInAir);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleEnableFlameWhip);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleHydrostorm);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleGenericSubwpnCrash);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleThrowDaggers);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleDeadPrologue);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleSlide);

INCLUDE_ASM("ric_psp/nonmatchings/410", func_8015BB80);

INCLUDE_ASM("ric_psp/nonmatchings/410", func_8015BCD0);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleSlideKick);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleBladeDash);

INCLUDE_ASM("ric_psp/nonmatchings/410", RicHandleHighJump);
13 changes: 13 additions & 0 deletions src/ric_psp/4B60.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "../ric/ric.h"
#include <player.h>

INCLUDE_ASM("ric_psp/nonmatchings/4B60", RicEntitySubwpnAxe);

INCLUDE_ASM("ric_psp/nonmatchings/4B60", RicEntityCrashAxe);

INCLUDE_ASM("ric_psp/nonmatchings/4B60", RicEntitySubwpnDagger);

INCLUDE_ASM("ric_psp/nonmatchings/4B60", func_pspeu_092ACE78);

INCLUDE_ASM("ric_psp/nonmatchings/4B60", DestroyEntity);
Loading
Loading