Stub some SPU syscalls

This commit is contained in:
Nekotekina 2017-07-22 16:29:38 +03:00
parent 23701248f3
commit 3f9affd2ad
4 changed files with 40 additions and 8 deletions

View File

@ -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";

View File

@ -202,11 +202,11 @@ const std::array<ppu_function_t, 1024> 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

View File

@ -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<sys_spu_image> 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<sys_spu_image> img, vm::cptr<char> 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<sys_spu_image> img, vm::cptr<char> path)
return CELL_OK;
}
error_code _sys_spu_image_import(vm::ptr<sys_spu_image> 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<sys_spu_image> 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<sys_spu_image> 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<u32> thread, u32 group_id, u32 spu_num, vm::ptr<sys_spu_image> img, vm::ptr<sys_spu_thread_attribute> attr, vm::ptr<sys_spu_thread_argument> 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);

View File

@ -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<sys_spu_image> img, u32 ptr1, u32 ptr2);
error_code sys_spu_image_open(vm::ps3::ptr<sys_spu_image> img, vm::ps3::cptr<char> path);
error_code _sys_spu_image_import(vm::ps3::ptr<sys_spu_image> img, u32 src, u32 arg3, u32 arg4);
error_code _sys_spu_image_close(vm::ps3::ptr<sys_spu_image> img);
error_code _sys_raw_spu_image_load(vm::ps3::ptr<sys_spu_image> img, u32 ptr, u32 arg3);
error_code sys_spu_thread_initialize(vm::ps3::ptr<u32> thread, u32 group, u32 spu_num, vm::ps3::ptr<sys_spu_image>, vm::ps3::ptr<sys_spu_thread_attribute>, vm::ps3::ptr<sys_spu_thread_argument>);
error_code sys_spu_thread_set_argument(u32 id, vm::ps3::ptr<sys_spu_thread_argument> arg);
error_code sys_spu_thread_group_create(vm::ps3::ptr<u32> id, u32 num, s32 prio, vm::ps3::ptr<sys_spu_thread_group_attribute> attr);