cellGame, cellSysutil and TRP installer improved

* TRP Loader and sceNpTrophyRegisterContext improved.
* cellSysutil constants moved to cellSysutil.h
* cellGameBootCheck bug fixed that makes size->hddFreeSizeKB be 0.
* Added system language selector (this is *not* RPCS3's language).
cellSysutilGetSystemParamInt(0x111) will return the selected language.

NOTE: The problems caused by the last commit (pull request #104 merged)
are not yet fixed.
This commit is contained in:
Alexandro Sánchez Bach 2014-03-17 20:34:19 +01:00
parent 9786c036d5
commit cf4501fe41
8 changed files with 270 additions and 162 deletions

View file

@ -116,14 +116,10 @@ int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_t<CellGameConten
type.GetAddr(), attributes.GetAddr(), size.GetAddr(), dirName.GetAddr());
if (!type.IsGood() || !attributes.IsGood() || !size.IsGood() || !dirName.IsGood())
{
cellGame.Warning("cellGameBootCheck returns CELL_GAME_ERROR_PARAM. As a result size->hddFreeSizeKB may be 0.");
return CELL_GAME_ERROR_PARAM;
// TODO: Locate the PARAM.SFO. The following path may be wrong.
vfsFile f("/app_home/PARAM.SFO");
PSFLoader psf(f);
if(!psf.Load(false))
return CELL_GAME_ERROR_FAILURE;
wxString dir = psf.m_info.serial(0,4) + psf.m_info.serial(5,5);
}
// TODO: Only works for HDD games
type = CELL_GAME_GAMETYPE_HDD;
@ -131,6 +127,13 @@ int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_t<CellGameConten
size->hddFreeSizeKB = 40000000; //40 GB, TODO: Use the free space of the computer's HDD where RPCS3 is being run.
size->sizeKB = CELL_GAME_SIZEKB_NOTCALC;
size->sysSizeKB = 0;
// TODO: Locate the PARAM.SFO. The following path may be wrong.
vfsFile f("/app_home/PARAM.SFO");
PSFLoader psf(f);
if(!psf.Load(false))
return CELL_GAME_ERROR_FAILURE;
wxString dir = psf.m_info.serial(0,4) + psf.m_info.serial(5,5);
Memory.WriteString(dirName.GetAddr(), dir);
return CELL_OK;