Skip to content

Commit

Permalink
Fix ghost squad
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbydilley committed Mar 9, 2024
1 parent 2a6b2ec commit e0c98d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/lindbergh/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ static int detectGame(uint32_t elf_crc)
case GHOST_SQUAD_EVOLUTION:
{
config.gameTitle = "Ghost Squad Evolution";
config.gameStatus = NOT_WORKING;
config.gameStatus = WORKING;
config.gameDVP = "DVP-0029A";
config.gameID = "SBNJ";
return 0;
}
break;
Expand Down
11 changes: 9 additions & 2 deletions src/lindbergh/patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ int amDongleUserInfoEx(int a, int b, char *_arcadeContext)
memcpy(_arcadeContext, "SBPF", 4);
else if (getConfig()->crc32 == HUMMER_EXTREME)
memcpy(_arcadeContext, "SBST", 4);
else if (getConfig()->crc32 == GHOST_SQUAD_EVOLUTION)
memcpy(_arcadeContext, getConfig()->gameID, 4);
return 0;
}

Expand Down Expand Up @@ -998,11 +1000,16 @@ int initPatch()
detourFunction(0x08183046, amDongleInit);
detourFunction(0x08181a91, amDongleIsAvailable);
detourFunction(0x081824f5, amDongleUpdate);
detourFunction(0x08181aae, amDongleIsDevelop);
detourFunction(0x08182f0d, amDongleUserInfoEx);
// Fixes
detourFunction(0x0818191d, amDipswGetData);
detourFunction(0x08181994, stubRetZero);
// patchMemory(0x807c9ec, "01");
// detourFunction(0x080f3f94, stubRetZero); //eliminates init_heap function.

patchMemory(0x080f37dd, "75");
patchMemory(0x080e7db2, "01");
patchMemory(0x0009FF41, "15");
patchMemory(0x080e7f5f, "B80100000090");
}
break;
case HUMMER_EXTREME:
Expand Down

0 comments on commit e0c98d4

Please sign in to comment.