rewrite chat patch

This commit is contained in:
Martin Michelsen
2025-02-08 22:05:44 -08:00
parent 15f923a639
commit 07c5a8a4b6
12 changed files with 396 additions and 216 deletions
@@ -1,6 +1,6 @@
.meta name="Chat"
.meta description="Enables extended\nWord Select and\nstops the Log\nWindow from\nscrolling with L+R"
# Original code by Ralf @ GC-Forever and Aleron Ives
# Original codes by Ralf @ GC-Forever and Aleron Ives
# https://www.gc-forever.com/forums/viewtopic.php?t=2050
# https://www.gc-forever.com/forums/viewtopic.php?t=2049
@@ -9,24 +9,39 @@ reloc0:
.offsetof start
start:
.include WriteCodeBlocksGC
# region @ 8000D6A0 (28 bytes)
.data 0x8000D6A0 # address
.data 0x0000001C # size
.data 0x3C608051 # 8000D6A0 => lis r3, 0x8051
.data 0xA063E270 # 8000D6A4 => lhz r3, [r3 - 0x1D90]
.data 0x70600003 # 8000D6A8 => andi. r0, r3, 0x0003
.data 0x28000003 # 8000D6AC => cmplwi r0, 3
.data 0x41820008 # 8000D6B0 => beq +0x00000008 /* 8000D6B8 */
.data 0xD03C0084 # 8000D6B4 => stfs [r28 + 0x0084], f1
.data 0x4825C594 # 8000D6B8 => b +0x0025C594 /* 80269C4C */
# region @ 80269C48 (4 bytes)
.data 0x80269C48 # address
.data 0x00000004 # size
.data 0x4BDA3A58 # 80269C48 => b -0x0025C5A8 /* 8000D6A0 */
# region @ 80346E4C (4 bytes)
.data 0x80346E4C # address
.data 0x00000004 # size
.data 0x38600000 # 80346E4C => li r3, 0x0000
# end sentinel
.data 0x00000000 # address
.data 0x00000000 # size
.data 0x80346E4C # Extended Word Select Menu (PSO PCv2 Style)
.data 0x00000004
.address 0x80346E4C
li r3, 0
.data 0x80269B5C # Chat Log Window LF/TAB Bug Fix
.data 0x00000004
.address 0x80269B5C
nop
.data 0x80251C68 # Chat Bubble Window TAB Bug Fix
.data 0x00000004
.address 0x80251C68
nop
.data 0x8000D6A0 # Chat Log Window: Scroll Lock (Hold L+R)
.deltaof scroll_lock_hook, scroll_lock_hook_end
.address 0x8000D6A0
scroll_lock_hook:
lis r3, 0x8051
lhz r3, [r3 - 0x1D90]
andi. r0, r3, 0x0003
cmplwi r0, 3
beqlr
stfs [r28 + 0x0084], f1
blr
scroll_lock_hook_end:
.data 0x80269C48 # Chat Log Window: Scroll Lock (Hold L+R)
.data 0x00000004
.address 0x80269C48
bl scroll_lock_hook
.data 0x00000000
.data 0x00000000