From 4aad1514c27901aeee72b35d067afc9accafe20f Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 28 Feb 2026 20:49:19 -0800 Subject: [PATCH] port a few more bug fix patches to Xbox --- notes/movement-data.txt | 4 +- .../BugFixes/BugFixes.4___.patch.s | 131 +++++++++++++++--- 2 files changed, 114 insertions(+), 21 deletions(-) diff --git a/notes/movement-data.txt b/notes/movement-data.txt index 9e0e4cee..f76bf33a 100644 --- a/notes/movement-data.txt +++ b/notes/movement-data.txt @@ -538,8 +538,8 @@ fparam4 = TODO: 3OE1:802D7490; NNF: Jump cooldown time (Higher value = less wait iparam1 = TODO: 3OE1:802D7484 MOVEMENT DATA 40 (MORFOS) -fparam1 = TODO: 3OE1:80335A98, 3OE1:80335DBC; NNF: Laser speed (also affects hitbox property - needs retest with others for opinion). -fparam2 = TODO: 3OE1:80335ADC; NNF: Laser damage. +fparam1 = laser speed; hitbox radius is fparam1 * 1.5 +fparam2 = laser damage iparam1 = TODO: 3OE1:80332298, 3OE1:803321C4; NNF: Firing rate of regular laser attack. Laser attack when aggressive (charging) is unaffected. iparam2 = TODO: 3OE1:8033161C, 3OE1:8033192C, 3OE1:80331B4C, 3OE1:80331D00, 3OE1:80331FA0; NNF: Speed at which Morphos spins after firing laser. iparam3 = TODO: 3OE1:80331F04; NNF: Interval in frames of attacks diff --git a/system/client-functions/BugFixes/BugFixes.4___.patch.s b/system/client-functions/BugFixes/BugFixes.4___.patch.s index 8bde4deb..e0a77ead 100644 --- a/system/client-functions/BugFixes/BugFixes.4___.patch.s +++ b/system/client-functions/BugFixes/BugFixes.4___.patch.s @@ -18,6 +18,7 @@ start: # Tiny Grass Assassins Bug Fix + .data .data 0x00000002 .binary EB0E @@ -25,6 +26,7 @@ start: # Shield DFP/EVP Bug Fix (allows shields to reach true max DFP/EVP values) + .data .data 0x00000001 .binary 16 @@ -35,6 +37,7 @@ start: # VR Spaceship Item Drop Bug Fix (allows items to drop from enemies above a certain Y position) + .data .data 0x00000002 .data 0x435C0000 @@ -42,6 +45,7 @@ start: # Gol Dragon Camera Bug Fix (makes the camera after Gol Dragon display "normally") + .data .data 0x00000002 .binary 01 @@ -49,6 +53,7 @@ start: # Rain Drops Color Bug Fix + .data .data 0x00000008 .binary 7080808060707070 @@ -56,6 +61,7 @@ start: # TP Bar Color Bug Fix + .data .data 0x00000004 .data 0xFF00AAFA @@ -71,13 +77,116 @@ start: + # Olga Flow Barta Bug Fix + + .label g1_hook_call, + .label g1_hook_loc, + .data g1_hook_call + .data 6 + .address g1_hook_call + mov eax, esi + cmp al, 19 + jmp g1_hook_loc +g1_hook_call_end: + .data g1_hook_loc + .deltaof g1_hook_start, g1_hook_end + .address g1_hook_loc +g1_hook_start: + jne g1_hook_skip_replace_value + mov al, 2 +g1_hook_skip_replace_value: + cmp eax, [ebx + 0x440] // Original opcode + jmp g1_hook_call_end +g1_hook_end: + + + + # Morfos Frozen Player Bug Fix + + .label g2_hook_call, + .label g2_hook_loc1, + .label g2_hook_loc2, + .data g2_hook_call + .data 6 + .address g2_hook_call + call g2_hook_loc1 + nop + .data g2_hook_loc1 + .deltaof g2_hook_start1, g2_hook_end1 + .address g2_hook_loc1 +g2_hook_start1: + fld1 st0 // st = [1.0, speed] + fld1 st0 // st = [1.0, 1.0, speed] + fadd st0, st1 // st = [2.0, 1.0, speed] + fdivp st1, st0 // st = [0.5, speed] + jmp g2_hook_loc2 +g2_hook_end1: + + .data g2_hook_loc2 + .deltaof g2_hook_start2, g2_hook_end2 + .address g2_hook_loc2 +g2_hook_start2: + test byte [esi + 0x30], 0x20 // If not set, use 1.5; if set, use 0.5 + jnz g2_hook_entity_is_frozen + fld1 st0 // st = [1, 0.5, speed] + faddp st1, st0 // st = [1.5, speed] +g2_hook_entity_is_frozen: + fmulp st1, st0 // st = [((game_flags & 0x20) ? 0.5 : 1.5) * speed] + ret +g2_hook_end2: + + + + # Dropped Mag Color Bug Fix (only needed on beta version) + + .only_versions 4OJB + .data 0x001759E6 + .data 1 + .binary 12 + .data 0x00180898 + .data 1 + .binary 12 + .all_versions + + + + # Box/Fence Fadeout Bug Fix + + .data + .data 2 + nop + nop + + .data + .data 6 + nop + nop + nop + nop + nop + nop + + + # TODO: Port the rest of the patches in the GC version of BugFixes: - # Olga Flow Barta Bug Fix - # Morfos Frozen Player Bug Fix # Bulclaw HP Bug Fix - # Control Tower: Delbiter Death SFX Bug Fix # Weapon Attributes Patch + # Invalid Items Bug Fix + # Item Removal Maxed Stats Bug Fix + # Unit Present Bug Fix + # Bank Item Stacking Bug Fix + # Meseta Drop System Bug Fix + # Offline Quests Drop Table Bug Fix + # Mag Revival Priority Bug Fix + # Mag Revival Challenge & Quest Mode Bug Fix + # Reverser Target Lock Bug Fix + # Deband/Shifta/Resta Target Bug Fix + # Tech Auto Targeting Bug Fix + # Enable Trap Animations + # Tsumikiri J-Sword special attack + rapid weapon switch bug fix + + # Control Tower: Delbiter Death SFX Bug Fix # Ruins Laser Fence SFX Bug Fix # SFX Cancellation Distance Bug Fix # Foie SFX Pitch Bug Fix @@ -92,28 +201,12 @@ start: # Grants SFX Pitch Bug Fix # Megid SFX Pitch Bug Fix # Anti SFX Pitch Bug Fix - # Invalid Items Bug Fix - # Item Removal Maxed Stats Bug Fix - # Unit Present Bug Fix - # Bank Item Stacking Bug Fix - # Dropped Mag Color Bug Fix - # Meseta Drop System Bug Fix # Present Color Bug Fix - # Offline Quests Drop Table Bug Fix - # Mag Revival Priority Bug Fix - # Mag Revival Challenge & Quest Mode Bug Fix # Chat Bubble Window TAB Bug Fix # Chat Log Window LF/Tab Bug Fix # Dark/Hell Special GFX Bug Fix - # Box/Fence Fadeout Bug Fix # Devil's and Demon's Special Damage Display Bug Fix # Christmas Trees Bug Fix - # Reverser Target Lock Bug Fix - # Deband/Shifta/Resta Target Bug Fix - # Tech Auto Targeting Bug Fix - # Enable Trap Animations - # Tsumikiri J-Sword special attack + rapid weapon switch bug fix - .data 0x00000000