@@ -464,6 +464,8 @@ error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr<char> dirName
464464 {
465465 get->isNewData = CELL_HDDGAME_ISNEWDATA_NODIR;
466466 get->getParam = {};
467+
468+ cellGame.warning (" cellHddGameCheck(): New data." );
467469 }
468470 else
469471 {
@@ -476,13 +478,22 @@ error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr<char> dirName
476478 if (psf.contains (" RESOLUTION" )) get->getParam .resolution = ::at32 (psf, " RESOLUTION" ).as_integer ();
477479 if (psf.contains (" SOUND_FORMAT" )) get->getParam .soundFormat = ::at32 (psf, " SOUND_FORMAT" ).as_integer ();
478480 if (psf.contains (" TITLE" )) strcpy_trunc (get->getParam .title , ::at32 (psf, " TITLE" ).as_string ());
479- if (psf.contains (" APP_VER" )) strcpy_trunc (get->getParam .dataVersion , ::at32 (psf, " APP_VER" ).as_string ());
480- if (psf.contains (" TITLE_ID" )) strcpy_trunc (get->getParam .titleId , ::at32 (psf, " TITLE_ID" ).as_string ());
481+
482+ // Old games do not have APP_VER key
483+ strcpy_trunc (get->getParam .dataVersion , psf::get_string (psf, " APP_VER" , psf::get_string (sfo, " VERSION" , " " )));
484+
485+ if (psf.contains (" TITLE_ID" ))
486+ {
487+ strcpy_trunc (get->getParam .titleId , ::at32 (psf, " TITLE_ID" ).as_string ());
488+ }
481489
482490 for (u32 i = 0 ; i < CELL_HDDGAME_SYSP_LANGUAGE_NUM; i++)
483491 {
484492 strcpy_trunc (get->getParam .titleLang [i], psf::get_string (psf, fmt::format (" TITLE_%02d" , i)));
485493 }
494+
495+ cellGame.warning (" cellHddGameCheck(): Data exists:\n ATTRIBUTE: 0x%x, RESOLUTION: 0x%x, RESOLUTION: 0x%x, SOUND_FORMAT: 0x%x, dataVersion: %s"
496+ , get->getParam .attribute , get->getParam .resolution , get->getParam .soundFormat , get->getParam .soundFormat , std::span<const u8 >(reinterpret_cast <const u8 *>(get->getParam .dataVersion ), 6 ));
486497 }
487498
488499 // TODO ?
0 commit comments