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
This game can deadlock the CPU and GPU by setting FIFO breakpoints too infrequently, provided the CPU gets too far ahead, as can happen under Dolphin due to timing inaccuracies. The game never clears breakpoints, and it will skip setting them if the previous one has not been hit by the GPU. If the CPU gets far enough ahead it will reach the FIFO high water mark and trigger an overflow interrupt, causing the render thread to be suspended. The GPU will make forward progress until it hits the last set breakpoint. However, if the distance between that breakpoint and the FIFO write pointer is greater than the low water mark, then the GPU will never generate an underflow interrupt and the render thread will never be resumed. This patch forces the game to update the breakpoint unconditionally and has been tested on real hardware with no apparent ill effect.
This patch covers the US release (GLSE64), but there are three more (GLSD64, GLSF64, GLSP64) that will likely require similar patches.
This fixes the crash at Goblin Wall: https://bugs.dolphin-emu.org/issues/9915
A patch (for the US release only) that fixes the game's buffer overrun bug is included as an alternative with lower performance cost. It is disabled by default.
The first call to GXCopyDisp() corrupts game data, but on real hardware it isn't observed thanks to the data cache. Skipping the call works too, preventing a crash on boot.
This patch is enabled by default.
This enables patches for game-breaking problems by default.
My criterion for which patches to select was that the patch
has to make the game's behavior closer to how the game acts
on console. So workarounds for Dolphin not emulating caches
accurately are enabled by default, but not things like
Twilight Princess's minimap speedhack or patches for
disabling memory card checks in Pokémon games.
This game requires EFB turned off, otherwise every game will black screen, and it requires Safe Texture Cache to Safe, otherwise the cursor in game won't update, making it really hard to navigate the menu's
This shader has been rendered nonfunctional due to the removal of the function SampleFontLocation, which was never implemented in VideoCommon. The last reference to SampleFontLocation was located in the OGL video backend. It was removed in this commit: f039149198 (diff-24125a6c968a8aca9cadd977d4b9d68f), where many functions were moved to video common, among other things.
This shader should be removed so it does not confuse users with the error that it causes. Alternatively, it could be rewritten so it is compatible with modern versions of Dolphin. I am not familiar with GLSL, so this is currently beyond my skill set.
This resolves a few issues with bounding box animations and others. Most noticably, it greatly reduces the bounding box slowdown seen on some NVIDIA cards and also fixes the odd overlay glitches when moving between rooms on the Excess Express.
No wind, always-act-like-fairway, and press Z to enter the hole.
Changed the title of “Unlock All Courses” to “Unlock All Normal Tours
& Courses” to reflect its inability to unlock all the Congo Canpoy
options.
The new cheat codes come from https://gamehacking.org/game/54576
XFB to texture causes magenta loading screens. Defer efb causes the game to flicker between metroid prime loading and the place you are loading in to and other loading screen errors.
Most games map fine with the default values and I have yet to read a single
complaint on mapping the touch pointer. Going to just leave it up to the users
to setup mapping if the defaults are not correct.
For a while now, we have used the INI setting SuggestedAspectRatio
to indicate that a Wii game doesn't support 16:9, making Dolphin
switch to 4:3 when playing those games (as long as the aspect ratio
setting is set to Auto). However, we didn't have a complete list of
games that don't support 16:9. Yesterday, I found what seems like
such a list in the vWii system menu (the PAL one, in case it matters).
This commit sets SuggestedAspectRatio = 2 in the INIs for all the
titles in that list, with a few exceptions:
E5Z E62 E63 E6W E6X E6Z: These titles are already covered by E.ini.
HAJ HAP HCB: HAJ and HAP do in fact support 16:9, but are not
installable on vWii without hacking. I don't know anything about HCB
other than what its GameTDB entry says, but since HAJ and HAP do
in fact support 16:9, it's probably best to not mark HCB unless
someone actually can check that it doesn't support 16:9.
All newly added files in this commit were automatically generated,
and all existing files that were edited were handled manually.
Interesting to note is that some of the titles in the vWii list
seem to be completely unknown. Perhaps they are unreleased games.
Causes a crash during the final boss. This game is timing sensitive in
general though, so I wouldn't be surprised if certain other stages also
had crashing issues.
Closes emulator issue #10186
This adds Vertex Rounding to the Sonic Heroes' GameINI (allowing you enjoy Sonic Heroes in higher resolution without problem) and then removed the forced 1x Native and Anti-Aliasing settings as they are not needed when Vertex Rounding is enabled.
This will avoid effects being unexpectedly broken in these games if the user disables the option globally. This list is by no means comprehensive, these are just the games I could confirm use custom mipmaps.
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() calls
issueCommand(), which calls DCInvalidateRange(read_buffer) (dcbi).
Dolphin cannot emulate this without an extremely significant
performance hit.
Forcing people to use hacks is a bad idea in general, and there are
two practical problems with doing it for immediate XFB in particular:
1. It breaks the GC IPL, which some users run when launching games.
2. Competitive players don't necessarily want the lowest possible
latency - they might want the latency that's the closest to console,
so if they're playing locally with a low-latency monitor, they might
not want to use immediate XFB. (This isn't a theoretical concern -
I've seen Melee players want to increase their latency.)
Besides, it feels arbitrary that just these five specific games should
have immediate XFB forced on.
This reverts commit 1fc910b3ea,
replacing the old INI setting EFBScale with a new INI setting
called InternalResolution, which has a simpler mapping:
| EFBScale | InternalResolution
----------------- | -------------------- | --------------------
Auto (fractional) | 0 |
Auto (integral) | 1 | 0
1x | 2 | 1
1.5x | 3 |
2x | 4 | 2
2.5x | 5 |
3x | 6 | 3
4x | 7 | 4
5x | 8 | 5
6x | 9 | 6
All the fractional IRs were removed in f090a943.
Without virtual xfb, the game will show distorted graphics once leaving
the title screen. This adds an INI file to make the game playable.
The wiki page for this game also notes the need for virtual xfb.
This could cause the first branch of the bootucode procedure, which
takes its parameters from the AX registers, to run during the ROM init
sequence. Since the ROM doesn't set any of the AX registers, the values
aren't meaningful, and can cause bad DMA transfers and crashes.
Wii.Widescreen is a setting that cannot be changed on the fly after
emulation has started, so anything booted after the initial title
will have an unexpected aspect ratio.
We can just set Video_Settings.AspectRatio instead, which *can* be live
changed, since it doesn't involve messing with the SYSCONF at any time.
This is also much closer to the behaviour of the Wii U, which
configures the DMCU to force 4:3 transparently, instead of doing it the
intrusive way (touching the SYSCONF).