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

Remove seg handler and stub dipsw functions

This commit is contained in:
Bobby Dilley 2023-11-28 23:12:52 +00:00
parent a68685200f
commit 35ef0fa98b
2 changed files with 34 additions and 5 deletions

View File

@ -145,10 +145,10 @@ void __attribute__((constructor)) hook_init()
fclose(file);*/ fclose(file);*/
// Implement SIGSEGV handler // Implement SIGSEGV handler
struct sigaction act; // struct sigaction act;
act.sa_sigaction = handleSegfault; // act.sa_sigaction = handleSegfault;
act.sa_flags = SA_SIGINFO; // act.sa_flags = SA_SIGINFO;
sigaction(SIGSEGV, &act, NULL); // sigaction(SIGSEGV, &act, NULL);
initConfig(); initConfig();

View File

@ -137,6 +137,30 @@ void _putConsole(const char *format, ...)
printf("\n"); printf("\n");
} }
int amDipswInit()
{
printf("amDipswInit called\n");
return 0;
}
int amDipswGetData()
{
printf("amDipswGetData called\n");
return 0;
}
int amDipswSetLed()
{
printf("amDipswSetLed called\n");
return 0;
}
int amDipswExit()
{
printf("amDipswExit called\n");
return 0;
}
int initPatch() int initPatch()
{ {
Game game = getConfig()->game; Game game = getConfig()->game;
@ -287,6 +311,11 @@ int initPatch()
fwrite((void *)0x08048000,0x630fac,1,file); fwrite((void *)0x08048000,0x630fac,1,file);
fclose(file);*/ fclose(file);*/
detourFunction(0x084e4efc, amDipswInit);
detourFunction(0x084e500e, amDipswGetData);
detourFunction(0x084e5086, amDipswSetLed);
detourFunction(0x084e4f98, amDipswExit);
} }
break; break;
case LETS_GO_JUNGLE_SPECIAL: case LETS_GO_JUNGLE_SPECIAL: