- Make Pengo APM3 code generic
- Make Pengo APM3 code generic (same code works for every update), add Pengo APM3 update 1 and 2 test menu
This commit is contained in:
parent
c0e3a42177
commit
1b51403f39
@ -934,6 +934,11 @@ void __fastcall printPengo(const char* format, ...)
|
||||
BYTE compressionOn = 0;
|
||||
BYTE encryptionOn = 0;
|
||||
|
||||
static unsigned int WINAPI joyGetPosExHook()
|
||||
{
|
||||
return 167; // JOYERR_UNPLUGGED
|
||||
}
|
||||
|
||||
#ifdef _M_AMD64
|
||||
|
||||
// am::abaas::link::HttpData::setOption
|
||||
@ -952,30 +957,12 @@ static InitFunction initFuncTapping([]()
|
||||
|
||||
}, GameID::TappingSkillTest);
|
||||
|
||||
static InitFunction initFuncPengoe510([]()
|
||||
static InitFunction initFuncPengoeAPM3([]()
|
||||
{
|
||||
HookAPM3(L"SDFH");
|
||||
|
||||
__int64 mainModuleBase = (__int64)GetModuleHandle(0);
|
||||
|
||||
MH_Initialize();
|
||||
//MH_CreateHook((void*)(mainModuleBase + 0x1944B0), (void *)printPengo, NULL);
|
||||
MH_CreateHookApi(L"winmm.dll", "joyGetPosEx", joyGetPosExHook, NULL);
|
||||
MH_EnableHook(MH_ALL_HOOKS);
|
||||
|
||||
// 55 8B EC 8A 45 08 88 41 15 -> 0x140060
|
||||
#ifdef _DEBUG
|
||||
safeJMP(hook::get_pattern("88 51 21 44 88 41 22 C3"), setOption_x64);
|
||||
#endif
|
||||
/// PATTERNS BELOW
|
||||
// Skip joysticks
|
||||
injector::MakeRET(mainModuleBase + 0x15C5B0);
|
||||
// Skip keyboard
|
||||
injector::MakeRET(mainModuleBase + 0x15CBA0);
|
||||
|
||||
}, GameID::Pengoe5);
|
||||
|
||||
static InitFunction initFuncPengoe511([]()
|
||||
{
|
||||
HookAPM3(L"SDFH");
|
||||
|
||||
__int64 mainModuleBase = (__int64)GetModuleHandle(0);
|
||||
@ -984,44 +971,26 @@ static InitFunction initFuncPengoe511([]()
|
||||
#ifdef _DEBUG
|
||||
safeJMP(hook::get_pattern("88 51 21 44 88 41 22 C3"), setOption_x64);
|
||||
#endif
|
||||
// Skip joysticks
|
||||
injector::MakeRET(mainModuleBase + 0x16A7C0); // CC 48 89 5C 24 10 48 89 6C 24 18 48 89 74 24 20 57 48 83 EC 40
|
||||
// Skip keyboard
|
||||
injector::MakeRET(mainModuleBase + 0x16ADB0); // 48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 54 41 55 41 56 41 57 48 81 EC A0 00 00 00
|
||||
|
||||
}, GameID::Pengoe511);
|
||||
|
||||
static InitFunction initFuncPengoe512([]()
|
||||
{
|
||||
HookAPM3(L"SDFH");
|
||||
|
||||
__int64 mainModuleBase = (__int64)GetModuleHandle(0);
|
||||
|
||||
// 55 8B EC 8A 45 08 88 41 15 -> 0x140060
|
||||
#ifdef _DEBUG
|
||||
safeJMP(hook::get_pattern("88 51 21 44 88 41 22 C3"), setOption_x64);
|
||||
#endif
|
||||
// Skip joysticks
|
||||
injector::MakeRET(mainModuleBase + 0x16DFF0); // Pattern changed, too lazy to check.
|
||||
|
||||
// Skip keyboard
|
||||
injector::MakeRET(mainModuleBase + 0x16E5D0); // 48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 54 41 55 41 56 41 57 48 81 EC A0 00 00 00
|
||||
injector::MakeRET(hook::get_pattern("48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 54 41 55 41 56 41 57 48 81 EC A0 00 00 00"));
|
||||
|
||||
}, GameID::Pengoe512);
|
||||
}, GameID::PengoAPM3);
|
||||
|
||||
static InitFunction initPengoe5TestFunc([]()
|
||||
static InitFunction initPengoAPM3TestFunc([]()
|
||||
{
|
||||
MH_Initialize();
|
||||
MH_CreateHookApi(L"winmm.dll", "joyGetPosEx", joyGetPosExHook, NULL);
|
||||
MH_EnableHook(MH_ALL_HOOKS);
|
||||
|
||||
HookAPM3(L"SDFH");
|
||||
__int64 mainModuleBase = (__int64)GetModuleHandle(0);
|
||||
|
||||
// Skip joysticks
|
||||
injector::MakeRET(mainModuleBase + 0x158820);
|
||||
// Skip keyboard
|
||||
injector::MakeRET(mainModuleBase + 0x158E10);
|
||||
injector::MakeRET(hook::get_pattern("48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 54 41 55 41 56 41 57 48 81 EC A0 00 00 00"));
|
||||
|
||||
Sequence_isTestReturnValue = true;
|
||||
|
||||
}, GameID::Pengoe5_Test);
|
||||
}, GameID::PengoAPM3_Test);
|
||||
|
||||
static InitFunction initVF5Func([]()
|
||||
{
|
||||
|
@ -710,17 +710,15 @@ void GameDetect::DetectCurrentGame()
|
||||
case 0x247B6F8C: // 07
|
||||
SetGameId(GameID::PokkenTournament, "Pokken Tournament");
|
||||
break;
|
||||
case 0xcb9c4353:
|
||||
SetGameId(GameID::Pengoe5_Test, "Pengoe5_Test");
|
||||
case 0xcb9c4353: // Original
|
||||
case 0x6ef07067: // Update 1
|
||||
case 0x70f84d80: // Update 2
|
||||
SetGameId(GameID::PengoAPM3_Test, "Pengo APM3 Test");
|
||||
break;
|
||||
case 0x0f98a7a2:
|
||||
SetGameId(GameID::Pengoe5, "Pengoe5");
|
||||
break;
|
||||
case 0x3f67d5b2:
|
||||
SetGameId(GameID::Pengoe511, "Pengoe511");
|
||||
break;
|
||||
case 0x4d5a6510:
|
||||
SetGameId(GameID::Pengoe512, "Pengoe512");
|
||||
case 0x0f98a7a2: // Original
|
||||
case 0x3f67d5b2: // Update 1
|
||||
case 0x4d5a6510: // Update 2
|
||||
SetGameId(GameID::PengoAPM3, "Pengo APM3");
|
||||
break;
|
||||
case 0x6fc27eed: // Original
|
||||
case 0x52dab0ac: // Ver 11
|
||||
|
@ -99,14 +99,13 @@ enum class GameID
|
||||
ChaosBreakerNXL,
|
||||
LinuxEmulation,
|
||||
RadikalBikers,
|
||||
Pengoe5,
|
||||
Pengoe5_Test,
|
||||
PengoAPM3,
|
||||
PengoAPM3_Test,
|
||||
VF5Esports,
|
||||
GoonyaFighter,
|
||||
PuyoPuyoEsports,
|
||||
SFV,
|
||||
TappingSkillTest,
|
||||
Pengoe511,
|
||||
VF5EsportsTest,
|
||||
Doa6FM10,
|
||||
Doa6FM11,
|
||||
@ -133,7 +132,6 @@ enum class GameID
|
||||
BlazBlueCrossTagBattle,
|
||||
DengekiBunkoFC,
|
||||
BladeStrangesAPM3,
|
||||
Pengoe512,
|
||||
KoihimeEnbuAPM3,
|
||||
UnderNightAPM3,
|
||||
OtoshuDX
|
||||
|
Loading…
x
Reference in New Issue
Block a user