Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetMemoryMode syscall related changes #724

Merged
merged 2 commits into from
Jan 25, 2025

Conversation

uyjulian
Copy link
Member

This mainly avoids a fileio call at init

@israpps
Copy link
Contributor

israpps commented Jan 24, 2025

Just curiosity

Is this really PSX only? Isn't it applicable to namco system 256 since it also recycles the PSX EE+GS chip revision

@@ -52,7 +53,7 @@ void _libcglue_rtc_update() {}
// "weak" function called by crt0.o
void _ps2sdk_memory_init()
{
if (GetMemorySize() == (32 * 1024 * 1024) && IsDESRMachine() == 1) {
if (GetMemorySize() == (32 * 1024 * 1024) && GetSyscallHandler(__NR_GetMemoryMode) && GetMemoryMode() == 1) {
Copy link
Member

@fjtrujy fjtrujy Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we create a macro to make easier the usage of this GetSyscallHandler(__NR_GetMemoryMode) && GetMemoryMode() == 1? or even the whole if condition?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea, but since it is in the sample I left it out of this PR for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗

@uyjulian
Copy link
Member Author

Just curiosity

Is this really PSX only? Isn't it applicable to namco system 256 since it also recycles the PSX EE+GS chip revision

Yes, it is not applicable to System 256/148 or DTL-T due to missing relevant system calls

@fjtrujy
Copy link
Member

fjtrujy commented Jan 24, 2025

@rickgaiser any concern?

@fjtrujy fjtrujy merged commit 748cd5c into ps2dev:master Jan 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants