From 3f9affd2ad74f4201c9382c8c4fa7bd7267c2003 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 22 Jul 2017 16:29:38 +0300 Subject: [PATCH] Stub some SPU syscalls --- rpcs3/Emu/Cell/PPUFunction.cpp | 8 ++++---- rpcs3/Emu/Cell/lv2/lv2.cpp | 8 ++++---- rpcs3/Emu/Cell/lv2/sys_spu.cpp | 28 ++++++++++++++++++++++++++++ rpcs3/Emu/Cell/lv2/sys_spu.h | 4 ++++ 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUFunction.cpp b/rpcs3/Emu/Cell/PPUFunction.cpp index 56381997e4..9e1522e52d 100644 --- a/rpcs3/Emu/Cell/PPUFunction.cpp +++ b/rpcs3/Emu/Cell/PPUFunction.cpp @@ -129,11 +129,11 @@ extern std::string ppu_get_syscall_name(u64 code) case 152: return "sys_raw_spu_get_int_mask"; case 153: return "sys_raw_spu_set_int_stat"; case 154: return "sys_raw_spu_get_int_stat"; - case 155: return "sys_spu_image_get_information?"; + case 155: return "_sys_spu_image_get_information"; case 156: return "sys_spu_image_open"; - case 157: return "sys_spu_image_import"; - case 158: return "sys_spu_image_close"; - case 159: return "sys_raw_spu_load"; + case 157: return "_sys_spu_image_import"; + case 158: return "_sys_spu_image_close"; + case 159: return "_sys_raw_spu_image_load"; case 160: return "sys_raw_spu_create"; case 161: return "sys_raw_spu_destroy"; case 163: return "sys_raw_spu_read_puint_mb"; diff --git a/rpcs3/Emu/Cell/lv2/lv2.cpp b/rpcs3/Emu/Cell/lv2/lv2.cpp index 65777722ae..2013ee8b23 100644 --- a/rpcs3/Emu/Cell/lv2/lv2.cpp +++ b/rpcs3/Emu/Cell/lv2/lv2.cpp @@ -202,11 +202,11 @@ const std::array s_ppu_syscall_table BIND_FUNC(sys_raw_spu_get_int_mask), //152 (0x098) BIND_FUNC(sys_raw_spu_set_int_stat), //153 (0x099) BIND_FUNC(sys_raw_spu_get_int_stat), //154 (0x09A) - null_func,//BIND_FUNC(sys_spu_image_get_information?) //155 (0x09B) + BIND_FUNC(_sys_spu_image_get_information), //155 (0x09B) BIND_FUNC(sys_spu_image_open), //156 (0x09C) - null_func,//BIND_FUNC(sys_spu_image_import) //157 (0x09D) - null_func,//BIND_FUNC(sys_spu_image_close) //158 (0x09E) - null_func,//BIND_FUNC(sys_raw_spu_load) //159 (0x09F) + BIND_FUNC(_sys_spu_image_import), //157 (0x09D) + BIND_FUNC(_sys_spu_image_close), //158 (0x09E) + BIND_FUNC(_sys_raw_spu_image_load), //159 (0x09F) BIND_FUNC(sys_raw_spu_create), //160 (0x0A0) BIND_FUNC(sys_raw_spu_destroy), //161 (0x0A1) null_func, //162 (0x0A2) UNS diff --git a/rpcs3/Emu/Cell/lv2/sys_spu.cpp b/rpcs3/Emu/Cell/lv2/sys_spu.cpp index ec1214d4e0..bb04d52613 100644 --- a/rpcs3/Emu/Cell/lv2/sys_spu.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_spu.cpp @@ -158,6 +158,13 @@ error_code sys_spu_initialize(u32 max_usable_spu, u32 max_raw_spu) return CELL_OK; } +error_code _sys_spu_image_get_information(vm::ptr img, u32 ptr1, u32 ptr2) +{ + sys_spu.todo("_sys_spu_image_get_information(img=*0x%x, 1=*0x%x, 2=*0x%x)", img, ptr1, ptr2); + + fmt::throw_exception("Unimplemented syscall: _sys_spu_image_get_information"); +} + error_code sys_spu_image_open(vm::ptr img, vm::cptr path) { sys_spu.warning("sys_spu_image_open(img=*0x%x, path=%s)", img, path); @@ -175,6 +182,27 @@ error_code sys_spu_image_open(vm::ptr img, vm::cptr path) return CELL_OK; } +error_code _sys_spu_image_import(vm::ptr img, u32 src, u32 arg3, u32 arg4) +{ + sys_spu.todo("_sys_spu_image_import(img=*0x%x, src=*0x%x, arg3=0x%x, arg4=0x%x)", img, src, arg3, arg4); + + fmt::throw_exception("Unimplemented syscall: _sys_spu_image_import"); +} + +error_code _sys_spu_image_close(vm::ptr img) +{ + sys_spu.todo("_sys_spu_image_close(img=*0x%x)", img); + + fmt::throw_exception("Unimplemented syscall: _sys_spu_image_close"); +} + +error_code _sys_raw_spu_image_load(vm::ptr img, u32 ptr, u32 arg3) +{ + sys_spu.todo("_sys_raw_spu_image_load(img=*0x%x, ptr=*0x%x, arg3=0x%x)", img, ptr, arg3); + + fmt::throw_exception("Unimlemented syscall: _sys_raw_spu_image_load"); +} + error_code sys_spu_thread_initialize(vm::ptr thread, u32 group_id, u32 spu_num, vm::ptr img, vm::ptr attr, vm::ptr arg) { sys_spu.warning("sys_spu_thread_initialize(thread=*0x%x, group=0x%x, spu_num=%d, img=*0x%x, attr=*0x%x, arg=*0x%x)", thread, group_id, spu_num, img, attr, arg); diff --git a/rpcs3/Emu/Cell/lv2/sys_spu.h b/rpcs3/Emu/Cell/lv2/sys_spu.h index 882c0bb702..8aa71ca2db 100644 --- a/rpcs3/Emu/Cell/lv2/sys_spu.h +++ b/rpcs3/Emu/Cell/lv2/sys_spu.h @@ -203,7 +203,11 @@ class ppu_thread; // Syscalls error_code sys_spu_initialize(u32 max_usable_spu, u32 max_raw_spu); +error_code _sys_spu_image_get_information(vm::ps3::ptr img, u32 ptr1, u32 ptr2); error_code sys_spu_image_open(vm::ps3::ptr img, vm::ps3::cptr path); +error_code _sys_spu_image_import(vm::ps3::ptr img, u32 src, u32 arg3, u32 arg4); +error_code _sys_spu_image_close(vm::ps3::ptr img); +error_code _sys_raw_spu_image_load(vm::ps3::ptr img, u32 ptr, u32 arg3); error_code sys_spu_thread_initialize(vm::ps3::ptr thread, u32 group, u32 spu_num, vm::ps3::ptr, vm::ps3::ptr, vm::ps3::ptr); error_code sys_spu_thread_set_argument(u32 id, vm::ps3::ptr arg); error_code sys_spu_thread_group_create(vm::ps3::ptr id, u32 num, s32 prio, vm::ps3::ptr attr);