cellGame: Fix cellHddGameCheck dataVersion parameter
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.7, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.7, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.7, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.7, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, .ci/build-mac.sh, Intel) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, .ci/build-mac-arm64.sh, Apple Silicon) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang (win64, clang, clang64) (push) Waiting to run
Build RPCS3 / RPCS3 FreeBSD (push) Waiting to run

This commit is contained in:
Elad 2025-10-30 20:15:17 +02:00
parent 3a6c71e523
commit ba2518f862
2 changed files with 22 additions and 11 deletions

View file

@ -464,6 +464,8 @@ error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr<char> dirName
{ {
get->isNewData = CELL_HDDGAME_ISNEWDATA_NODIR; get->isNewData = CELL_HDDGAME_ISNEWDATA_NODIR;
get->getParam = {}; get->getParam = {};
cellGame.warning("cellHddGameCheck(): New data.");
} }
else else
{ {
@ -476,13 +478,22 @@ error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr<char> dirName
if (psf.contains("RESOLUTION")) get->getParam.resolution = ::at32(psf, "RESOLUTION").as_integer(); if (psf.contains("RESOLUTION")) get->getParam.resolution = ::at32(psf, "RESOLUTION").as_integer();
if (psf.contains("SOUND_FORMAT")) get->getParam.soundFormat = ::at32(psf, "SOUND_FORMAT").as_integer(); if (psf.contains("SOUND_FORMAT")) get->getParam.soundFormat = ::at32(psf, "SOUND_FORMAT").as_integer();
if (psf.contains("TITLE")) strcpy_trunc(get->getParam.title, ::at32(psf, "TITLE").as_string()); if (psf.contains("TITLE")) strcpy_trunc(get->getParam.title, ::at32(psf, "TITLE").as_string());
if (psf.contains("APP_VER")) strcpy_trunc(get->getParam.dataVersion, ::at32(psf, "APP_VER").as_string());
if (psf.contains("TITLE_ID")) strcpy_trunc(get->getParam.titleId, ::at32(psf, "TITLE_ID").as_string()); // Old games do not have APP_VER key
strcpy_trunc(get->getParam.dataVersion, psf::get_string(psf, "APP_VER", psf::get_string(sfo, "VERSION", "")));
if (psf.contains("TITLE_ID"))
{
strcpy_trunc(get->getParam.titleId, ::at32(psf, "TITLE_ID").as_string());
}
for (u32 i = 0; i < CELL_HDDGAME_SYSP_LANGUAGE_NUM; i++) for (u32 i = 0; i < CELL_HDDGAME_SYSP_LANGUAGE_NUM; i++)
{ {
strcpy_trunc(get->getParam.titleLang[i], psf::get_string(psf, fmt::format("TITLE_%02d", i))); strcpy_trunc(get->getParam.titleLang[i], psf::get_string(psf, fmt::format("TITLE_%02d", i)));
} }
cellGame.warning("cellHddGameCheck(): Data exists:\nATTRIBUTE: 0x%x, RESOLUTION: 0x%x, RESOLUTION: 0x%x, SOUND_FORMAT: 0x%x, dataVersion: %s"
, get->getParam.attribute, get->getParam.resolution, get->getParam.soundFormat, get->getParam.soundFormat, std::span<const u8>(reinterpret_cast<const u8*>(get->getParam.dataVersion), 6));
} }
// TODO ? // TODO ?

View file

@ -224,8 +224,8 @@ enum
struct CellGameDataSystemFileParam struct CellGameDataSystemFileParam
{ {
char title[CELL_GAMEDATA_SYSP_TITLE_SIZE]; char title[CELL_GAMEDATA_SYSP_TITLE_SIZE];
char titleLang[CELL_GAMEDATA_SYSP_LANGUAGE_NUM][CELL_GAMEDATA_SYSP_TITLE_SIZE]; char titleLang[CELL_GAMEDATA_SYSP_LANGUAGE_NUM][CELL_GAMEDATA_SYSP_TITLE_SIZE]; // 0x80
char titleId[CELL_GAMEDATA_SYSP_TITLEID_SIZE]; char titleId[CELL_GAMEDATA_SYSP_TITLEID_SIZE]; // 0xA80
char reserved0[2]; char reserved0[2];
char dataVersion[CELL_GAMEDATA_SYSP_VERSION_SIZE]; char dataVersion[CELL_GAMEDATA_SYSP_VERSION_SIZE];
char reserved1[2]; char reserved1[2];
@ -248,13 +248,13 @@ struct CellGameDataStatGet
{ {
be_t<s32> hddFreeSizeKB; be_t<s32> hddFreeSizeKB;
be_t<u32> isNewData; be_t<u32> isNewData;
char contentInfoPath[CELL_GAMEDATA_PATH_MAX]; char contentInfoPath[CELL_GAMEDATA_PATH_MAX]; // 0x8
char gameDataPath[CELL_GAMEDATA_PATH_MAX]; char gameDataPath[CELL_GAMEDATA_PATH_MAX]; // 0x427
char reserved0[2]; char reserved0[2]; // 0x846
be_t<s64> st_atime_; be_t<s64> st_atime_; // 0x848
be_t<s64> st_mtime_; be_t<s64> st_mtime_; // 0x850
be_t<s64> st_ctime_; be_t<s64> st_ctime_; // 0x858
CellGameDataSystemFileParam getParam; CellGameDataSystemFileParam getParam; // 0x860
be_t<s32> sizeKB; be_t<s32> sizeKB;
be_t<s32> sysSizeKB; be_t<s32> sysSizeKB;
char reserved1[68]; char reserved1[68];