diff --git a/rpcs3/Emu/Cell/Modules/cellFs.cpp b/rpcs3/Emu/Cell/Modules/cellFs.cpp index 1ac9a05dfe..c0ca6a1ed8 100644 --- a/rpcs3/Emu/Cell/Modules/cellFs.cpp +++ b/rpcs3/Emu/Cell/Modules/cellFs.cpp @@ -1017,9 +1017,10 @@ s32 cellFsChangeFileSizeWithoutAllocation() throw EXCEPTION(""); } -s32 cellFsAllocateFileAreaWithoutZeroFill() +s32 cellFsAllocateFileAreaWithoutZeroFill(vm::cptr path, u64 size) { - throw EXCEPTION(""); + cellFs.warning("cellFsAllocateFileAreaWithoutZeroFill(path=*0x%x, size=0x%llx)", path, size); + return sys_fs_truncate(path, size); } s32 cellFsChangeFileSizeByFdWithoutAllocation() diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index de95dfebdd..ff18d94620 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -124,7 +124,12 @@ s32 sys_fs_open(vm::cptr path, s32 flags, vm::ptr fd, s32 mode, vm::c s32 sys_fs_read(u32 fd, vm::ptr buf, u64 nbytes, vm::ptr nread) { - sys_fs.trace("sys_fs_read(fd=%d, buf=0x%x, nbytes=0x%llx, nread=0x%x)", fd, buf, nbytes, nread); + sys_fs.trace("sys_fs_read(fd=%d, buf=*0x%x, nbytes=0x%llx, nread=*0x%x)", fd, buf, nbytes, nread); + + if (!buf) + { + return CELL_EFAULT; + } const auto file = idm::get(fd);