Add game quirks for unknown BP/CP/XF commands

This commit is contained in:
Pokechu22
2021-03-07 15:42:10 -08:00
parent ac250f7c20
commit 7fe1292c62
5 changed files with 60 additions and 14 deletions

View File

@ -9,6 +9,7 @@
#include "Common/Logging/Log.h"
#include "Common/Swap.h"
#include "Core/DolphinAnalytics.h"
#include "Core/HW/Memmap.h"
#include "VideoCommon/CPMemory.h"
@ -182,6 +183,7 @@ static void XFRegWritten(int transferSize, u32 baseAddress, DataReader src)
case 0x104d:
case 0x104e:
case 0x104f:
DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::USES_UNKNOWN_XF_COMMAND);
DEBUG_LOG_FMT(VIDEO, "Possible Normal Mtx XF reg?: {:x}={:x}", address, newValue);
break;
@ -192,6 +194,7 @@ static void XFRegWritten(int transferSize, u32 baseAddress, DataReader src)
case 0x1017:
default:
DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::USES_UNKNOWN_XF_COMMAND);
if (newValue != 0) // Ignore writes of zero.
WARN_LOG_FMT(VIDEO, "Unknown XF Reg: {:x}={:x}", address, newValue);
break;
@ -211,6 +214,7 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, DataReader src)
if (baseAddress + transferSize > XFMEM_REGISTERS_END)
{
WARN_LOG_FMT(VIDEO, "XF load exceeds address space: {:x} {} bytes", baseAddress, transferSize);
DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::USES_UNKNOWN_XF_COMMAND);
if (baseAddress >= XFMEM_REGISTERS_END)
transferSize = 0;