0% found this document useful (0 votes)
51 views

Patch 2

This document contains code modifications for several Persona 5 mods, including replacing game files through a mod.cpk file, adding a file access log to print accessed files, skipping the intro, and fixing the game to run at 60 FPS by adjusting various timing values. Code snippets show instructions being modified by changing specific byte values to implement the mods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Patch 2

This document contains code modifications for several Persona 5 mods, including replacing game files through a mod.cpk file, adding a file access log to print accessed files, skipping the intro, and fixing the game to run at 60 FPS by adjusting various timing values. Code snippets show instructions being modified by changing specific byte values to implement the mods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 10

# Game: Persona 5

# Subject: File replacement through mod.cpk


# Author: TGE
p5_ModSupport: &p5_ModSupport

# make %s/hdd.cpk -> %s%s/mod.cpk


- [ be32, 0x00B4D638, 0x25732573 ]
- [ be32, 0x00B4D63C, 0x2F6D6F64 ]
- [ be32, 0x00B4D640, 0x2E63706B ]

# make mod.cpk file path


- [ be32, 0x00114CA4, 0x3C6000B5 ] # lis r3, cpkPathString@ha
- [ be32, 0x00114CA8, 0x33E3D638 ] # addic r31, r3, cpkPathString@l
- [ be32, 0x00114CAC, 0x48968BEB ] # bla getInstallPath
- [ be32, 0x00114CB0, 0x60000000 ] # nop
- [ be32, 0x00114CB4, 0x7C7E1B78 ] # mr r30, r3
- [ be32, 0x00114CB8, 0x48968BF7 ] # bla getInstallPath2
- [ be32, 0x00114CBC, 0x60000000 ] # nop
- [ be32, 0x00114CC0, 0x33A10070 ] # addic r29, r1, 0x70
- [ be32, 0x00114CC4, 0x7C661B78 ] # mr r6, r3
- [ be32, 0x00114CC8, 0x7FA3EB78 ] # mr r3, r29
- [ be32, 0x00114CCC, 0x7FE4FB78 ] # mr r4, r31
- [ be32, 0x00114CD0, 0x7FC5F378 ] # mr r5, r30
- [ be32, 0x00114CD4, 0x48AD567F ] # bla sprintf
- [ be32, 0x00114CD8, 0x60000000 ] # nop
- [ be32, 0x00114CDC, 0x48B44A9E ] # ba branchOffset
- [ be32, 0x00114CE0, 0x60000000 ] # nop

# trampoline
- [ be32, 0x00B44A9C, 0x7FA3EB78 ] # mr r3, r29
- [ be32, 0x00B44AA0, 0x48114B77 ] # bla criFsBindCpk
- [ be32, 0x00B44AA4, 0x60000000 ] # nop
- [ be32, 0x00B44AA8, 0x3880000A ] # li r4, 0xA
- [ be32, 0x00B44AAC, 0x48AB8ED7 ] # bla criFsBindPatch
- [ be32, 0x00B44AB0, 0x60000000 ] # nop
- [ be32, 0x00B44AB4, 0x48114CE6 ] # ba 0x114CA4 + 0x40
- [ be32, 0x00B44AB8, 0x60000000 ] # nop

# Game: Persona 5
# Subject: File access log
# Author: TGE
p5_FileAccessLog: &p5_FileAccessLog

# branch to trampoline
- [ be32, 0x00AC0A78, 0x48B44ABF ] # bla 0xB44ABC
- [ be32, 0x00AC0A7C, 0x60000000 ] # nop

# trampoline
# prologue
- [ be32, 0x00B44ABC, 0xF821FF41 ] # stdu r1, -STACK_SIZE(r1)
- [ be32, 0x00B44AC0, 0x7C0802A6 ] # mflr r0
- [ be32, 0x00B44AC4, 0xF80100D0 ] # std r0, STACK_SIZE + 0x10(r1)

# save volatile regs


- [ be32, 0x00B44AC8, 0xF86100B8 ] # std r3, STACK_SIZE - 0x08(r1)
- [ be32, 0x00B44ACC, 0xF88100B0 ] # std r4, STACK_SIZE - 0x10(r1)
- [ be32, 0x00B44AD0, 0xF8A100A8 ] # std r5, STACK_SIZE - 0x18(r1)
- [ be32, 0x00B44AD4, 0xF8C100A0 ] # std r6, STACK_SIZE - 0x20(r1)
- [ be32, 0x00B44AD8, 0xF8E10098 ] # std r7, STACK_SIZE - 0x28(r1)
- [ be32, 0x00B44ADC, 0xF9010090 ] # std r8, STACK_SIZE - 0x30(r1)
- [ be32, 0x00B44AE0, 0xF9210088 ] # std r9, STACK_SIZE - 0x38(r1)
- [ be32, 0x00B44AE4, 0xF9410080 ] # std r10, STACK_SIZE - 0x40(r1)
- [ be32, 0x00B44AE8, 0xF9610078 ] # std r11, STACK_SIZE - 0x48(r1)
- [ be32, 0x00B44AEC, 0xF9810070 ] # std r12, STACK_SIZE - 0x50(r1)

# print file name


- [ be32, 0x00B44AF0, 0x80630004 ] # lwz r3, 0x04(r3)
- [ be32, 0x00B44AF4, 0x7C6307B4 ] # extsw r3, r3
- [ be32, 0x00B44AF8, 0x48AD546F ] # bla PTR_PRINTF
- [ be32, 0x00B44AFC, 0x60000000 ] # nop

# print newline
- [ be32, 0x00B44B00, 0x3C6000B9 ] # lis r3, PTR_NEWLINECHAR@ha
- [ be32, 0x00B44B04, 0x30631820 ] # addic r3, r3, PTR_NEWLINECHAR@l
- [ be32, 0x00B44B08, 0x48AD546F ] # bla PTR_PRINTF
- [ be32, 0x00B44B0C, 0x60000000 ] # nop

# restore volatile regs


- [ be32, 0x00B44B10, 0xE86100B8 ] # ld r3, STACK_SIZE - 0x08(r1)
- [ be32, 0x00B44B14, 0xE88100B0 ] # ld r4, STACK_SIZE - 0x10(r1)
- [ be32, 0x00B44B18, 0xE8A100A8 ] # ld r5, STACK_SIZE - 0x18(r1)
- [ be32, 0x00B44B1C, 0xE8C100A0 ] # ld r6, STACK_SIZE - 0x20(r1)
- [ be32, 0x00B44B20, 0xE8E10098 ] # ld r7, STACK_SIZE - 0x28(r1)
- [ be32, 0x00B44B24, 0xE9010090 ] # ld r8, STACK_SIZE - 0x30(r1)
- [ be32, 0x00B44B28, 0xE9210088 ] # ld r9, STACK_SIZE - 0x38(r1)
- [ be32, 0x00B44B2C, 0xE9410080 ] # ld r10, STACK_SIZE - 0x40(r1)
- [ be32, 0x00B44B30, 0xE9610078 ] # ld r11, STACK_SIZE - 0x48(r1)
- [ be32, 0x00B44B34, 0xE9810070 ] # ld r12, STACK_SIZE - 0x50(r1)

# destroy stack frame


- [ be32, 0x00B44B38, 0xE80100D0 ] # ld r0, STACK_SIZE + 0x10(r1)
- [ be32, 0x00B44B3C, 0x7C0803A6 ] # mtlr r0
- [ be32, 0x00B44B40, 0x382100C0 ] # addi r1, r1, STACK_SIZE

# return
- [ be32, 0x00B44B44, 0xFB2100F8 ] # std r25, 0xF8(r1)
- [ be32, 0x00B44B48, 0xFAA100D8 ] # std r21, 0xD8(r1)
- [ be32, 0x00B44B4C, 0x4E800020 ] # blr

# Game: Persona 5
# Subject: Intro skip
# Author: TGE
p5_IntroSkip: &p5_IntroSkip
- [ be32, 0x0055AC8C, 0x60000000 ]

