1
0
mirror of synced 2024-11-27 19:10:48 +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);*/
// Implement SIGSEGV handler
struct sigaction act;
act.sa_sigaction = handleSegfault;
act.sa_flags = SA_SIGINFO;
sigaction(SIGSEGV, &act, NULL);
// struct sigaction act;
// act.sa_sigaction = handleSegfault;
// act.sa_flags = SA_SIGINFO;
// sigaction(SIGSEGV, &act, NULL);
initConfig();

View File

@ -110,7 +110,7 @@ void _putConsole(const char *format, ...)
}
else if (*format == '0')
{
format ++;
format++;
if (*format == '2')
{
format++;
@ -137,6 +137,30 @@ void _putConsole(const char *format, ...)
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()
{
Game game = getConfig()->game;
@ -287,6 +311,11 @@ int initPatch()
fwrite((void *)0x08048000,0x630fac,1,file);
fclose(file);*/
detourFunction(0x084e4efc, amDipswInit);
detourFunction(0x084e500e, amDipswGetData);
detourFunction(0x084e5086, amDipswSetLed);
detourFunction(0x084e4f98, amDipswExit);
}
break;
case LETS_GO_JUNGLE_SPECIAL: