1
0
mirror of synced 2025-02-01 12:17:55 +01:00

Add missing reg query, used by USF4

This commit is contained in:
Nico Giansanti 2019-04-06 01:32:41 +03:00
parent 1c785e1eb3
commit 9495b54556
2 changed files with 19 additions and 0 deletions

View File

@ -119,6 +119,19 @@ int __cdecl iDmacDrvRegisterRead(int DeviceId, DWORD CommandCode, LPVOID OutBuff
case 0x4150u:
result = 0x1823C;
break;
// Packages that are ok to return 0 for now to prevent spam...
case 0x4158:
case 0x415C:
case 0x41D0:
case 0x41D4:
case 0x41D8:
case 0x41DC:
case 0x4148:
case 0x414C:
case 0x41C8:
case 0x41CC:
result = 0;
break;
default:
#ifdef _DEBUG
info(true, "Unknown Fast I/O Request: %08X", CommandCode);

View File

@ -7,6 +7,7 @@ DWORD GameResult = 0;
DWORD IOErrorCoin = 0;
DWORD IOErrorCredit = 0;
DWORD EventModeEnable = 0;
DWORD SystemType = 0;
DWORD FillDwordInformation(const char *setting, const char *subkey, DWORD defaultValue)
{
@ -230,6 +231,11 @@ LSTATUS __stdcall RegQueryValueExWWrap(
*lpData = FillDwordInformation("NESiCA", "IOErrorCredit", IOErrorCredit); // UNK
*lpcbData = 4;
}
else if (wcscmp(lpValueName, L"SystemType") == 0) // REG_DWORD
{
*lpData = FillDwordInformation("NESiCA", "SystemType", SystemType);; // UNK
*lpcbData = 4;
}
else
{
MessageBoxA(0, "UNKNOWN REG QUERY FROM SOFTWWARE\\TAITO\\NESiCAxLive, contact devs!", "Error", 0);