mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
f3b8a985e7
These games are erroneously zeroing buffers before they can be fully copied to ARAM by DMA. The responsible memset() calls are followed by a call to DVDRead() which issues dcbi instructions that effectively cancel the memset() on real hardware. Because Dolphin lacks dcache emulation, the effects of the memset() calls are observed, which causes missing audio. In a comment on the original bug, phire noted that the issue can be corrected by simply nop'ing out the offending memset() calls. Because the games dynamically load different .rel executables based on the character and/or language, the addresses of these calls can vary. To deal generally with the problem of code being dynamically loaded to fixed, known addresses, the patch engine is extended to support conditional patches which require a match against a known value. This sort of thing is already achievable with Action Replay/Gecko codes, but their use depends on enabling cheats globally in Dolphin, which is not a prerequisite shared by patches. Patches are included for every region, character, and language combination. They are enabled by default. The end result is an approximation of the games' behavior on real hardware without the associated complexity of proper dcache emulation. https://bugs.dolphin-emu.org/issues/9840
33 lines
935 B
INI
33 lines
935 B
INI
# GHAP08 - Resident Evil 2
|
|
|
|
[OnFrame]
|
|
# Work around a game bug that causes background sounds to be zeroed during load.
|
|
# The bug was masked on real hardware by dcache. This patch fully fixes the bug
|
|
# and should also work on real hardware. Dolphin doesn't emulate dcache because
|
|
# the performance hit would be huge.
|
|
$Fix audio issues
|
|
# main.dol
|
|
0x80033D60:dword:0x60000000
|
|
# leon.rel
|
|
0x8055C5F8:dword:0x60000000:0x4BAA6B09
|
|
# claire.rel
|
|
0x8055C490:dword:0x60000000:0x4BAA6C71
|
|
# leon_g.rel
|
|
0x8055C3B8:dword:0x60000000:0x4BAA6D49
|
|
# claire_g.rel
|
|
0x8055C328:dword:0x60000000:0x4BAA6DD9
|
|
# leon_f.rel
|
|
0x8055D188:dword:0x60000000:0x4BAA5F79
|
|
# claire_f.rel
|
|
0x8055D068:dword:0x60000000:0x4BAA6099
|
|
# leon_s.rel
|
|
0x8055D100:dword:0x60000000:0x4BAA6001
|
|
# claire_s.rel
|
|
0x8055D064:dword:0x60000000:0x4BAA609D
|
|
# leon_i.rel
|
|
0x8055CFDC:dword:0x60000000:0x4BAA6125
|
|
# claire_i.rel
|
|
0x8055CEBC:dword:0x60000000:0x4BAA6245
|
|
[OnFrame_Enabled]
|
|
$Fix audio issues
|