From f38162cd096bd92a20adad426611504f85f02c01 Mon Sep 17 00:00:00 2001 From: dkeruza Date: Wed, 6 Dec 2023 17:00:57 -0500 Subject: [PATCH] VT3_testmode --- src/lindbergh/config.c | 9 +++++++++ src/lindbergh/config.h | 1 + src/lindbergh/hook.c | 1 + src/lindbergh/patch.c | 9 +++++++++ 4 files changed, 20 insertions(+) diff --git a/src/lindbergh/config.c b/src/lindbergh/config.c index 6af9b06..bc9dd31 100644 --- a/src/lindbergh/config.c +++ b/src/lindbergh/config.c @@ -135,6 +135,13 @@ static int detectGame(uint32_t elf_crc) if (elf_crc == 0xc4b7e89) { config.game = VT3; + config.gameStatus = WORKING; + return 0; + } + + if (elf_crc == 0xffe3b0fd) + { + config.game = VT3_TESTMODE; config.gameStatus = NOT_WORKING; return 0; } @@ -183,6 +190,8 @@ char *getGameName() return "R-Tuned Ultimate Street Racing"; case VT3: return "Virtua Tennis 3"; + case VT3_TESTMODE: + return "Virtua Tennis 3 - Testmode"; case VF5_REVC: return "Virtua Fighter 5 - RevC"; default: diff --git a/src/lindbergh/config.h b/src/lindbergh/config.h index 94e19ba..f6891ad 100644 --- a/src/lindbergh/config.h +++ b/src/lindbergh/config.h @@ -21,6 +21,7 @@ typedef enum SRTV, RTUNED, VT3, + VT3_TESTMODE, VF5_REVC } Game; diff --git a/src/lindbergh/hook.c b/src/lindbergh/hook.c index 22eb038..0919cb6 100644 --- a/src/lindbergh/hook.c +++ b/src/lindbergh/hook.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "hook.h" diff --git a/src/lindbergh/patch.c b/src/lindbergh/patch.c index 1a23e14..79b3b77 100644 --- a/src/lindbergh/patch.c +++ b/src/lindbergh/patch.c @@ -455,6 +455,15 @@ int initPatch() detourFunction(0x0831c64f, stub0); setVariable(0x0827ae1b, 0x34891beb); //Disable Fullscreen } + case VT3_TESTMODE: + { + detourFunction(0x0815f610, amDongleInit); + detourFunction(0x0815f923, amDongleIsAvailable); + detourFunction(0x0815f88a, amDongleUpdate); + detourFunction(0x0815d06b, amDipswGetData); + detourFunction(0x0815d0e3, stub0); + //setVariable(0x0827ae1b, 0x34891beb); //Disable Fullscreen + } break; default: // Don't do any patches for random games