# Game: Persona 5
# Subject: 60 fps
# Update 4/30/2018: Fix various timings, incl. battle, fix voice cutoff during
cutscenes
# Author: TGE (TGEnigma)
p5_60FPS: &p5_60FPS
- [ be32, 0x00010268, 0x9061009C ] # set update rate to 60 -> r3,
0xE0+var_44(r1)
- [ be32, 0x008FC864, 0x60000000 ] # nop cellGcmSetSecondVFrequency
- [ bef32, 0x00012484, 0.01666667 ]
- [ bef32, 0x00045678, 0.01666667 ]
- [ bef32, 0x000616F0, 0.01666667 ]
- [ bef32, 0x00073F20, 0.01666667 ]
# - [ bef32, 0x000753A0, 0.01666667 ] Doubles camera speed
- [ bef32, 0x00077E54, 0.01666667 ]
- [ bef32, 0x00078A70, 0.01666667 ]
- [ bef32, 0x0007A238, 0.01666667 ]
- [ bef32, 0x00081864, 0.01666667 ]
- [ bef32, 0x000885C8, 0.01666667 ]
- [ bef32, 0x0008C550, 0.01666667 ]
- [ bef32, 0x0008D6D0, 0.01666667 ]
- [ bef32, 0x000D058C, 0.01666667 ]
- [ bef32, 0x000D0B4C, 0.01666667 ]
- [ bef32, 0x000E4754, 0.01666667 ]
- [ bef32, 0x000E50F0, 0.01666667 ]
- [ bef32, 0x000E8190, 0.01666667 ]
- [ bef32, 0x000F8B78, 0.01666667 ]
- [ bef32, 0x00101CE8, 0.01666667 ]
- [ bef32, 0x001E7344, 0.01666667 ]
- [ bef32, 0x001EB0D4, 0.01666667 ]
- [ bef32, 0x001EB328, 0.01666667 ]
- [ bef32, 0x001EB814, 0.01666667 ]
- [ bef32, 0x001EB940, 0.01666667 ]
- [ bef32, 0x001EBA04, 0.01666667 ]
- [ bef32, 0x001EBBA0, 0.01666667 ]
- [ bef32, 0x001EBCD0, 0.01666667 ]
- [ bef32, 0x001ECCA0, 0.01666667 ]
- [ bef32, 0x00234C64, 0.01666667 ]
- [ bef32, 0x0023F4BC, 0.01666667 ]
- [ bef32, 0x002400BC, 0.01666667 ]
- [ bef32, 0x00240BB0, 0.01666667 ]
- [ bef32, 0x0029231C, 0.01666667 ]
- [ bef32, 0x00294A70, 0.01666667 ]
- [ bef32, 0x002952F8, 0.01666667 ]
#- [ bef32, 0x002B027C, 0.01666667 ] Makes it impossible to run < 60 fps
- [ bef32, 0x002B0688, 0.01666667 ]
- [ bef32, 0x002B6154, 0.01666667 ]
- [ bef32, 0x002B71F8, 0.01666667 ]
- [ bef32, 0x002B82C8, 0.01666667 ]
- [ bef32, 0x002B98F8, 0.01666667 ]
- [ bef32, 0x002B9F8C, 0.01666667 ]
- [ bef32, 0x002BA614, 0.01666667 ]
- [ bef32, 0x002BC84C, 0.01666667 ]
- [ bef32, 0x002BCD2C, 0.01666667 ]
- [ bef32, 0x002C550C, 0.01666667 ]
- [ bef32, 0x002D1328, 0.01666667 ]
#- [ bef32, 0x002D230C, 0.01666667 ] Doubles movement speed
- [ bef32, 0x002D2DDC, 0.01666667 ]
- [ bef32, 0x002D8A10, 0.01666667 ]
- [ bef32, 0x002D8A18, 0.01666667 ]
- [ bef32, 0x002DA46C, 0.01666667 ]
- [ bef32, 0x002FBB00, 0.01666667 ]
- [ bef32, 0x0030E258, 0.01666667 ]
- [ bef32, 0x003181D4, 0.01666667 ]
- [ bef32, 0x0031CE24, 0.01666667 ]
- [ bef32, 0x0031DBE0, 0.01666667 ]
- [ bef32, 0x0033DBD0, 0.01666667 ]
- [ bef32, 0x00358664, 0.01666667 ]
- [ bef32, 0x00359020, 0.01666667 ]
- [ bef32, 0x0035AD10, 0.01666667 ]
- [ bef32, 0x00364A98, 0.01666667 ]
- [ bef32, 0x0037429C, 0.01666667 ]
- [ bef32, 0x00376E7C, 0.01666667 ]
- [ bef32, 0x00379B08, 0.01666667 ]
- [ bef32, 0x0037AAAC, 0.01666667 ]
- [ bef32, 0x0037CF54, 0.01666667 ]
- [ bef32, 0x0037DB7C, 0.01666667 ]
- [ bef32, 0x003803F4, 0.01666667 ]
- [ bef32, 0x00387A80, 0.01666667 ]
- [ bef32, 0x00388684, 0.01666667 ]
- [ bef32, 0x003ACBC0, 0.01666667 ]
- [ bef32, 0x003BDDD0, 0.01666667 ]
- [ bef32, 0x003E944C, 0.01666667 ]
- [ bef32, 0x003F35EC, 0.01666667 ]
- [ bef32, 0x003F6FF4, 0.01666667 ]
- [ bef32, 0x0058CE18, 0.01666667 ]
- [ bef32, 0x0058DE64, 0.01666667 ]
- [ bef32, 0x0058E82C, 0.01666667 ]
- [ bef32, 0x0058E958, 0.01666667 ]
- [ bef32, 0x0058F47C, 0.01666667 ]
- [ bef32, 0x0058FA00, 0.01666667 ]
- [ bef32, 0x0058FAB4, 0.01666667 ]
- [ bef32, 0x0058FBE4, 0.01666667 ]
- [ bef32, 0x0058FD2C, 0.01666667 ]
- [ bef32, 0x0058FE6C, 0.01666667 ]
- [ bef32, 0x00590A04, 0.01666667 ]
- [ bef32, 0x005B6914, 0.01666667 ]
- [ bef32, 0x005F1C6C, 0.01666667 ]
- [ bef32, 0x0062076C, 0.01666667 ] # battle related stuff
- [ bef32, 0x007072BC, 0.01666667 ]
- [ bef32, 0x00722D7C, 0.01666667 ]
- [ bef32, 0x0073C840, 0.01666667 ]
- [ bef32, 0x00772E50, 0.01666667 ]
- [ bef32, 0x0087B338, 0.01666667 ]
- [ bef32, 0x00B10110, 0.01666667 ]
- [ bef32, 0x00B6AA14, 0.01666667 ]
- [ bef32, 0x00B6AA38, 0.01666667 ]
- [ bef32, 0x00B70B48, 0.01666667 ]
- [ bef32, 0x00B70BC8, 0.01666667 ]
- [ bef32, 0x00B71CF4, 0.01666667 ]
- [ bef32, 0x00B72F38, 0.01666667 ]
- [ bef32, 0x00CFF46C, 0.01666667 ]
- [ bef32, 0x00061700, 0.1666667 ]
- [ bef32, 0x00069AA4, 0.1666667 ]
- [ bef32, 0x0007A1EC, 0.1666667 ]
- [ bef32, 0x00081880, 0.1666667 ]
- [ bef32, 0x000C8258, 0.1666667 ]
- [ bef32, 0x000C991C, 0.1666667 ]
- [ bef32, 0x00101CCC, 0.1666667 ]
- [ bef32, 0x001E2C44, 0.1666667 ]
- [ bef32, 0x001E61E8, 0.1666667 ]
- [ bef32, 0x001E7338, 0.1666667 ]
- [ bef32, 0x00250C50, 0.1666667 ]
- [ bef32, 0x00256B20, 0.1666667 ]
- [ bef32, 0x00292100, 0.1666667 ]
- [ bef32, 0x00294A60, 0.1666667 ]
- [ bef32, 0x002952E4, 0.1666667 ]
- [ bef32, 0x0029FD98, 0.1666667 ]
- [ bef32, 0x002A1BB8, 0.1666667 ]
- [ bef32, 0x002A41D0, 0.1666667 ]
- [ bef32, 0x002A6124, 0.1666667 ]
- [ bef32, 0x002B4FF0, 0.1666667 ]
- [ bef32, 0x002B60DC, 0.1666667 ]
- [ bef32, 0x002B7174, 0.1666667 ]
- [ bef32, 0x002B82F4, 0.1666667 ]
- [ bef32, 0x002B8E74, 0.1666667 ]
- [ bef32, 0x002BA600, 0.1666667 ]
- [ bef32, 0x002BAB30, 0.1666667 ]
- [ bef32, 0x002BB4E0, 0.1666667 ]
- [ bef32, 0x002BB808, 0.1666667 ]
- [ bef32, 0x002BC368, 0.1666667 ]
- [ bef32, 0x002BC844, 0.1666667 ]
- [ bef32, 0x002BD414, 0.1666667 ]
- [ bef32, 0x002C4F54, 0.1666667 ]
- [ bef32, 0x002C4FF0, 0.1666667 ]
- [ bef32, 0x002C69E4, 0.1666667 ]
- [ bef32, 0x002D4378, 0.1666667 ]
- [ bef32, 0x002DD968, 0.1666667 ]
- [ bef32, 0x002DE538, 0.1666667 ]
- [ bef32, 0x002DEA04, 0.1666667 ]
- [ bef32, 0x0030D7A0, 0.1666667 ]
- [ bef32, 0x0030E6BC, 0.1666667 ]
- [ bef32, 0x003181B8, 0.1666667 ]
- [ bef32, 0x0031AFE0, 0.1666667 ]
- [ bef32, 0x0031CE38, 0.1666667 ]
- [ bef32, 0x0031DBF0, 0.1666667 ]
- [ bef32, 0x0031EC74, 0.1666667 ]
- [ bef32, 0x00322FB4, 0.1666667 ]
- [ bef32, 0x00356560, 0.1666667 ]
- [ bef32, 0x003586BC, 0.1666667 ]
- [ bef32, 0x00358F90, 0.1666667 ]
- [ bef32, 0x0035A380, 0.1666667 ]
- [ bef32, 0x0035AA3C, 0.1666667 ]
- [ bef32, 0x00364A9C, 0.1666667 ]
- [ bef32, 0x003688C8, 0.1666667 ]
- [ bef32, 0x00368A88, 0.1666667 ]
- [ bef32, 0x00368E30, 0.1666667 ]
- [ bef32, 0x00376FD0, 0.1666667 ]
- [ bef32, 0x00377538, 0.1666667 ]
- [ bef32, 0x00377CD8, 0.1666667 ]
- [ bef32, 0x0037C2B0, 0.1666667 ]
- [ bef32, 0x0037D310, 0.1666667 ]
- [ bef32, 0x0037D418, 0.1666667 ]
- [ bef32, 0x0037D5B4, 0.1666667 ]
- [ bef32, 0x0037DD08, 0.1666667 ]
- [ bef32, 0x0037DE10, 0.1666667 ]
- [ bef32, 0x0037DF78, 0.1666667 ]
- [ bef32, 0x00382F38, 0.1666667 ]
- [ bef32, 0x003845F0, 0.1666667 ]
- [ bef32, 0x00387A6C, 0.1666667 ]
- [ bef32, 0x00398208, 0.1666667 ]
- [ bef32, 0x00398460, 0.1666667 ]
- [ bef32, 0x003999F8, 0.1666667 ]
- [ bef32, 0x003A7C64, 0.1666667 ]
- [ bef32, 0x003AA418, 0.1666667 ]
- [ bef32, 0x003AE0E4, 0.1666667 ]
- [ bef32, 0x003AE3A0, 0.1666667 ]
- [ bef32, 0x003B25D8, 0.1666667 ]
- [ bef32, 0x003BC448, 0.1666667 ]
- [ bef32, 0x003C58C0, 0.1666667 ]
- [ bef32, 0x003C67B0, 0.1666667 ]
- [ bef32, 0x003C6D6C, 0.1666667 ]
- [ bef32, 0x003EBC20, 0.1666667 ]
- [ bef32, 0x003EE5F0, 0.1666667 ]
- [ bef32, 0x003F1FE0, 0.1666667 ]
- [ bef32, 0x003F6FC0, 0.1666667 ]
- [ bef32, 0x004EB808, 0.1666667 ]
- [ bef32, 0x0055251C, 0.1666667 ]
- [ bef32, 0x0055EC48, 0.1666667 ]
- [ bef32, 0x0055F4A8, 0.1666667 ]
- [ bef32, 0x0057DC08, 0.1666667 ]
- [ bef32, 0x0057E498, 0.1666667 ]
- [ bef32, 0x005C5364, 0.1666667 ]
- [ bef32, 0x00620714, 0.1666667 ]
- [ bef32, 0x00635CB4, 0.1666667 ]
- [ bef32, 0x00642B98, 0.1666667 ]
- [ bef32, 0x00654EE8, 0.1666667 ]
- [ bef32, 0x00662B04, 0.1666667 ]
- [ bef32, 0x006AFF98, 0.1666667 ]
- [ bef32, 0x006CAA44, 0.1666667 ]
- [ bef32, 0x006E0224, 0.1666667 ]
- [ bef32, 0x006E31A0, 0.1666667 ]
- [ bef32, 0x006FCD3C, 0.1666667 ]
- [ bef32, 0x00772E54, 0.1666667 ]
- [ bef32, 0x00797508, 0.1666667 ]
- [ bef32, 0x00B52E3C, 0.1666667 ]
- [ bef32, 0x00B6AD00, 0.1666667 ]
- [ bef32, 0x00B6B71C, 0.1666667 ]
- [ bef32, 0x00B6E478, 0.1666667 ]
- [ bef32, 0x00B6E880, 0.1666667 ]
- [ bef32, 0x00B6E8B8, 0.1666667 ]
- [ bef32, 0x00B6E8F0, 0.1666667 ]
- [ bef32, 0x00B6E928, 0.1666667 ]
- [ bef32, 0x00B6E960, 0.1666667 ]
- [ bef32, 0x00B6E998, 0.1666667 ]
- [ bef32, 0x00B6E9D0, 0.1666667 ]
- [ bef32, 0x00B6EA08, 0.1666667 ]
- [ bef32, 0x00B6EA40, 0.1666667 ]
- [ bef32, 0x00B6EA78, 0.1666667 ]
- [ bef32, 0x00B6EAB0, 0.1666667 ]
- [ bef32, 0x00B6EAE8, 0.1666667 ]
- [ bef32, 0x00B6EB20, 0.1666667 ]
- [ bef32, 0x00B6EB58, 0.1666667 ]
- [ bef32, 0x00B6EB90, 0.1666667 ]
- [ bef32, 0x00B6EBC8, 0.1666667 ]
- [ bef32, 0x00B6EC00, 0.1666667 ]
- [ bef32, 0x00B6EC38, 0.1666667 ]
- [ bef32, 0x00B6EC70, 0.1666667 ]
- [ bef32, 0x00B6ECA8, 0.1666667 ]
- [ bef32, 0x00B70A54, 0.1666667 ]
- [ bef32, 0x00B70AF0, 0.1666667 ]
- [ bef32, 0x00B70AF8, 0.1666667 ]
- [ bef32, 0x00B70B00, 0.1666667 ]
- [ bef32, 0x00B70B08, 0.1666667 ]
- [ bef32, 0x00B70B10, 0.1666667 ]
- [ bef32, 0x00B70B20, 0.1666667 ]
- [ bef32, 0x00B70B78, 0.1666667 ]
- [ bef32, 0x00B70B88, 0.1666667 ]
- [ bef32, 0x00B70BB4, 0.1666667 ]
- [ bef32, 0x00B70BC4, 0.1666667 ]
- [ bef32, 0x00B70F60, 0.1666667 ]
- [ bef32, 0x00B71BAC, 0.1666667 ]
- [ bef32, 0x00B71BBC, 0.1666667 ]
- [ bef32, 0x00B9BD30, 0.1666667 ]
- [ bef32, 0x00CF96AC, 0.1666667 ]
- [ bef32, 0x00CFA1E8, 0.1666667 ]
- [ bef32, 0x00CFA20C, 0.1666667 ]
- [ bef32, 0x00CFB210, 0.1666667 ]
- [ bef32, 0x00CFB778, 0.1666667 ]
- [ bef32, 0x00CFBC30, 0.1666667 ]
- [ bef32, 0x00CFBCA8, 0.1666667 ]
- [ bef32, 0x00CFBFD4, 0.1666667 ]
- [ bef32, 0x00CFC0A8, 0.1666667 ]
- [ bef32, 0x00CFF3CC, 0.1666667 ]
- [ bef32, 0x00CFF3D4, 0.1666667 ]
- [ bef32, 0x00CFF470, 0.1666667 ]
- [ bef32, 0x00CFF478, 0.1666667 ]
- [ bef32, 0x00CFF480, 0.1666667 ]
- [ bef32, 0x00D06840, 0.1666667 ]
- [ bef32, 0x00D06848, 0.1666667 ]
- [ be32, 0x000FB71C, 0x3C603C88 ]
- [ be32, 0x00109B14, 0x3C603C88 ]
- [ be32, 0x0023FBDC, 0x3CA03C88 ]
- [ be32, 0x00240620, 0x3CA03C88 ]
- [ be32, 0x00241258, 0x3C803C88 ]
- [ be32, 0x003CA4BC, 0x3C603C88 ]
- [ be32, 0x0087B448, 0x3C603C88 ]
- [ be32, 0x00589358, 0x60000000 ] # Fix cutscene voice cutoff

