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

Add RPCS3/games/ for automatic games detection, support PSN games outside HDD0 #12982

Merged
merged 8 commits into from
Dec 2, 2022

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Nov 26, 2022

  • Create a directory called "games" in RPCS3 program directory which disc games can be put and automatically be added to the games list.
  • Support PSN games outside of /dev_hdd0/game. Technically RPCS3 never forbid it, it just crashed most of the time when attempting to load them. Updates are not installed for it. (meaning it can be used as a backup in case updating fails)
  • Do not load PARAM.SFO with TITLE_ID that has non-alphabetic or non-digits characters, this is to protect from potential malware files with special filesystem redirections.

@elad335 elad335 changed the title Add RPCS3/Games/ for automatic games detection, support PSN games outside HDD0 Add RPCS3/games/ for automatic games detection, support PSN games outside HDD0 Nov 26, 2022
@elad335 elad335 force-pushed the games-gui branch 5 times, most recently from 7859fb4 to acebbe6 Compare November 26, 2022 13:26
@Megamouse Megamouse added Miscellaneous Loader Involving the load of PS3 file formats labels Nov 27, 2022
rpcs3/Loader/PSF.cpp Outdated Show resolved Hide resolved
rpcs3/Emu/System.h Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/game_list_frame.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/game_list_frame.cpp Show resolved Hide resolved
Comment on lines +973 to +986
constexpr auto game0_path = "/dev_hdd0/game/"sv;

if (argv[0].starts_with(game0_path) && !fs::is_file(vfs::get(argv[0])))
{
std::string title_id = argv[0].substr(game0_path.size());
title_id = title_id.substr(0, title_id.find_last_not_of('/'));

// Try to load game directory from list if available
if (auto node = (title_id.empty() ? YAML::Node{} : games[title_id]))
{
disc = node.Scalar();
m_path = disc + argv[0].substr(game0_path.size() + title_id.size());
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tries to find the digital game in games.yml

Copy link
Contributor Author

@elad335 elad335 Nov 27, 2022

Choose a reason for hiding this comment

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

This is for savestates, savestates save only guest path so it needs to deal with it by trying to find the game in places it can be. (that's how disc games are handled as well)

@Nekotekina Nekotekina merged commit ad3ea96 into RPCS3:master Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Loader Involving the load of PS3 file formats Miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants