From 2d45ecff2288b375e4b190387ea2ce472da502aa Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 3 Sep 2022 07:29:07 +0300 Subject: [PATCH] cellSaveData: Adjust to non-TSX --- rpcs3/Emu/Cell/Modules/cellSaveData.cpp | 7 ++++++- rpcs3/Emu/Cell/lv2/sys_tty.cpp | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index 68168b3939..648c94b225 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -1380,6 +1380,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v bool recreated = false; lv2_sleep(ppu, 250); + ppu.state += cpu_flag::wait; // Check if RPCS3_BLIST section exist in PARAM.SFO // This section contains the list of files in the save ordered as they would be in BSD filesystem @@ -1523,6 +1524,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v // Stat Callback funcStat(ppu, result, statGet, statSet); + ppu.state += cpu_flag::wait; if (const s32 res = result->result; res != CELL_SAVEDATA_CBRESULT_OK_NEXT) { @@ -1689,6 +1691,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v std::memset(result.get_ptr(), 0, ::offset32(&CellSaveDataCBResult::userdata)); funcFile(ppu, result, fileGet, fileSet); + ppu.state += cpu_flag::wait; if (const s32 res = result->result; res != CELL_SAVEDATA_CBRESULT_OK_NEXT) { @@ -2406,8 +2409,10 @@ error_code cellSaveDataFixedExport(ppu_thread& ppu, vm::cptr dirName, u32 return CELL_OK; } -error_code cellSaveDataGetListItem(vm::cptr dirName, vm::ptr dir, vm::ptr sysFileParam, vm::ptr bind, vm::ptr sizeKB) +error_code cellSaveDataGetListItem(ppu_thread& ppu, vm::cptr dirName, vm::ptr dir, vm::ptr sysFileParam, vm::ptr bind, vm::ptr sizeKB) { + ppu.state += cpu_flag::wait; + cellSaveData.warning("cellSaveDataGetListItem(dirName=%s, dir=*0x%x, sysFileParam=*0x%x, bind=*0x%x, sizeKB=*0x%x)", dirName, dir, sysFileParam, bind, sizeKB); return savedata_get_list_item(dirName, dir, sysFileParam, bind, sizeKB, 0); diff --git a/rpcs3/Emu/Cell/lv2/sys_tty.cpp b/rpcs3/Emu/Cell/lv2/sys_tty.cpp index 3a93172746..3df7c72f29 100644 --- a/rpcs3/Emu/Cell/lv2/sys_tty.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_tty.cpp @@ -92,6 +92,8 @@ std::string dump_useful_thread_info(); error_code sys_tty_write([[maybe_unused]] ppu_thread& ppu, s32 ch, vm::cptr buf, u32 len, vm::ptr pwritelen) { + ppu.state += cpu_flag::wait; + sys_tty.notice("sys_tty_write(ch=%d, buf=*0x%x, len=%d, pwritelen=*0x%x)", ch, buf, len, pwritelen); std::string msg;