Implement SetSyscall (syscall 0x74) with safe override/fallback dispatch#94
Open
Whoneon wants to merge 2 commits intoran-j:mainfrom
Open
Implement SetSyscall (syscall 0x74) with safe override/fallback dispatch#94Whoneon wants to merge 2 commits intoran-j:mainfrom
Whoneon wants to merge 2 commits intoran-j:mainfrom
Conversation
ran-j
requested changes
Mar 4, 2026
| SetVSyncFlag(rdram, ctx, runtime); | ||
| return true; | ||
| case 0x74: | ||
| RegisterExitHandler(rdram, ctx, runtime); |
Owner
There was a problem hiding this comment.
Please don't remove exit. Move it to correct syscall id
| setReturnS32(ctx, 0); | ||
| } | ||
|
|
||
| static bool dispatchSyscallOverride(uint32_t syscallNumber, uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime) |
Owner
There was a problem hiding this comment.
Can you explain what is this function?
Contributor
Author
There was a problem hiding this comment.
It checks whether a given numeric syscall has a runtime override registered. If found and is callable, the function forwards execution there and returns true. If no valid override exists, it returns false
Owner
|
I was playing around with this and I think I found a bug. I will confirm later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements numeric syscall
0x74asSetSyscall, with runtime override support for numeric syscalls. This was discussed before in #93Motivation
Generated code from Burnout 3 (SLUS 210.50) shows explicit
syscallusage with$v1 = 0x74(SetSyscall). This has been confirmed by looking at PS2Tek and ps2sdk syscallnr.h and using them as SoTWhat changed
0x74now dispatches toSetSyscall.syscallIndex -> handlerAddress.SetSyscallto the call-list X-macro.Tests
Added kernel runtime tests that verify:
v0