dolphin/Data/Sys/GameSettings/RX4PMT.ini
LillyJadeKatrin 0c14b0c8a7 Add Approved Patch Allowlist for Achievements
Prototype of a system to whitelist known game patches that are allowed to be used while RetroAchievements Hardcore mode is active. ApprovedInis.txt contains known hashes for the ini files as they appear in the repo, and can be compared to the local versions of these files to ensure they have not been edited locally by the player. ApprovedInis.txt is hashed and verified similarly first, with its hash residing as a const string within AchievementManager.h, ensuring ApprovedInis and the hashes within cannot be modified without editing Dolphin's source code and recompiling completely.
2024-07-07 13:42:09 -04:00

32 lines
1.3 KiB
INI

# RX4PMT - Casper's Scare School: Spooky Sports Day
[OnFrame]
# Work around a dcache issue by preventing the game from doing something pointless.
#
# The game's DVD read function writes 0x87654321 to the entire read buffer and 0x12345678 to the
# last 4 bytes. It then calls DVDReadAsync() and without waiting for the read to complete at all,
# it checks if the last 4 bytes are still 0x12345678. If they are, then the game fails.
#
# The check always passes on console because DVDReadAsync() -> issueCommand() calls
# DCInvalidateRange() (dcbi) on the read buffer.
#
# Dolphin cannot emulate this without an extremely significant performance hit.
#
# .text:80164B8C lis r7, game_dvd_read_callback@ha
# .text:80164B90 stw r0, 0(r17) # write 0x12345678 to the end of the buffer
# .text:80164B94 mr r5, read_length # length
# .text:80164B98 mr r6, read_offset # offset
# .text:80164B9C addi r3, this, file.file_info # file_info
# .text:80164BA0 subi r4, r4, dvd_read_buf@l # addr
# .text:80164BA4 addi r7, r7, game_dvd_read_callback@l # callback
# .text:80164BA8 li r8, 2 # unknown
# .text:80164BAC bl DVDReadAsync
#
$Fix file reads (dcache bypass)
0x80164b90:dword:0x60000000
[OnFrame_Enabled]
$Fix file reads (dcache bypass)
[Patches_RetroAchievements_Verified]
$Fix file reads (dcache bypass)