diff --git a/rpcs3/Emu/Audio/sysutil_audio.h b/rpcs3/Emu/Audio/sysutil_audio.h index ea470c4779..aa60f4c1ee 100644 --- a/rpcs3/Emu/Audio/sysutil_audio.h +++ b/rpcs3/Emu/Audio/sysutil_audio.h @@ -257,3 +257,23 @@ struct CellAudioInDeviceConfiguration u8 reserved[31]; }; +enum CellBgmPlaybackStatusState +{ + CELL_BGMPLAYBACK_STATUS_PLAY = 0, + CELL_BGMPLAYBACK_STATUS_STOP = 1 +}; + +enum CellBgmPlaybackStatusEnabled +{ + CELL_BGMPLAYBACK_STATUS_ENABLE = 0, + CELL_BGMPLAYBACK_STATUS_DISABLE = 1 +}; + +struct CellBgmPlaybackStatus +{ + u8 playbackState; + u8 enabled; + char contentId[16]; + u8 fadeRatio; + char reserved[13]; +}; diff --git a/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp b/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp index c261d848e9..9858be8617 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp @@ -911,6 +911,19 @@ int cellHddGameCheck(u32 version, u32 dirName_addr, u32 errDialog, mem_func_ptr_ return CELL_OK; } +int cellSysutilGetBgmPlaybackStatus(mem_ptr_t status) +{ + cellSysutil.Warning("cellSysutilGetBgmPlaybackStatus(status=0x%x)", status.GetAddr()); + + // non-essential, so always assume background music is stopped/disabled + status->playbackState = CELL_BGMPLAYBACK_STATUS_STOP; + status->enabled = CELL_BGMPLAYBACK_STATUS_DISABLE; + status->fadeRatio = 0; // volume ratio + memset(status->contentId, 0, sizeof(status->contentId)); + + return CELL_OK; +} + void cellSysutil_init() { cellSysutil.AddFunc(0x40e895d3, cellSysutilGetSystemParamInt); @@ -940,6 +953,8 @@ void cellSysutil_init() cellSysutil.AddFunc(0xed5d96af, cellAudioOutGetConfiguration); cellSysutil.AddFunc(0xc96e89e9, cellAudioOutSetCopyControl); + cellSysutil.AddFunc(0xa11552f6, cellSysutilGetBgmPlaybackStatus); + cellSysutil.AddFunc(0x1e7bff94, cellSysCacheMount); cellSysutil.AddFunc(0x744c1544, cellSysCacheClear);