# Game: Persona 5
# Subject: Shuffled/randomized encounter music
# Author: TGE
p5_RandomizedEncounterMusic: &p5_RandomizedEncounterMusic
# patch SoundManager_SetEquipBgm
# branch to trampoline
- [ be32, 0x0006CD68, 0x48B44B52 ] # ba 0x00B44B50

# trampoline
# Rnd() % MaxBgm
- [ be32, 0x00B44B50, 0x4891DA07 ] # bla 0x91DA04 (Rnd)
- [ be32, 0x00B44B54, 0x38C0000B ] # li r6, 11 (MaxBgm)
- [ be32, 0x00B44B58, 0x30860001 ] # addic r4, r6, 1
- [ be32, 0x00B44B5C, 0x7C832396 ] # divwu r4, r3, r4
- [ be32, 0x00B44B60, 0x7CA431D6 ] # mullw r5, r4, r6
- [ be32, 0x00B44B64, 0x7C852014 ] # addc r4, r5, r4
- [ be32, 0x00B44B68, 0x7C641810 ] # subfc r3, r4, r3
- [ be32, 0x00B44B6C, 0x7C6307B4 ] # extsw r3, r3

# patch music id
- [be32, 0x00B44B70, 0xB07E0000] # sth r3, 0(r30)

# return
- [ be32, 0x00B44B74, 0x2C1E0000 ] # cmpwi r30, 0
- [ be32, 0x00B44B78, 0x4806CD6E ] # ba 0x0006CD6C
# patch Btl_PlayBgm
# branch to trampoline
- [ be32, 0x0063ACE4, 0x48B44B87 ] # bla 0xB44B84 (trampoline)
- [ be32, 0x0063ACE8, 0x4806CCBB ] # bla 0x6CCB8 (SoundManager__GetBgmId)

# trampoline

# check and return if not normal battle bgm


- [ be32, 0x00B44B84, 0x2C1F012C ] # cmpwi r31, 300 # normal battle
- [ be32, 0x00B44B88, 0x41820008 ] # beq 8 # return if not normal battle
music
- [ be32, 0x00B44B8C, 0x4E800020 ] # blr

# randomize sound bank


- [ be32, 0x00B44B90, 0x4806CCCB ] # bla 0x6CCC8 (SoundManager__SetEquipBgm)

# return
- [ be32, 0x00B44B94, 0x4863ACEA ] # ba 0x63ACE8

p5_DisableDLCUnlockMessages: &p5_DisableDLCUnlockMessages
- [ be32, 0x197AE8, 0x4E800020 ]

p5_FixScriptPrintingFunctions: &p5_FixScriptPrintingFunctions

#ScriptInterpreter_Comm_PUT_Hook
- [ be32, 0x001E9D10, 0x48B44B9A ]

#PutInt
- [ be32, 0x00B44B98, 0x7C641B78 ]
- [ be32, 0x00B44B9C, 0x3C6000B6 ]
- [ be32, 0x00B44BA0, 0x3063394C ]
- [ be32, 0x00B44BA4, 0x48AD546F ]
- [ be32, 0x00B44BA8, 0x3C6000B9 ]
- [ be32, 0x00B44BAC, 0x30631820 ]
- [ be32, 0x00B44BB0, 0x48AD546F ]
- [ be32, 0x00B44BB4, 0x481E9D16 ]

#ScriptInterpreter_Comm_PUTF_Hook
- [ be32, 0x001E9D68, 0x48B44BBA ]

#PutFloat
- [ be32, 0xB44BB8, 0xFC400890 ]
- [ be32, 0xB44BBC, 0x3C6000B6 ]
- [ be32, 0xB44BC0, 0x3063397C ]
- [ be32, 0xB44BC4, 0x48AD546F ]
- [ be32, 0xB44BC8, 0x3C6000B9 ]
- [ be32, 0xB44BCC, 0x30631820 ]
- [ be32, 0xB44BD0, 0x48AD546F ]
- [ be32, 0xB44BD4, 0x481E9D6E ]

#ScriptInterpreter_Comm_PUTS_Hook
- [ be32, 0x001E9D3C, 0x48B44BDA ]

#PutString
- [ be32, 0x00B44BD8, 0x7C641B78 ]
- [ be32, 0x00B44BDC, 0x3C6000B6 ]
- [ be32, 0x00B44BE0, 0x30633994 ]
- [ be32, 0x00B44BE4, 0x48AD546F ]
- [ be32, 0x00B44BE8, 0x3C6000B9 ]
- [ be32, 0x00B44BEC, 0x30631820 ]
- [ be32, 0x00B44BF0, 0x48AD546F ]
- [ be32, 0x00B44BF4, 0x481E9D42 ]

# Game: Persona 5
# Subject: Disable Blur Filter
# Authors: TGE, ruipin, kd-11
p5_DisableBlur: &p5_DisableBlur
- [ be32, 0x00FEE27A, 0x9E001700 ]
- [ be32, 0x00FEE27E, 0xC801001D ]
- [ be32, 0x00FEE282, 0x00000000 ]
- [ be32, 0x00FEE286, 0x00000000 ]
- [ be32, 0x00FEE28A, 0x1E810100 ]
- [ be32, 0x00FEE28E, 0xC800001D ]
- [ be32, 0x00FEE292, 0x00000000 ]
- [ be32, 0x00FEE296, 0x00000000 ]

# Game: Persona 5
# Subject: Disable "Normal" Distortion Filter (<=99% Alert & Velvet Room)
# Workaround for RPCS3 issue #4086
# Authors: TGE, ruipin, kd-11
p5_DisableDistortion: &p5_DisableDistortion
- [ be32, 0x00FE2E28, 0x9E001700 ]
- [ be32, 0x00FE2E2C, 0xC801001D ]
- [ be32, 0x00FE2E30, 0x00000000 ]
- [ be32, 0x00FE2E34, 0x00000000 ]
- [ be32, 0x00FE2E38, 0x1E810100 ]
- [ be32, 0x00FE2E3C, 0xC800001D ]
- [ be32, 0x00FE2E40, 0x00000000 ]
- [ be32, 0x00FE2E44, 0x00000000 ]

