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

IdManager.cpp: Fix cellFs IDs #12604

Merged
merged 2 commits into from
Sep 7, 2022
Merged

IdManager.cpp: Fix cellFs IDs #12604

merged 2 commits into from
Sep 7, 2022

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Sep 4, 2022

  • Fix cellFs IDs to always take the lowest ID value possible, this fixes this game's installation: tries to access the ID of a closed installation file after opening different ones after. It works on PS3 because the old ID should be equal to one of the newer ones.
    I've limited this fix very specifically to cellFs because I really do not want regressions.. Testcase which now matches RPCS3: elad335/myps3tests@51b1257

  • Remove wrong error checking in cellGame - this allows for games to register only the disc-eject callback as seen in this game.

Fixes Spider-Man: Web of Shadows, Intro -> Ingame. (if you already ran this game on RPCS3 you need to delete its installation data for it to work)
image

@elad335
Copy link
Contributor Author

elad335 commented Sep 4, 2022

Added this as an ID trait.

Emu.GetCallbacks().enable_disc_eject(true);
Emu.GetCallbacks().enable_disc_insert(false);
Emu.GetCallbacks().enable_disc_eject(!!func_eject);
Emu.GetCallbacks().enable_disc_insert(!!func_insert);
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes zero sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the eject enabling had the same bug if there is no disc.

Copy link
Contributor

Choose a reason for hiding this comment

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

The whole thing is only supposed to work if the game is a disc game.
So it is guaranteed that a disc is present when the callback is registered.
The game would've been terminated if it was ejected beforehand.
So it has to eject the disc before it can insert a new one

Copy link
Contributor

Choose a reason for hiding this comment

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

The only way to enable this for HDD games would be to check here if bdvd is mounted and then enable one of them depending on the mounting state and the presence of the respective callback.

Copy link
Contributor

Choose a reason for hiding this comment

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

In any case it is wrong to enable both eject and insert.

Copy link
Contributor

Choose a reason for hiding this comment

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

Additionally, insert should not be enabled on an eject if the insert callback is missing and vice versa

@Megamouse
Copy link
Contributor

Please stop adding random stuff to PRs with unrelated titles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants