SpongeBob SquarePants: Battle for Bikini Bottom and The Movie Game,
along with the two Incredibles titles suffer from an EFB offset issue
described in earlier commits. This commit adds offsets for the
Incredibles and The Incredibles: Rise of the Underminer releases
and adds additional inis for SpongeBob special releases.
When making 92d1d60, I checked whether the ~0x1f masking in dcbx
actually was necessary. I came to the conclusion that it wasn't,
so I removed it. However, I hadn't checked the second half of
InvalidateICache closely enough - the masking is actually needed.
This commit re-adds the masking, but this time in C++ code instead
of in jitted code in order to save icache. Though I suppose the
difference doesn't matter all that much, since this is in farcode
and all...
Hopefully fixes https://bugs.dolphin-emu.org/issues/12612.
This implements the behavior described in
https://bugs.dolphin-emu.org/issues/12565.
Thank you to eigenform, delroth, phire, marcan, segher, and Extrems
for all helping in one way or another with the efforts to reverse
engineer this behavior, and to Rylie for reporting the issue.
Write_U16_Swap leaves the upper 32 bits alone. Reimplementing this
correctly in the JIT would require more than one instruction,
so let's just call Write_U16_Swap instead, like Jit64 does.
One of the following commits will add emulation of a quirk
that only happens when writing to memory which is mapped as
write-through or cache-inhibited, so let's keep track of
which memory is mapped in this way.
SpongeBob SquarePants: The Movie suffers from all of the same issues as
Battle for Bikini Bottom. These patches are not based on any existing
cheats or codes.
This adds about a frame of latency, and since most games don't change
VI registers during scanout, we can get away with outputting the XFB at
the start of scanout. WWE Crush Hour is the (only currently known)
exception, which has flickering problems when doing it this way.
This adds a path to perform the output at the end of scanout, and gates
it behind an option which defaults to using the latency-reducing
pre-scanout path.
Only the NTSC version of Gladius got a patch with smurf3tte's reverse
engineering work. Since most of the work was done, I ported over the
fix to the PAL, French, and German releases. Leoetlino helped figure
out a consistent way to find the correct address.