Three bugs specific to older Wii games:
- The size difference between high-pass and biquad filter was not
accounted for, causing wiimote related fields to be corrupted.
- Wiimote sample buffer pointers were advanced by 32 samples per
millisecond instead of 6 samples. Usually hidden by the first bug.
- PB updates on Wii were being byte-swapped twice, but I've not actually
found any Wii games that make use of PB updates.
This fixes wiimote audio in at least the following games:
- Excite Truck
- Ice Age 2: The Meltdown
- Kororinpa: Marble Mania
- Rapala Tournament Fishing
- Shrek the Third
- Super Monkey Ball: Banana Blitz
- Tiger Woods PGA Tour 07
- WarioWare: Smooth Moves (issue 11725)
- Wing Island
Fixes LIT (https://bugs.dolphin-emu.org/issues/13635). The text does not include normals, but has lighting enabled. With the previous default of (0, 0, 0), lighting was always black (as dot(X, (0, 0, 0)) is always 0). It seems like the normal from the map in the background (0, 0, 1) is re-used.
LIT also has the vertex color enabled while vertex color is not specified, the same as SMS's debug cubes; the default MissingColorValue GameINI value of solid white seems to work correctly in this case.
No need to materialize the immediate if it is zero, we can just use WZR.
Before:
mov w27, #0x0 ; =0
str w27, [x29, #0x1178]
After:
str wzr, [x29, #0x1178]
In VolumeVerifier.cpp, constructing a `std::string_view` of the volume's GameID is unnecessary, as `std::`(`ranges::`)`binary_search` supports heterogeneous lookup. The usage in GameFile.cpp is a perfect example.
In OGLConfig.cpp, `std::views::reverse` is used rather than sorting using `std::ranges::greater` in order to parallel other instances of reverse iteration in the function.
In DSPCore.cpp, there were two `std::fill` uses that could be simplified using `std::fill_n`. Due to their proximity with other `std::fill` algorithms being modernized with ranges, I chose to make these examples into the rare `std::ranges::fill_n`.
In StringUtil.h, the lambdas wrapping `Common::ToLower(char)` and `Common::ToUpper(char)` were only necessary due to the function names being overloaded.