Port all 59NL/59NJ patches to 50YJ (US 1.24.3)

This commit is contained in:
Corrine
2026-05-21 13:40:57 -07:00
committed by Martin Michelsen
parent 6f9c442e7a
commit ea74b4ac07
26 changed files with 330 additions and 318 deletions
+20 -20
View File
@@ -228,21 +228,21 @@ p5_3e:
.versions 59NJ 59NL
.versions 50YJ 59NJ 59NL
write_call_func:
.include WriteCallToCode
start:
mov eax, 0x41800000 # Environment clip distance mod 16.0f
mov [<VERS 0x0097D198 0x0097F1B8>], eax # This affects mostly static map objects
mov [<VERS 0x0097D19C 0x0097F1BC>], eax
mov [<VERS 0x0097D1A0 0x0097F1C0>], eax
mov [<VERS 0x00972AF8 0x0097D198 0x0097F1B8>], eax # This affects mostly static map objects
mov [<VERS 0x00972AFC 0x0097D19C 0x0097F1BC>], eax
mov [<VERS 0x00972B00 0x0097D1A0 0x0097F1C0>], eax
mov ax, 0x9090
mov [<VERS 0x00689BC7 0x00689B5B>], ax # Players draw distance 10000.0f always
mov [<VERS 0x0068476F 0x00689BC7 0x00689B5B>], ax # Players draw distance 10000.0f always
mov eax, 0x41000000 # Use newly acquired skipped branch room
mov [<VERS 0x00689BD1 0x00689B65>], eax # to store our float multiplier
mov [<VERS 0x00684779 0x00689BD1 0x00689B65>], eax # to store our float multiplier
call patch_func_1 # Floor items
call patch_func_2 # Whole bunch of stuff, including NPCs
@@ -256,7 +256,7 @@ start:
patch_func_1:
pop ecx
push 8
push <VERS 0x005C525B 0x005C5267>
push <VERS 0x005C4013 0x005C525B 0x005C5267>
call get_code_size1
.deltaof patch_code1, patch_code_end1
get_code_size1:
@@ -265,7 +265,7 @@ get_code_size1:
call patch_code_end1
patch_code1:
mov edx, [esp + 0x18]
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
fld st0, dword [<VERS 0x00684779 0x00689BD1 0x00689B65>]
fld st0, dword [esp + 0x14]
fmulp st1, st0
ret
@@ -277,7 +277,7 @@ patch_code_end1:
patch_func_2:
pop ecx
push 9
push <VERS 0x007BB21E 0x007BA472>
push <VERS 0x07B3396 0x007BB21E 0x007BA472>
call get_code_size2
.deltaof patch_code2, patch_code_end2
get_code_size2:
@@ -286,7 +286,7 @@ get_code_size2:
call patch_code_end2
patch_code2:
test eax, 0x400
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
fld st0, dword [<VERS 0x00684779 0x00689BD1 0x00689B65>]
fld st0, dword [esp + 0x2C]
fmulp st1, st0
ret
@@ -296,18 +296,18 @@ patch_code_end2:
# Duplicate function from above, reuse same hook
patch_func_3:
mov eax, dword [<VERS 0x007BB21F 0x007BA473>]
mov eax, dword [<VERS 0x007B3397 0x007BB21F 0x007BA473>]
add eax, 0x002A1C74
mov dword [<VERS 0x00518843 0x005187FF>], eax
mov byte [<VERS 0x00518842 0x005187FE>], 0xE8
mov dword [<VERS 0x00518847 0x00518803>], 0x90909090
mov dword [<VERS 0x005179BF 0x00518843 0x005187FF>], eax
mov byte [<VERS 0x005179BE 0x00518842 0x005187FE>], 0xE8
mov dword [<VERS 0x005179C3 0x00518847 0x00518803>], 0x90909090
ret
# TOComputerMachine01
patch_func_4:
pop ecx
push 7
push <VERS 0x00616FF4 0x00616FFC>
push <VERS 0x00611E30 0x00616FF4 0x00616FFC>
call get_code_size4
.deltaof patch_code4, patch_code_end4
get_code_size4:
@@ -316,7 +316,7 @@ get_code_size4:
call patch_code_end4
patch_code4:
lea edx, [edi + 0x38]
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
fld st0, dword [<VERS 0x00684779 0x00689BD1 0x00689B65>]
fld st0, dword [esp + 0x14]
fmulp st1, st0
ret
@@ -328,7 +328,7 @@ patch_code_end4:
patch_func_5:
pop ecx
push 6
push <VERS 0x006439A8 0x0064394C>
push <VERS 0x0063E6E4 0x006439A8 0x0064394C>
call get_code_size5
.deltaof patch_code5, patch_code_end5
get_code_size5:
@@ -336,7 +336,7 @@ get_code_size5:
push dword [eax]
call patch_code_end5
patch_code5:
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
fld st0, dword [<VERS 0x00684779 0x00689BD1 0x00689B65>]
fld st0, dword [esp + 0x28]
fmulp st1, st0
fchs st0
@@ -349,7 +349,7 @@ patch_code_end5:
patch_func_6:
pop ecx
push 6
push <VERS 0x0065B959 0x0065B985>
push <VERS 0x00656501 0x0065B959 0x0065B985>
call get_code_size6
.deltaof patch_code6, patch_code_end6
get_code_size6:
@@ -358,7 +358,7 @@ get_code_size6:
call patch_code_end6
patch_code6:
mov ebp, ecx
fld st0, dword [<VERS 0x00689BD1 0x00689B65>]
fld st0, dword [<VERS 0x00684779 0x00689BD1 0x00689B65>]
fld st0, dword [esp + 0x30]
fmulp st1, st0
ret