Skip to content

syscall 0x5A/0x5B fallback bug #126

@ran-j

Description

@ran-j

During runtime startup, some games patch EE kernel syscalls using SetSyscall. The runtime detects these overrides and tries to invoke the installed handler through rpcInvokeFunction.

In the current case, the game installs syscall overrides for 0x5A and 0x5B, but the runtime fails to invoke the override handlers and falls back to the builtin dispatcher path.

Observed log:

[SyscallOverride:fallback] syscall=0x5a handler=0x14d5b8 pc=0x14d5ac ra=0x14d660
[SyscallOverride:fallback] syscall=0x5a handler=0x14d5b8 pc=0x14d5ac ra=0x14d678

[SyscallOverride:fallback] syscall=0x5b handler=0x80076000 pc=0x14d5f4 ra=0x14d6a0
[SyscallOverride:fallback] syscall=0x5b handler=0x80076000 pc=0x14d5f4 ra=0x14d6a0

It should be
0x5A -> Copy
0x5B -> GetEntryAddress

Today is
case 0x5A:
QueryBootMode(rdram, ctx, runtime);
return true;

case 0x5B:
GetThreadTLS(rdram, ctx, runtime);
return true;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrunime

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions