mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
Implemented cellDiscGameGetBootDiscInfo
This commit is contained in:
parent
63169d7679
commit
b4557789f8
2 changed files with 22 additions and 2 deletions
|
@ -757,9 +757,21 @@ s32 cellGameThemeInstallFromBuffer()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
s32 cellDiscGameGetBootDiscInfo()
|
s32 cellDiscGameGetBootDiscInfo(vm::ptr<CellDiscGameSystemFileParam> getParam)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellGame);
|
cellGame.warning("cellDiscGameGetBootDiscInfo(getParam=*0x%x)", getParam);
|
||||||
|
//this should only appear in disc games
|
||||||
|
const std::string dir = "/dev_bdvd/PS3_GAME"s;
|
||||||
|
|
||||||
|
if (!fs::is_dir(vfs::get(dir)))
|
||||||
|
{
|
||||||
|
cellGame.warning("cellDiscGameGetBootDiscInfo(): directory '%s' not found", dir);
|
||||||
|
}
|
||||||
|
const auto& psf = psf::load_object(fs::file(vfs::get(dir + "/PARAM.SFO")));
|
||||||
|
|
||||||
|
if (psf.count("PARENTAL_LEVEL") != 0) getParam->parentalLevel = psf.at("PARENTAL_LEVEL").as_integer();
|
||||||
|
if (psf.count("TITLE_ID") != 0) strcpy_trunc(getParam->titleId, psf.at("TITLE_ID").as_string());
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,8 @@ enum // old consts
|
||||||
|
|
||||||
CELL_GAMEDATA_ERRDIALOG_NONE = 0,
|
CELL_GAMEDATA_ERRDIALOG_NONE = 0,
|
||||||
CELL_GAMEDATA_ERRDIALOG_ALWAYS = 1,
|
CELL_GAMEDATA_ERRDIALOG_ALWAYS = 1,
|
||||||
|
|
||||||
|
CELL_DISCGAME_SYSP_TITLEID_SIZE=10,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CellGameDataSystemFileParam
|
struct CellGameDataSystemFileParam
|
||||||
|
@ -192,6 +194,12 @@ struct CellGameDataSystemFileParam
|
||||||
be_t<u32> attribute;
|
be_t<u32> attribute;
|
||||||
char reserved2[256];
|
char reserved2[256];
|
||||||
};
|
};
|
||||||
|
struct CellDiscGameSystemFileParam {
|
||||||
|
char titleId[CELL_DISCGAME_SYSP_TITLEID_SIZE];
|
||||||
|
char reserved0[2];
|
||||||
|
be_t<u32> parentalLevel;
|
||||||
|
char reserved1[16];
|
||||||
|
};
|
||||||
|
|
||||||
struct CellGameDataStatGet
|
struct CellGameDataStatGet
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue