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

[Hotfix] Fixed a bug that normal games couldn't boot properly after VSH booted #13980

Merged
merged 2 commits into from Jun 8, 2023
Merged

Conversation

brian218
Copy link
Contributor

@brian218 brian218 commented Jun 8, 2023

The bug in unself.cpp's decrypt_self() wasn't causing actual problems before #13840 because g_ps3_process_info.self_info.prog_id_hdr wasn't really used to determine the type of the SELF being executed (e.g. Emu.IsVsh() didn't use it).

After #13840, the emulator determines whether the SELF is VSH (or other userspace CoreOS LV2 SELFs) by checking its Program Auth ID in g_ps3_process_info.self_info.prog_id_hdr, so the bug in unself.cpp's decrypt_self() prevents SELFs or games executed after VSH from accessing the necessary sprx modules (check out https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/Cell/PPUModule.cpp#L2111).

@brian218 brian218 changed the title [Hotfix] Fixed an bug that normal games couldn't boot after VSH booted [Hotfix] Fixed a bug that normal games couldn't boot properly after VSH booted Jun 8, 2023
rpcs3/Crypto/unself.cpp Outdated Show resolved Hide resolved
@Megamouse
Copy link
Contributor

Actually this makes me wonder why it doesn't work as is.
The valid flag is probably ignored at some place

@brian218
Copy link
Contributor Author

brian218 commented Jun 8, 2023

Actually this makes me wonder why it doesn't work as is. The valid flag is probably ignored at some place

Or you think I had better change the Emu.IsVsh() to return g_ps3_process_info.self_info.valid && (g_ps3_process_info.self_info.prog_id_hdr.program_authority_id >> 52 == 0x107);?

@Megamouse
Copy link
Contributor

Yes

@Megamouse
Copy link
Contributor

Both

@brian218
Copy link
Contributor Author

brian218 commented Jun 8, 2023

Both

Done.

@Megamouse Megamouse merged commit ad22cf5 into RPCS3:master Jun 8, 2023
4 of 5 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.

None yet

2 participants