1
0
mirror of synced 2024-11-24 05:40:10 +01:00

Fix lindbergh util and add HOTD4RevCTest

This commit is contained in:
Bobby Dilley 2023-12-29 14:34:21 +00:00
parent 95bc966da3
commit e8ec0f072d
3 changed files with 49 additions and 14 deletions

View File

@ -61,6 +61,12 @@ static int detectGame(uint32_t elf_crc)
return 0; return 0;
} }
if(elf_crc == 0xDDECE1E9) {
config.game = THE_HOUSE_OF_THE_DEAD_4_STRIPPED_TEST;
config.gameStatus = WORKING;
return 0;
}
if (elf_crc == 0x7235bda8) if (elf_crc == 0x7235bda8)
{ {
config.game = THE_HOUSE_OF_THE_DEAD_4_TEST; config.game = THE_HOUSE_OF_THE_DEAD_4_TEST;
@ -313,6 +319,8 @@ char *getGameName()
return "Virtua Tennis 3 Test Mode"; return "Virtua Tennis 3 Test Mode";
case THE_HOUSE_OF_THE_DEAD_4_STRIPPED: case THE_HOUSE_OF_THE_DEAD_4_STRIPPED:
return "The House of the Dead 4 Rev C"; return "The House of the Dead 4 Rev C";
case THE_HOUSE_OF_THE_DEAD_4_STRIPPED_TEST:
return "The House of the Dead 4 Rev C Test Mode";
case INITIALD_4_REVE: case INITIALD_4_REVE:
return "Initial D 4 Exp Rev E"; return "Initial D 4 Exp Rev E";
default: default:

View File

@ -34,6 +34,7 @@ typedef enum
SEGA_RACE_TV, SEGA_RACE_TV,
THE_HOUSE_OF_THE_DEAD_4, THE_HOUSE_OF_THE_DEAD_4,
THE_HOUSE_OF_THE_DEAD_4_STRIPPED, THE_HOUSE_OF_THE_DEAD_4_STRIPPED,
THE_HOUSE_OF_THE_DEAD_4_STRIPPED_TEST,
THE_HOUSE_OF_THE_DEAD_4_SPECIAL, THE_HOUSE_OF_THE_DEAD_4_SPECIAL,
THE_HOUSE_OF_THE_DEAD_4_SPECIAL_TEST, THE_HOUSE_OF_THE_DEAD_4_SPECIAL_TEST,
THE_HOUSE_OF_THE_DEAD_4_TEST, THE_HOUSE_OF_THE_DEAD_4_TEST,

View File

@ -146,32 +146,58 @@ int main(int argc, char *argv[])
return EXIT_FAILURE; return EXIT_FAILURE;
} }
// Build up the command to start the game
int testMode = 0;
int gdb = 0;
int forceGame = 0;
char forceGamePath[128] = {0};
for (int i = 1; i < argc; i++)
{
if (strcmp(argv[i], "-t") == 0 || strcmp(argv[i], "--test") == 0)
{
testMode = 1;
continue;
}
if (strcmp(argv[i], "--gdb") == 0)
{
gdb = 1;
continue;
}
// Treat the argument as the game name
strcpy(forceGamePath, argv[i]);
forceGame = 1;
}
char command[128] = {0};
strcpy(command, "./");
if (forceGame)
{
strcat(command, forceGamePath);
}
else
{
if (game == NULL) if (game == NULL)
{ {
printf("Error: No lindbergh game found in this directory.\n"); printf("Error: No lindbergh game found in this directory.\n");
return EXIT_FAILURE; return EXIT_FAILURE;
} }
// Build up the command to start the game
char command[128];
strcpy(command, "./");
strcat(command, game); strcat(command, game);
for (int i = 1; i < argc; i++)
{
if (strcmp(argv[i], "-t") == 0 || strcmp(argv[i], "--test") == 0)
{
testModePath(command);
} }
if (strcmp(argv[i], "--gdb") == 0) if (testMode)
testModePath(command);
if (gdb)
{ {
char temp[128]; char temp[128];
strcpy(temp, "gdb "); strcpy(temp, "gdb ");
strcat(temp, command); strcat(temp, command);
strcpy(command, temp); strcpy(command, temp);
} }
}
printf("$ %s\n", command); printf("$ %s\n", command);