# Game: Persona 5
# Subject: Disable "Angery" Distortion Filter (100% Alert)
# Authors: TGE, ruipin, kd-11
p5_Disable100PctDistortion: &p5_Disable100PctDistortion
- [ be32, 0x00FE31CC, 0x9E001700 ]
- [ be32, 0x00FE31D0, 0xC801001D ]
- [ be32, 0x00FE31D4, 0x00000000 ]
- [ be32, 0x00FE31D8, 0x00000000 ]
- [ be32, 0x00FE31DC, 0x1E810100 ]
- [ be32, 0x00FE31E0, 0xC800001D ]
- [ be32, 0x00FE31E4, 0x00000000 ]
- [ be32, 0x00FE31E8, 0x00000000 ]

# Game: Persona 5
# Subject: Disable most HUD elements
# Author: TGE
p5_NoHudLite: &p5_NoHudLite
- [ be32, 0xDE4EC, 0x60000000 ] # mission list
- [ be32, 0xE83F4, 0x60000000 ] # place pict
- [ be32, 0xE5920, 0x60000000 ] # check
- [ be32, 0x69CC4, 0x38600001 ] # alert
- [ be32, 0x5F678, 0x60000000 ] # date
- [ be32, 0x38A0D0, 0x4838A186 ] # misc field hud
- [ be32, 0x28FBA0, 0x38600000 ] # party panel
- [ be32, 0x28FBA4, 0x4E800020 ] # party panel
- [ be32, 0xD6B48, 0x60000000 ] # mini map
- [ be32, 0xD6490, 0x60000000 ] # mini map
# Game: Persona 5
# Subject: Disable HUD by disabling rendering of 2d elements entirely. Breaks
things.
# Author: TGE
p5_NoHud: &p5_NoHud
- [ be32, 0x116934, 0x4E800020 ]

# Replace the below PPU hash with yours. For more info:
https://amicitia.github.io/guides/p5/mod-cpk
# Comment a line with # if you dont want a particular mod
PPU-b8c34f774adb367761706a7f685d4f8d9d355426:
- [ load, p5_ModSupport ]
- [ load, p5_FileAccessLog ]
- [ load, p5_IntroSkip ]
- [ load, p5_60FPS ]
# - [ load, p5_RandomizedEncounterMusic ] #Causes an access violation on RPCS3
- [ load, p5_DisableDLCUnlockMessages ]
# - [ load, p5_FixScriptPrintingFunctions ]
- [ load, p5_DisableBlur ]
- [ load, p5_DisableDistortion ]
- [ load, p5_Disable100PctDistortion ]
# - [ load, p5_NoHudLite ]
# - [ load, p5_NoHud ]

#1.0.1
#60FPS patch for DeS
#Author: Whatcookie

#This patch MUST be used with the following settings:


#Clocks scale: 200
#Vblank Rate: 120

PPU-83681f6110d33442329073b72b8dc88a2f677172: #BLUS30443
#OPTIONAL: Disable dynamic exposure (can turn off WCB for 20% faster performance)
#Enable this if you experience flickering

# - [be16, 0x00025EDC, 0x981f]

#Alter fixed timestep

- [ bef32, 0x018c8db4, 0.01666667 ] #for 60fps


# - [ bef32, 0x018c8db4, 0.00833334 ] # for 120fps

PPU-5446a2645880eefa75f7e374abd6b7818511e2ef: #BLES00932
#OPTIONAL: Disable dynamic exposure (can turn off WCB for 20% faster performance)
#Enable this if you experience flickering

# - [be16, 0x00026AC4, 0x981f]

#Alter fixed timestep

- [ bef32, 0x018c8f20, 0.01666667 ] #for 60fps


# - [ bef32, 0x018c8f20, 0.00833334 ] # for 120fps

You might also like