AX: add analytics quirks for wiimote filters

I'm fairly sure the implementation is correct but I've not been able to
find a game that actually makes use of these filters.
This commit is contained in:
Tillmann Karras 2024-08-18 13:54:53 +01:00
parent 6946f17b8c
commit 2669d0d8af
3 changed files with 7 additions and 1 deletions

View File

@ -137,7 +137,7 @@ void DolphinAnalytics::ReportGameStart()
}
// Keep in sync with enum class GameQuirk definition.
constexpr std::array<const char*, 32> GAME_QUIRKS_NAMES{
constexpr std::array<const char*, 34> GAME_QUIRKS_NAMES{
"directly-reads-wiimote-input",
"uses-DVDLowStopLaser",
"uses-DVDLowOffset",
@ -158,6 +158,8 @@ constexpr std::array<const char*, 32> GAME_QUIRKS_NAMES{
"uses-cp-perf-command",
"uses-unimplemented-ax-command",
"uses-ax-initial-time-delay",
"uses-ax-wiimote-lowpass",
"uses-ax-wiimote-biquad",
"sets-xf-clipdisable-bit-0",
"sets-xf-clipdisable-bit-1",
"sets-xf-clipdisable-bit-2",

View File

@ -72,6 +72,8 @@ enum class GameQuirk
// We don't implement all AX features yet.
USES_UNIMPLEMENTED_AX_COMMAND,
USES_AX_INITIAL_TIME_DELAY,
USES_AX_WIIMOTE_LOWPASS,
USES_AX_WIIMOTE_BIQUAD,
// We don't implement XFMEM_CLIPDISABLE yet.
SETS_XF_CLIPDISABLE_BIT_0,

View File

@ -567,10 +567,12 @@ void ProcessVoice(HLEAccelerator* accelerator, PB_TYPE& pb, const AXBuffers& buf
// Only one filter at most for Wiimotes.
if (pb.remote_iir.on == 2)
{
DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::USES_AX_WIIMOTE_BIQUAD);
BiquadFilter(samples, count, pb.remote_iir.biquad);
}
else
{
DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::USES_AX_WIIMOTE_LOWPASS);
LowPassFilter(samples, count, pb.remote_iir.lpf);
}
}