diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index 32bace6827..0d0c7977bc 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -87,13 +87,14 @@ s32 cellHddGameCheck(PPUThread& ppu, u32 version, vm::cptr dirName, u32 er // TODO: Is cellHddGameCheck really responsible for writing the information in get->getParam ? (If not, delete this else) const auto& psf = psf::load_object(fs::file(local_dir +"/PARAM.SFO")); - get->getParam.parentalLevel = psf.at("PARENTAL_LEVEL").as_integer(); - get->getParam.attribute = psf.at("ATTRIBUTE").as_integer(); - get->getParam.resolution = psf.at("RESOLUTION").as_integer(); - get->getParam.soundFormat = psf.at("SOUND_FORMAT").as_integer(); - strcpy_trunc(get->getParam.title, psf.at("TITLE").as_string()); - strcpy_trunc(get->getParam.dataVersion, psf.at("APP_VER").as_string()); - strcpy_trunc(get->getParam.titleId, psf.at("TITLE_ID").as_string()); + // Some following fields may be zero in old FW 1.00 version PARAM.SFO + if (psf.count("PARENTAL_LEVEL") != 0) get->getParam.parentalLevel = psf.at("PARENTAL_LEVEL").as_integer(); + if (psf.count("ATTRIBUTE") != 0) get->getParam.attribute = psf.at("ATTRIBUTE").as_integer(); + if (psf.count("RESOLUTION") != 0) get->getParam.resolution = psf.at("RESOLUTION").as_integer(); + if (psf.count("SOUND_FORMAT") != 0) get->getParam.soundFormat = psf.at("SOUND_FORMAT").as_integer(); + if (psf.count("TITLE") != 0) strcpy_trunc(get->getParam.title, psf.at("TITLE").as_string()); + if (psf.count("APP_VER") != 0) strcpy_trunc(get->getParam.dataVersion, psf.at("APP_VER").as_string()); + if (psf.count("TITLE_ID") != 0) strcpy_trunc(get->getParam.titleId, psf.at("TITLE_ID").as_string()); for (u32 i = 0; i < CELL_HDDGAME_SYSP_LANGUAGE_NUM; i++) {