VSH: Stubs

This commit is contained in:
Eladash 2020-02-07 11:31:33 +02:00 committed by Ivan
parent 9d1bb60ad7
commit 1915fe75a4
36 changed files with 876 additions and 64 deletions

View File

@ -143,7 +143,11 @@ target_sources(rpcs3_emu PRIVATE
Cell/SPURecompiler.cpp
Cell/SPUThread.cpp
Cell/lv2/lv2.cpp
Cell/lv2/sys_bdemu.cpp
Cell/lv2/sys_btsetting.cpp
Cell/lv2/sys_cond.cpp
Cell/lv2/sys_console.cpp
Cell/lv2/sys_crypto_engine.cpp
Cell/lv2/sys_config.cpp
Cell/lv2/sys_dbg.cpp
Cell/lv2/sys_event.cpp
@ -151,7 +155,9 @@ target_sources(rpcs3_emu PRIVATE
Cell/lv2/sys_fs.cpp
Cell/lv2/sys_gamepad.cpp
Cell/lv2/sys_gpio.cpp
Cell/lv2/sys_hid.cpp
Cell/lv2/sys_interrupt.cpp
Cell/lv2/sys_io.cpp
Cell/lv2/sys_lwcond.cpp
Cell/lv2/sys_lwmutex.cpp
Cell/lv2/sys_memory.cpp
@ -163,14 +169,18 @@ target_sources(rpcs3_emu PRIVATE
Cell/lv2/sys_process.cpp
Cell/lv2/sys_prx.cpp
Cell/lv2/sys_rsx.cpp
Cell/lv2/sys_rsxaudio.cpp
Cell/lv2/sys_rwlock.cpp
Cell/lv2/sys_semaphore.cpp
Cell/lv2/sys_spu.cpp
Cell/lv2/sys_sm.cpp
Cell/lv2/sys_ss.cpp
Cell/lv2/sys_storage.cpp
Cell/lv2/sys_time.cpp
Cell/lv2/sys_timer.cpp
Cell/lv2/sys_trace.cpp
Cell/lv2/sys_tty.cpp
Cell/lv2/sys_uart.cpp
Cell/lv2/sys_usbd.cpp
Cell/lv2/sys_vm.cpp
Cell/Modules/cellAdec.cpp
@ -285,7 +295,7 @@ target_sources(rpcs3_emu PRIVATE
Cell/Modules/StaticHLE.cpp
Cell/Modules/sys_game.cpp
Cell/Modules/sys_heap.cpp
Cell/Modules/sys_io.cpp
Cell/Modules/sys_io_.cpp
Cell/Modules/sys_libc_.cpp
Cell/Modules/sys_libc.cpp
Cell/Modules/sys_lv2dbg.cpp

View File

@ -21,6 +21,7 @@ extern std::string ppu_get_syscall_name(u64 code)
case 23: return "sys_process_wait_for_child2";
case 25: return "sys_process_get_sdk_version";
case 26: return "_sys_process_exit2";
case 27: return "sys_process_spawns_a_self2";
case 28: return "_sys_process_get_number_of_object";
case 29: return "sys_process_get_id2";
case 30: return "_sys_process_get_paramsfo";
@ -171,6 +172,7 @@ extern std::string ppu_get_syscall_name(u64 code)
case 197: return "sys_raw_spu_get_spu_cfg";
case 198: return "sys_spu_thread_recover_page_fault";
case 199: return "sys_raw_spu_recover_page_fault";
case 213: return "sys_console_write2";
case 215: return "sys_dbg_mat_set_condition";
case 216: return "sys_dbg_mat_get_condition";
case 230: return "sys_isolated_spu_create";
@ -323,6 +325,8 @@ extern std::string ppu_get_syscall_name(u64 code)
case 509: return "sys_hid_manager_release_focus";
case 510: return "sys_hid_manager_check_focus";
case 511: return "sys_hid_manager_set_master_process";
case 512: return "sys_hid_manager_is_process_permission_root";
case 514: return "sys_hid_manager_514";
case 516: return "sys_config_open";
case 517: return "sys_config_close";
case 518: return "sys_config_get_service_event";

View File

@ -36,6 +36,16 @@
#include "sys_ss.h"
#include "sys_gpio.h"
#include "sys_config.h"
#include "sys_bdemu.h"
#include "sys_btsetting.h"
#include "sys_console.h"
#include "sys_hid.h"
#include "sys_io.h"
#include "sys_rsxaudio.h"
#include "sys_sm.h"
#include "sys_storage.h"
#include "sys_uart.h"
#include "sys_crypto_engine.h"
extern std::string ppu_get_syscall_name(u64 code);
@ -95,7 +105,7 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(), //24 (0x018) DBG
BIND_FUNC(sys_process_get_sdk_version), //25 (0x019)
BIND_FUNC(_sys_process_exit2), //26 (0x01A)
null_func,//BIND_FUNC(), //27 (0x01B) DBG
BIND_FUNC(sys_process_spawns_a_self2), //27 (0x01B) DBG
null_func,//BIND_FUNC(_sys_process_get_number_of_object)//28 (0x01C) ROOT
BIND_FUNC(sys_process_get_id2), //29 (0x01D) ROOT
BIND_FUNC(_sys_process_get_paramsfo), //30 (0x01E)
@ -265,7 +275,9 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func, null_func, null_func, null_func, null_func, //204 UNS?
null_func, null_func, null_func, null_func, null_func, //209 UNS?
null_func, null_func, null_func, null_func, null_func, //214 UNS?
null_func, null_func, null_func, //212 UNS?
BIND_FUNC(sys_console_write2), //213 (0x0D5)
null_func, //214 UNS?
null_func,//BIND_FUNC(sys_dbg_mat_set_condition) //215 (0x0D7)
null_func,//BIND_FUNC(sys_dbg_mat_get_condition) //216 (0x0D8)
@ -357,7 +369,7 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
BIND_FUNC(sys_memory_allocate_from_container), //350 (0x15E)
BIND_FUNC(sys_memory_get_page_attribute), //351 (0x15F)
BIND_FUNC(sys_memory_get_user_memory_size), //352 (0x160)
null_func,//BIND_FUNC(sys_memory_get_user_memory_stat) //353 (0x161)
BIND_FUNC(sys_memory_get_user_memory_stat), //353 (0x161)
null_func,//BIND_FUNC(sys_memory_...) //354 (0x162)
null_func,//BIND_FUNC(sys_memory_...) //355 (0x163)
null_func,//BIND_FUNC(sys_memory_allocate_colored) //356 (0x164)
@ -370,10 +382,10 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(sys_mmapper_...) //363 (0x16B)
null_func,//BIND_FUNC(sys_mmapper_...) //364 (0x16C)
uns_func, uns_func, //366 (0x16E) UNS
null_func,//BIND_FUNC(sys_uart_initialize) //367 (0x16F) ROOT
null_func,//BIND_FUNC(sys_uart_receive) //368 (0x170) ROOT
null_func,//BIND_FUNC(sys_uart_send) //369 (0x171) ROOT
null_func,//BIND_FUNC(sys_uart_get_params) //370 (0x172) ROOT
BIND_FUNC(sys_uart_initialize), //367 (0x16F) ROOT
BIND_FUNC(sys_uart_receive), //368 (0x170) ROOT
BIND_FUNC(sys_uart_send), //369 (0x171) ROOT
BIND_FUNC(sys_uart_get_params), //370 (0x172) ROOT
uns_func, //371 (0x173) UNS
null_func,//BIND_FUNC(sys_game_watchdog_start) //372 (0x174)
null_func,//BIND_FUNC(sys_game_watchdog_stop) //373 (0x175)
@ -381,9 +393,9 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(sys_game_set_system_sw_version) //375 (0x177) ROOT
null_func,//BIND_FUNC(sys_game_get_system_sw_version) //376 (0x178) ROOT
null_func,//BIND_FUNC(sys_sm_set_shop_mode) //377 (0x179) ROOT
null_func,//BIND_FUNC(sys_sm_get_ext_event2) //378 (0x17A) ROOT
null_func,//BIND_FUNC(sys_sm_shutdown) //379 (0x17B) ROOT
null_func,//BIND_FUNC(sys_sm_get_params) //380 (0x17C) DBG
BIND_FUNC(sys_sm_get_ext_event2), //378 (0x17A) ROOT
BIND_FUNC(sys_sm_shutdown), //379 (0x17B) ROOT
BIND_FUNC(sys_sm_get_params), //380 (0x17C) DBG
null_func,//BIND_FUNC(sys_sm_get_inter_lpar_parameter) //381 (0x17D) ROOT
null_func,//BIND_FUNC(sys_sm_initialize) //382 (0x17E) ROOT
null_func,//BIND_FUNC(sys_game_get_temperature) //383 (0x17F) ROOT
@ -395,13 +407,13 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(sys_sm_set_fan_policy) //389 (0x185) PM
null_func,//BIND_FUNC(sys_sm_request_error_log) //390 (0x186) ROOT
null_func,//BIND_FUNC(sys_sm_request_be_count) //391 (0x187) ROOT
null_func,//BIND_FUNC(sys_sm_ring_buzzer) //392 (0x188) ROOT
BIND_FUNC(sys_sm_ring_buzzer), //392 (0x188) ROOT
null_func,//BIND_FUNC(sys_sm_get_hw_config) //393 (0x189) ROOT
null_func,//BIND_FUNC(sys_sm_request_scversion) //394 (0x18A) ROOT
null_func,//BIND_FUNC(sys_sm_request_system_event_log) //395 (0x18B) PM
null_func,//BIND_FUNC(sys_sm_set_rtc_alarm) //396 (0x18C) ROOT
null_func,//BIND_FUNC(sys_sm_get_rtc_alarm) //397 (0x18D) ROOT
null_func,//BIND_FUNC(sys_console_write) //398 (0x18E) ROOT
BIND_FUNC(sys_console_write), //398 (0x18E) ROOT
uns_func, //399 (0x18F) UNS
null_func,//BIND_FUNC(sys_sm_...) //400 (0x190) PM
null_func,//BIND_FUNC(sys_sm_...) //401 (0x191) ROOT
@ -475,21 +487,21 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
BIND_FUNC(_sys_prx_load_module_on_memcontainer), //497 (0x1F1)
BIND_FUNC(_sys_prx_start), //498 (0x1F2)
BIND_FUNC(_sys_prx_stop), //499 (0x1F3)
null_func,//BIND_FUNC(sys_hid_manager_open) //500 (0x1F4)
BIND_FUNC(sys_hid_manager_open), //500 (0x1F4)
null_func,//BIND_FUNC(sys_hid_manager_close) //501 (0x1F5)
null_func,//BIND_FUNC(sys_hid_manager_read) //502 (0x1F6) ROOT
null_func,//BIND_FUNC(sys_hid_manager_ioctl) //503 (0x1F7)
BIND_FUNC(sys_hid_manager_read), //502 (0x1F6) ROOT
BIND_FUNC(sys_hid_manager_ioctl), //503 (0x1F7)
null_func,//BIND_FUNC(sys_hid_manager_map_logical_id_to_port_id) //504 (0x1F8) ROOT
null_func,//BIND_FUNC(sys_hid_manager_unmap_logical_id_to_port_id) //505 (0x1F9) ROOT
null_func,//BIND_FUNC(sys_hid_manager_add_hot_key_observer) //506 (0x1FA) ROOT
BIND_FUNC(sys_hid_manager_add_hot_key_observer), //506 (0x1FA) ROOT
null_func,//BIND_FUNC(sys_hid_manager_remove_hot_key_observer) //507 (0x1FB) ROOT
null_func,//BIND_FUNC(sys_hid_manager_grab_focus) //508 (0x1FC) ROOT
null_func,//BIND_FUNC(sys_hid_manager_release_focus) //509 (0x1FD) ROOT
null_func,//BIND_FUNC(sys_hid_manager_check_focus) //510 (0x1FE)
BIND_FUNC(sys_hid_manager_check_focus), //510 (0x1FE)
null_func,//BIND_FUNC(sys_hid_manager_set_master_process) //511 (0x1FF) ROOT
null_func,//BIND_FUNC(sys_hid_manager_...) //512 (0x200) ROOT
BIND_FUNC(sys_hid_manager_is_process_permission_root), //512 (0x200) ROOT
null_func,//BIND_FUNC(sys_hid_manager_...) //513 (0x201)
null_func,//BIND_FUNC(sys_hid_manager_...) //514 (0x202)
BIND_FUNC(sys_hid_manager_514), //514 (0x202)
uns_func, //515 (0x203) UNS
BIND_FUNC(sys_config_open), //516 (0x204)
BIND_FUNC(sys_config_close), //517 (0x205)
@ -572,41 +584,41 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(sys_bt_cancel_connect_accept_controller) //597 (0x255)
null_func,//BIND_FUNC(sys_bluetooth_...) //598 (0x256) ROOT
null_func,//BIND_FUNC(sys_bluetooth_...) //599 (0x257) ROOT
null_func,//BIND_FUNC(sys_storage_open) //600 (0x258) ROOT
null_func,//BIND_FUNC(sys_storage_close) //601 (0x259)
null_func,//BIND_FUNC(sys_storage_read) //602 (0x25A)
null_func,//BIND_FUNC(sys_storage_write) //603 (0x25B)
null_func,//BIND_FUNC(sys_storage_send_device_command) //604 (0x25C)
null_func,//BIND_FUNC(sys_storage_async_configure) //605 (0x25D)
null_func,//BIND_FUNC(sys_storage_async_read) //606 (0x25E)
null_func,//BIND_FUNC(sys_storage_async_write) //607 (0x25F)
null_func,//BIND_FUNC(sys_storage_async_cancel) //608 (0x260)
null_func,//BIND_FUNC(sys_storage_get_device_info) //609 (0x261) ROOT
null_func,//BIND_FUNC(sys_storage_get_device_config) //610 (0x262) ROOT
null_func,//BIND_FUNC(sys_storage_report_devices) //611 (0x263) ROOT
null_func,//BIND_FUNC(sys_storage_configure_medium_event) //612 (0x264) ROOT
null_func,//BIND_FUNC(sys_storage_set_medium_polling_interval) //613 (0x265)
null_func,//BIND_FUNC(sys_storage_create_region) //614 (0x266)
null_func,//BIND_FUNC(sys_storage_delete_region) //615 (0x267)
null_func,//BIND_FUNC(sys_storage_execute_device_command) //616 (0x268)
null_func,//BIND_FUNC(sys_storage_check_region_acl) //617 (0x269)
null_func,//BIND_FUNC(sys_storage_set_region_acl) //618 (0x26A)
null_func,//BIND_FUNC(sys_storage_async_send_device_command) //619 (0x26B)
BIND_FUNC(sys_storage_open), //600 (0x258) ROOT
BIND_FUNC(sys_storage_close), //601 (0x259)
BIND_FUNC(sys_storage_read), //602 (0x25A)
BIND_FUNC(sys_storage_write), //603 (0x25B)
BIND_FUNC(sys_storage_send_device_command), //604 (0x25C)
BIND_FUNC(sys_storage_async_configure), //605 (0x25D)
BIND_FUNC(sys_storage_async_read), //606 (0x25E)
BIND_FUNC(sys_storage_async_write), //607 (0x25F)
BIND_FUNC(sys_storage_async_cancel), //608 (0x260)
BIND_FUNC(sys_storage_get_device_info), //609 (0x261) ROOT
BIND_FUNC(sys_storage_get_device_config), //610 (0x262) ROOT
BIND_FUNC(sys_storage_report_devices), //611 (0x263) ROOT
BIND_FUNC(sys_storage_configure_medium_event), //612 (0x264) ROOT
BIND_FUNC(sys_storage_set_medium_polling_interval), //613 (0x265)
BIND_FUNC(sys_storage_create_region), //614 (0x266)
BIND_FUNC(sys_storage_delete_region), //615 (0x267)
BIND_FUNC(sys_storage_execute_device_command), //616 (0x268)
BIND_FUNC(sys_storage_check_region_acl), //617 (0x269)
BIND_FUNC(sys_storage_set_region_acl), //618 (0x26A)
BIND_FUNC(sys_storage_async_send_device_command), //619 (0x26B)
null_func,//BIND_FUNC(sys_...) //620 (0x26C) ROOT
BIND_FUNC(sys_gamepad_ycon_if), //621 (0x26D)
null_func,//BIND_FUNC(sys_storage_get_region_offset) //622 (0x26E)
null_func,//BIND_FUNC(sys_storage_set_emulated_speed) //623 (0x26F)
null_func,//BIND_FUNC(sys_io_buffer_create) //624 (0x270)
null_func,//BIND_FUNC(sys_io_buffer_destroy) //625 (0x271)
null_func,//BIND_FUNC(sys_io_buffer_allocate) //626 (0x272)
null_func,//BIND_FUNC(sys_io_buffer_free) //627 (0x273)
BIND_FUNC(sys_storage_get_region_offset), //622 (0x26E)
BIND_FUNC(sys_storage_set_emulated_speed), //623 (0x26F)
BIND_FUNC(sys_io_buffer_create), //624 (0x270)
BIND_FUNC(sys_io_buffer_destroy), //625 (0x271)
BIND_FUNC(sys_io_buffer_allocate), //626 (0x272)
BIND_FUNC(sys_io_buffer_free), //627 (0x273)
uns_func, uns_func, //629 (0x275) UNS
BIND_FUNC(sys_gpio_set), //630 (0x276)
BIND_FUNC(sys_gpio_get), //631 (0x277)
uns_func, //632 (0x278) UNS
null_func,//BIND_FUNC(sys_fsw_connect_event) //633 (0x279)
null_func,//BIND_FUNC(sys_fsw_disconnect_event) //634 (0x27A)
null_func,//BIND_FUNC(sys_btsetting_if) //635 (0x27B)
BIND_FUNC(sys_btsetting_if), //635 (0x27B)
null_func,//BIND_FUNC(sys_...) //636 (0x27C)
null_func,//BIND_FUNC(sys_...) //637 (0x27D)
null_func,//BIND_FUNC(sys_...) //638 (0x27E)
@ -623,10 +635,10 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(sys_...) //648 DEPRECATED
null_func,//BIND_FUNC(sys_...) //649 DEPRECATED
null_func,//BIND_FUNC(sys_rsxaudio_initialize) //650 (0x28A)
null_func,//BIND_FUNC(sys_rsxaudio_finalize) //651 (0x28B)
null_func,//BIND_FUNC(sys_rsxaudio_import_shared_memory) //652 (0x28C)
null_func,//BIND_FUNC(sys_rsxaudio_unimport_shared_memory) //653 (0x28D)
BIND_FUNC(sys_rsxaudio_initialize), //650 (0x28A)
BIND_FUNC(sys_rsxaudio_finalize), //651 (0x28B)
BIND_FUNC(sys_rsxaudio_import_shared_memory), //652 (0x28C)
BIND_FUNC(sys_rsxaudio_unimport_shared_memory), //653 (0x28D)
null_func,//BIND_FUNC(sys_rsxaudio_create_connection) //654 (0x28E)
null_func,//BIND_FUNC(sys_rsxaudio_close_connection) //655 (0x28F)
null_func,//BIND_FUNC(sys_rsxaudio_prepare_process) //656 (0x290)
@ -669,7 +681,7 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
null_func,//BIND_FUNC(sys_...) //696 (0x2B8) ROOT
uns_func,//BIND_FUNC(sys_...) //697 (0x2B9) UNS
uns_func,//BIND_FUNC(sys_...) //698 (0x2BA) UNS
null_func,//BIND_FUNC(sys_bdemu_send_command) //699 (0x2BB)
BIND_FUNC(sys_bdemu_send_command), //699 (0x2BB)
BIND_FUNC(sys_net_bnet_accept), //700 (0x2BC)
BIND_FUNC(sys_net_bnet_bind), //701 (0x2BD)
BIND_FUNC(sys_net_bnet_connect), //702 (0x2BE)
@ -873,15 +885,15 @@ const std::array<ppu_function_t, 1024> s_ppu_syscall_table
uns_func,//BIND_FUNC(sys_dbg_...) //973 (0x3CD)
null_func,//BIND_FUNC(sys_dbg_...) //974 (0x3CE)
null_func,//BIND_FUNC(sys_dbg_read_spu_thread_context2) //975 (0x3CF)
null_func,//BIND_FUNC(sys_crypto_engine_create) //976 (0x3D0)
null_func,//BIND_FUNC(sys_crypto_engine_destroy) //977 (0x3D1)
BIND_FUNC(sys_crypto_engine_create), //976 (0x3D0)
BIND_FUNC(sys_crypto_engine_destroy), //977 (0x3D1)
null_func,//BIND_FUNC(sys_crypto_engine_hasher_prepare) //978 (0x3D2) ROOT
null_func,//BIND_FUNC(sys_crypto_engine_hasher_run) //979 (0x3D3)
null_func,//BIND_FUNC(sys_crypto_engine_hasher_get_hash) //980 (0x3D4)
null_func,//BIND_FUNC(sys_crypto_engine_cipher_prepare) //981 (0x3D5) ROOT
null_func,//BIND_FUNC(sys_crypto_engine_cipher_run) //982 (0x3D6)
null_func,//BIND_FUNC(sys_crypto_engine_cipher_get_hash) //983 (0x3D7)
null_func,//BIND_FUNC(sys_crypto_engine_random_generate) //984 (0x3D8)
BIND_FUNC(sys_crypto_engine_random_generate), //984 (0x3D8)
null_func,//BIND_FUNC(sys_dbg_get_console_type) //985 (0x3D9) ROOT
null_func,//BIND_FUNC(sys_dbg_...) //986 (0x3DA) ROOT DBG
null_func,//BIND_FUNC(sys_dbg_...) //987 (0x3DB) ROOT

View File

@ -0,0 +1,16 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Memory/vm.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_bdemu.h"
LOG_CHANNEL(sys_bdemu);
error_code sys_bdemu_send_command(u64 cmd, u64 a2, u64 a3, vm::ptr<void> buf, u64 buf_len)
{
sys_bdemu.todo("sys_bdemu_send_command(cmd=0%llx, a2=0x%x, a3=0x%x, buf=0x%x, buf_len=0x%x)", cmd, a2, a3, buf, buf_len);
return CELL_OK;
}

View File

@ -0,0 +1,7 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_bdemu_send_command(u64 cmd, u64 a2, u64 a3, vm::ptr<void> buf, u64 buf_len);

View File

@ -0,0 +1,13 @@
#include "stdafx.h"
#include "sys_btsetting.h"
#include "Emu/Cell/ErrorCodes.h"
LOG_CHANNEL(sys_btsetting);
error_code sys_btsetting_if(u64 cmd, vm::ptr<void> msg)
{
sys_btsetting.todo("sys_btsetting_if(cmd=0x%llx, msg=*0x%x)", cmd, msg);
return CELL_OK;
}

View File

@ -0,0 +1,7 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_btsetting_if(u64 cmd, vm::ptr<void> msg);

View File

@ -0,0 +1,15 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_console.h"
LOG_CHANNEL(sys_console);
error_code sys_console_write(vm::cptr<char> buf, u32 len)
{
sys_console.todo("sys_console_write(buf=*0x%x, len=0x%x)", buf, len);
return CELL_OK;
}

View File

@ -0,0 +1,8 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_console_write(vm::cptr<char> buf, u32 len);
constexpr auto sys_console_write2 = sys_console_write;

View File

@ -0,0 +1,28 @@
#include "stdafx.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_crypto_engine.h"
LOG_CHANNEL(sys_crypto_engine);
error_code sys_crypto_engine_create(vm::ptr<u32> id)
{
sys_crypto_engine.todo("sys_crypto_engine_create(id=*0x%x)", id);
return CELL_OK;
}
error_code sys_crypto_engine_destroy(u32 id)
{
sys_crypto_engine.todo("sys_crypto_engine_destroy(id=0x%x)", id);
return CELL_OK;
}
error_code sys_crypto_engine_random_generate(vm::ptr<void> buffer, u64 buffer_size)
{
sys_crypto_engine.todo("sys_crypto_engine_random_generate(buffer=*0x%x, buffer_size=0x%x", buffer, buffer_size);
return CELL_OK;
}

View File

@ -0,0 +1,9 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_crypto_engine_create(vm::ptr<u32> id);
error_code sys_crypto_engine_destroy(u32 id);
error_code sys_crypto_engine_random_generate(vm::ptr<void> buffer, u64 buffer_size);

View File

@ -1999,3 +1999,24 @@ error_code sys_fs_truncate2(ppu_thread& ppu, u32 fd, u64 size)
return CELL_OK;
}
error_code sys_fs_get_mount_info_size(ppu_thread& ppu, vm::ptr<u64> len)
{
sys_fs.todo("sys_fs_get_mount_info_size(len=*0x%x)", len);
return CELL_OK;
}
error_code sys_fs_get_mount_info(ppu_thread& ppu, vm::ptr<CellFsMountInfo> info, u32 len, vm::ptr<u64> out_len)
{
sys_fs.todo("sys_fs_get_mount_info(info=*0x%x, len=0x%x, out_len=*0x%x)", info, len, out_len);
return CELL_OK;
}
error_code sys_fs_mount(ppu_thread& ppu, vm::cptr<char> dev_name, vm::cptr<char> file_system, vm::cptr<char> path, s32 unk1, s32 prot, s32 unk3, vm::cptr<char> str1, u32 str_len)
{
sys_fs.todo("sys_fs_mount(dev_name=%s, file_system=%s, path=%s, unk1=0x%x, prot=0x%x, unk3=0x%x, str1=%s, str_len=%d)", dev_name, file_system, path, unk1, prot, unk3, str1, str_len);
return CELL_OK;
}

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
#include "Emu/Cell/ErrorCodes.h"
@ -360,6 +360,20 @@ struct lv2_file_e0000017 : lv2_file_op
CHECK_SIZE(lv2_file_e0000017, 0x28);
struct CellFsMountInfo
{
char mount_path[0x20]; // 0x0
char filesystem[0x20]; // 0x20
char dev_name[0x40]; // 0x40
be_t<u32> unk1; // 0x80
be_t<u32> unk2; // 0x84
be_t<u32> unk3; // 0x88
be_t<u32> unk4; // 0x8C
be_t<u32> unk5; // 0x90
};
CHECK_SIZE(CellFsMountInfo, 0x94);
// Syscalls
error_code sys_fs_test(ppu_thread& ppu, u32 arg1, u32 arg2, vm::ptr<u32> arg3, u32 arg4, vm::ptr<char> buf, u32 buf_size);
@ -402,3 +416,6 @@ error_code sys_fs_lsn_write(ppu_thread& ppu, u32 fd, vm::cptr<void>, u64);
error_code sys_fs_mapped_allocate(ppu_thread& ppu, u32 fd, u64, vm::pptr<void> out_ptr);
error_code sys_fs_mapped_free(ppu_thread& ppu, u32 fd, vm::ptr<void> ptr);
error_code sys_fs_truncate2(ppu_thread& ppu, u32 fd, u64 size);
error_code sys_fs_mount(ppu_thread& ppu, vm::cptr<char> dev_name, vm::cptr<char> file_system, vm::cptr<char> path, s32 unk1, s32 prot, s32 unk3, vm::cptr<char> str1, u32 str_len);
error_code sys_fs_get_mount_info_size(ppu_thread& ppu, vm::ptr<u64> len);
error_code sys_fs_get_mount_info(ppu_thread& ppu, vm::ptr<CellFsMountInfo> info, u32 len, vm::ptr<u64> out_len);

View File

@ -0,0 +1,58 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Memory/vm.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_process.h"
#include "sys_hid.h"
LOG_CHANNEL(sys_hid);
error_code sys_hid_manager_open(u64 device_type, u64 port_no, vm::ptr<u32> handle)
{
sys_hid.todo("sys_hid_manager_open(device_type=0x%llx, port_no=0x%llx, handle=*0x%llx)", device_type, port_no, handle);
return CELL_OK;
}
error_code sys_hid_manager_ioctl(u32 hid_handle, u32 pkg_id, vm::ptr<void> buf, u64 buf_size)
{
sys_hid.todo("sys_hid_manager_ioctl(hid_handle=0x%x, pkg_id=0x%llx, buf=*0x%x, buf_size=0x%llx)", hid_handle, pkg_id, buf, buf_size);
return CELL_OK;
}
error_code sys_hid_manager_check_focus()
{
sys_hid.todo("sys_hid_manager_check_focus()");
return CELL_OK;
}
error_code sys_hid_manager_514(u32 pkg_id, vm::ptr<void> buf, u64 buf_size)
{
sys_hid.todo("sys_hid_manager_514(pkg_id=0x%x, buf=*0x%x, buf_size=0x%llx)", pkg_id, buf, buf_size);
return CELL_OK;
}
error_code sys_hid_manager_is_process_permission_root(u32 pid)
{
sys_hid.todo("sys_hid_manager_is_process_permission_root(pid=0x%x)", pid);
return not_an_error(g_ps3_process_info.has_root_perm());
}
error_code sys_hid_manager_add_hot_key_observer(u32 event_queue, vm::ptr<u32> unk)
{
sys_hid.todo("sys_hid_manager_add_hot_key_observer(event_queue=0x%x, unk=*0x%x)", event_queue, unk);
return CELL_OK;
}
error_code sys_hid_manager_read(u32 handle, u32 pkg_id, vm::ptr<void> buf, u64 buf_size)
{
sys_hid.todo("sys_hid_manager_read(handle=0x%x, pkg_id=0x%x, buf=*0x%x, buf_size=0x%llx)", handle, pkg_id, buf, buf_size);
return CELL_OK;
}

View File

@ -0,0 +1,13 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_hid_manager_open(u64 device_type, u64 port_no, vm::ptr<u32> handle);
error_code sys_hid_manager_ioctl(u32 hid_handle, u32 pkg_id, vm::ptr<void> buf, u64 buf_size);
error_code sys_hid_manager_add_hot_key_observer(u32 event_queue, vm::ptr<u32> unk);
error_code sys_hid_manager_check_focus();
error_code sys_hid_manager_is_process_permission_root(u32 pid);
error_code sys_hid_manager_514(u32 pkg_id, vm::ptr<void> buf, u64 buf_size);
error_code sys_hid_manager_read(u32 handle, u32 pkg_id, vm::ptr<void> buf, u64 buf_size);

View File

@ -0,0 +1,37 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Memory/vm.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_io.h"
LOG_CHANNEL(sys_io);
error_code sys_io_buffer_create(u32 block_count, u32 block_size, u32 blocks, u32 unk1, vm::ptr<u32> handle)
{
sys_io.todo("sys_io_buffer_create(block_count=0x%x, block_size=0x%x, blocks=0x%x, unk1=0x%x, handle=*0x%x)", block_count, block_size, blocks, unk1, handle);
return CELL_OK;
}
error_code sys_io_buffer_destroy(u32 handle)
{
sys_io.todo("sys_io_buffer_destroy(handle=0x%x)", handle);
return CELL_OK;
}
error_code sys_io_buffer_allocate(u32 handle, vm::ptr<u32> block)
{
sys_io.todo("sys_io_buffer_allocate(handle=0x%x, block=*0x%x)", handle, block);
return CELL_OK;
}
error_code sys_io_buffer_free(u32 handle, u32 block)
{
sys_io.todo("sys_io_buffer_free(handle=0x%x, block=0x%x)", handle, block);
return CELL_OK;
}

View File

@ -0,0 +1,10 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_io_buffer_create(u32 block_count, u32 block_size, u32 blocks, u32 unk1, vm::ptr<u32> handle);
error_code sys_io_buffer_destroy(u32 handle);
error_code sys_io_buffer_allocate(u32 handle, vm::ptr<u32> block);
error_code sys_io_buffer_free(u32 handle, u32 block);

View File

@ -260,6 +260,15 @@ error_code sys_memory_get_user_memory_size(vm::ptr<sys_memory_info_t> mem_info)
return CELL_OK;
}
error_code sys_memory_get_user_memory_stat(vm::ptr<sys_memory_user_memory_stat_t> mem_stat)
{
vm::temporary_unlock();
sys_memory.todo("sys_memory_get_user_memory_stat(mem_stat=*0x%x)", mem_stat);
return CELL_OK;
}
error_code sys_memory_container_create(vm::ptr<u32> cid, u32 size)
{
vm::temporary_unlock();

View File

@ -91,12 +91,24 @@ struct lv2_memory_alloca
lv2_memory_alloca(u32 size, u32 align, u64 flags, const std::shared_ptr<lv2_memory_container>& ct);
};
struct sys_memory_user_memory_stat_t
{
be_t<u32> a; // 0x0
be_t<u32> b; // 0x4
be_t<u32> c; // 0x8
be_t<u32> d; // 0xc
be_t<u32> e; // 0x10
be_t<u32> f; // 0x14
be_t<u32> g; // 0x18
};
// SysCalls
error_code sys_memory_allocate(u32 size, u64 flags, vm::ptr<u32> alloc_addr);
error_code sys_memory_allocate_from_container(u32 size, u32 cid, u64 flags, vm::ptr<u32> alloc_addr);
error_code sys_memory_free(u32 start_addr);
error_code sys_memory_get_page_attribute(u32 addr, vm::ptr<sys_page_attr_t> attr);
error_code sys_memory_get_user_memory_size(vm::ptr<sys_memory_info_t> mem_info);
error_code sys_memory_get_user_memory_stat(vm::ptr<sys_memory_user_memory_stat_t> mem_stat);
error_code sys_memory_container_create(vm::ptr<u32> cid, u32 size);
error_code sys_memory_container_destroy(u32 cid);
error_code sys_memory_container_get_size(vm::ptr<sys_memory_info_t> mem_info, u32 cid);

View File

@ -362,3 +362,11 @@ void _sys_process_exit2(ppu_thread& ppu, s32 status, vm::ptr<sys_exit2_param> ar
ppu.state += cpu_flag::dbg_global_stop;
}
error_code sys_process_spawns_a_self2(vm::ptr<u32> pid, u32 primary_prio, u64 flags, vm::ptr<void> stack, u32 stack_size, u32 mem_id, vm::ptr<void> param_sfo, vm::ptr<void> dbg_data)
{
sys_process.todo("sys_process_spawns_a_self2(pid=*0x%x, primary_prio=0x%x, flags=0x%llx, stack=*0x%x, stack_size=0x%x, mem_id=0x%x, param_sfo=*0x%x, dbg_data=*0x%x"
, pid, primary_prio, flags, stack, stack_size, mem_id, param_sfo, dbg_data);
return CELL_OK;
}

View File

@ -72,3 +72,4 @@ error_code sys_process_wait_for_child2(u64 unk1, u64 unk2, u64 unk3, u64 unk4, u
error_code sys_process_detach_child(u64 unk);
void _sys_process_exit(ppu_thread& ppu, s32 status, u32 arg2, u32 arg3);
void _sys_process_exit2(ppu_thread& ppu, s32 status, vm::ptr<sys_exit2_param> arg, u32 arg_size, u32 arg4);
error_code sys_process_spawns_a_self2(vm::ptr<u32> pid, u32 primary_prio, u64 flags, vm::ptr<void> stack, u32 stack_size, u32 mem_id, vm::ptr<void> param_sfo, vm::ptr<void> dbg_data);

View File

@ -0,0 +1,36 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Memory/vm.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_rsxaudio.h"
LOG_CHANNEL(sys_rsxaudio);
error_code sys_rsxaudio_initialize(vm::ptr<u32> handle)
{
sys_rsxaudio.todo("sys_rsxaudio_initialize(handle=*0x%x)", handle);
return CELL_OK;
}
error_code sys_rsxaudio_finalize(u32 handle)
{
sys_rsxaudio.todo("sys_rsxaudio_finalize(handle=0x%x)", handle);
return CELL_OK;
}
error_code sys_rsxaudio_import_shared_memory(u32 handle, vm::ptr<u64> addr)
{
sys_rsxaudio.todo("sys_rsxaudio_import_shared_memory(handle=0x%x, addr=*0x%x)", handle, addr);
return CELL_OK;
}
error_code sys_rsxaudio_unimport_shared_memory(u32 handle, vm::ptr<u64> addr)
{
sys_rsxaudio.todo("sys_rsxaudio_unimport_shared_memory(handle=0x%x, addr=*0x%x)", handle, addr);
return CELL_OK;
}

View File

@ -0,0 +1,10 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_rsxaudio_initialize(vm::ptr<u32> handle);
error_code sys_rsxaudio_finalize(u32 handle);
error_code sys_rsxaudio_import_shared_memory(u32 handle, vm::ptr<u64> addr);
error_code sys_rsxaudio_unimport_shared_memory(u32 handle, vm::ptr<u64> addr);

View File

@ -0,0 +1,45 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Memory/vm.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_sm.h"
LOG_CHANNEL(sys_sm);
error_code sys_sm_get_params(vm::ptr<u8> a, vm::ptr<u8> b, vm::ptr<u32> c, vm::ptr<u64> d)
{
sys_sm.todo("sys_sm_get_params(a=*0x%x, b=*0x%x, c=*0x%x, d=*0x%x)", a, b, c, d);
return CELL_OK;
}
error_code sys_sm_get_ext_event2(vm::ptr<u64> a1, vm::ptr<u64> a2, vm::ptr<u64> a3, u64 a4)
{
sys_sm.todo("sys_sm_get_ext_event2(a1=*0x%x, a2=*0x%x, a3=*0x%x, a4=*0x%x, a4=0x%xll", a1, a2, a3, a4);
return CELL_OK;
}
error_code sys_sm_shutdown(u16 op, vm::ptr<void> param, u64 size)
{
sys_sm.todo("sys_sm_shutdown(op=0x%x, param=*0x%x, size=0x%x", op, param, size);
return CELL_OK;
}
error_code sys_sm_control_led(u8 led, u8 action)
{
sys_sm.todo("sys_sm_control_led(led=0x%x, action=0x%x)", led, action);
return CELL_OK;
}
error_code sys_sm_ring_buzzer(u64 packet, u64 a1, u64 a2)
{
sys_sm.todo("sys_sm_ring_buzzer(packet=0x%x, a1=0x%x, a2=0x%x)", packet, a1, a2);
return CELL_OK;
}

View File

@ -0,0 +1,11 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_sm_get_ext_event2(vm::ptr<u64> a1, vm::ptr<u64> a2, vm::ptr<u64> a3, u64 a4);
error_code sys_sm_shutdown(u16 op, vm::ptr<void> param, u64 size);
error_code sys_sm_get_params(vm::ptr<u8> a, vm::ptr<u8> b, vm::ptr<u32> c, vm::ptr<u64> d);
error_code sys_sm_control_led(u8 led, u8 action);
error_code sys_sm_ring_buzzer(u64 packet, u64 a1, u64 a2);

View File

@ -87,12 +87,12 @@ error_code sys_ss_access_control_engine(u64 pkg_id, u64 a2, u64 a3)
}
verify(HERE), a2 == process_getpid();
vm::_ref<u64>(vm::cast(a3)) = authid;
vm::write64(vm::cast(a3), authid);
break;
}
case 0x2:
{
vm::_ref<u64>(vm::cast(a2)) = authid;
vm::write64(vm::cast(a2), authid);
break;
}
case 0x3:
@ -130,3 +130,52 @@ s32 sys_ss_get_open_psid(vm::ptr<CellSsOpenPSID> psid)
return CELL_OK;
}
error_code sys_ss_appliance_info_manager(u32 code, vm::ptr<u8> buffer)
{
sys_ss.todo("sys_ss_appliance_info_manager(code=0x%x, buffer=*0x%x)", code, buffer);
return CELL_OK;
}
error_code sys_ss_get_cache_of_product_mode(vm::ptr<u8> ptr)
{
sys_ss.todo("sys_ss_get_cache_of_product_mode(ptr=*0x%x)", ptr);
return CELL_OK;
}
error_code sys_ss_secure_rtc(u64 cmd, u64 a2, u64 a3, u64 a4)
{
sys_ss.todo("sys_ss_secure_rtc(cmd=0x%llx, a2=0x%x, a3=0x%x, a4=0x%x)", cmd, a2, a3, a4);
return CELL_OK;
}
error_code sys_ss_get_cache_of_flash_ext_flag(vm::ptr<u64> flag)
{
sys_ss.todo("sys_ss_get_cache_of_flash_ext_flag(flag=*0x%x)", flag);
return CELL_OK;
}
error_code sys_ss_get_boot_device(vm::ptr<u64> dev)
{
sys_ss.todo("sys_ss_get_boot_device(dev=*0x%x)", dev);
return CELL_OK;
}
error_code sys_ss_update_manager(u64 pkg_id, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6)
{
sys_ss.todo("sys_ss_update_manager(pkg=0x%llx, a1=0x%x, a2=0x%x, a3=0x%x, a4=0x%x, a5=0x%x, a6=0x%x)", pkg_id, a1, a2, a3, a4, a5, a6);
return CELL_OK;
}
error_code sys_ss_virtual_trm_manager(u64 pkg_id, u64 a1, u64 a2, u64 a3, u64 a4)
{
sys_ss.todo("sys_ss_virtual_trm_manager(pkg=0x%llx, a1=0x%llx, a2=0x%llx, a3=0x%llx, a4=0x%llx)", pkg_id, a1, a2, a3, a4);
return CELL_OK;
}

View File

@ -13,3 +13,10 @@ error_code sys_ss_random_number_generator(u32 arg1, vm::ptr<void> buf, u64 size)
error_code sys_ss_access_control_engine(u64 pkg_id, u64 a2, u64 a3);
s32 sys_ss_get_console_id(vm::ptr<u8> buf);
s32 sys_ss_get_open_psid(vm::ptr<CellSsOpenPSID> ptr);
error_code sys_ss_appliance_info_manager(u32 code, vm::ptr<u8> buffer);
error_code sys_ss_get_cache_of_product_mode(vm::ptr<u8> ptr);
error_code sys_ss_secure_rtc(u64 cmd, u64 a2, u64 a3, u64 a4);
error_code sys_ss_get_cache_of_flash_ext_flag(vm::ptr<u64> flag);
error_code sys_ss_get_boot_device(vm::ptr<u64> dev);
error_code sys_ss_update_manager(u64 pkg_id, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6);
error_code sys_ss_virtual_trm_manager(u64 pkg_id, u64 a1, u64 a2, u64 a3, u64 a4);

View File

@ -0,0 +1,165 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Memory/vm.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_storage.h"
LOG_CHANNEL(sys_storage);
error_code sys_storage_open(u64 device, u64 mode, vm::ptr<u32> fd, u64 flags)
{
sys_storage.todo("sys_storage_open(device=0x%x, mode=0x%x, fd=*0x%x, flags=0x%x)", device, mode, fd, flags);
return CELL_OK;
}
error_code sys_storage_close(u32 fd)
{
sys_storage.todo("sys_storage_close(fd=0x%x)", fd);
return CELL_OK;
}
error_code sys_storage_read(u32 fd, u32 mode, u32 start_sector, u32 num_sectors, vm::ptr<void> bounce_buf, vm::ptr<u32> sectors_read, u64 flags)
{
sys_storage.todo("sys_storage_read(fd=0x%x, mode=0x%x, start_sector=0x%x, num_sectors=0x%x, bounce_buf=*0x%x, sectors_read=*0x%x, flags=0x%x)", fd, mode, start_sector, num_sectors, bounce_buf, sectors_read, flags);
return CELL_OK;
}
error_code sys_storage_write(u32 fd, u32 mode, u32 start_sector, u32 num_sectors, vm::ptr<void> data, vm::ptr<u32> sectors_wrote, u64 flags)
{
sys_storage.todo("sys_storage_write(fd=0x%x, mode=0x%x, start_sector=0x%x, num_sectors=0x%x, data=*=0x%x, sectors_wrote=*0x%x, flags=0x%llx)", fd, mode, start_sector, num_sectors, data, sectors_wrote, flags);
return CELL_OK;
}
error_code sys_storage_send_device_command(u32 dev_handle, u64 cmd, vm::ptr<void> in, u64 inlen, vm::ptr<void> out, u64 outlen)
{
sys_storage.todo("sys_storage_send_device_command(dev_handle=0x%x, cmd=0x%llx, in=*0x%, inlen=0x%x, out=*0x%x, outlen=0x%x)", dev_handle, cmd, in, inlen, out, outlen);
return CELL_OK;
}
error_code sys_storage_async_configure(u32 fd, u32 io_buf, u32 equeue_id, u32 unk)
{
sys_storage.todo("sys_storage_async_configure(fd=0x%x, io_buf=0x%x, equeue_id=0x%x, unk=*0x%x)", fd, io_buf, equeue_id, unk);
return CELL_OK;
}
error_code sys_storage_async_send_device_command(u32 dev_handle, u64 cmd, vm::ptr<void> in, u64 inlen, vm::ptr<void> out, u64 outlen, u64 unk)
{
sys_storage.todo("sys_storage_async_send_device_command(dev_handle=0x%x, cmd=0x%llx, in=*0x%x, inlen=0x%x, out=*0x%x, outlen=0x%x, unk=0x%x)", dev_handle, cmd, in, inlen, out, outlen, unk);
return CELL_OK;
}
error_code sys_storage_async_read()
{
sys_storage.todo("sys_storage_async_read()");
return CELL_OK;
}
error_code sys_storage_async_write()
{
sys_storage.todo("sys_storage_async_write()");
return CELL_OK;
}
error_code sys_storage_async_cancel()
{
sys_storage.todo("sys_storage_async_cancel()");
return CELL_OK;
}
error_code sys_storage_get_device_info(u64 device, vm::ptr<StorageDeviceInfo> buffer)
{
sys_storage.todo("sys_storage_get_device_info(device=0x%x, buffer=*0x%x)", device, buffer);
return CELL_OK;
}
error_code sys_storage_get_device_config(vm::ptr<u32> storages, vm::ptr<u32> devices)
{
sys_storage.todo("sys_storage_get_device_config(storages=*0x%x, devices=*0x%x)", storages, devices);
return CELL_OK;
}
error_code sys_storage_report_devices(u32 storages, u32 start, u32 devices, vm::ptr<u64> device_ids)
{
sys_storage.todo("sys_storage_report_devices(storages=0x%x, start=0x%x, devices=0x%x, device_ids=0x%x)", storages, start, devices, device_ids);
return CELL_OK;
}
error_code sys_storage_configure_medium_event(u32 fd, u32 equeue_id, u32 c)
{
sys_storage.todo("sys_storage_configure_medium_event(fd=0x%x, equeue_id=0x%x, c=0x%x)", fd, equeue_id, c);
return CELL_OK;
}
error_code sys_storage_set_medium_polling_interval()
{
sys_storage.todo("sys_storage_set_medium_polling_interval()");
return CELL_OK;
}
error_code sys_storage_create_region()
{
sys_storage.todo("sys_storage_create_region()");
return CELL_OK;
}
error_code sys_storage_delete_region()
{
sys_storage.todo("sys_storage_delete_region()");
return CELL_OK;
}
error_code sys_storage_execute_device_command(u32 fd, u64 cmd, vm::ptr<char> cmdbuf, u64 cmdbuf_size, vm::ptr<char> databuf, u64 databuf_size, vm::ptr<u32> driver_status)
{
sys_storage.todo("sys_storage_execute_device_command(fd=0x%x, cmd=0x%llx, cmdbuf=*0x%x, cmdbuf_size=0x%llx, databuf=*0x%x, databuf_size=0x%llx, driver_status=*0x%x)", fd, cmd, cmdbuf, cmdbuf_size, databuf, databuf_size, driver_status);
return CELL_OK;
}
error_code sys_storage_check_region_acl()
{
sys_storage.todo("sys_storage_check_region_acl()");
return CELL_OK;
}
error_code sys_storage_set_region_acl()
{
sys_storage.todo("sys_storage_set_region_acl()");
return CELL_OK;
}
error_code sys_storage_get_region_offset()
{
sys_storage.todo("sys_storage_get_region_offset()");
return CELL_OK;
}
error_code sys_storage_set_emulated_speed()
{
sys_storage.todo("sys_storage_set_emulated_speed()");
return CELL_OK;
}

View File

@ -0,0 +1,39 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
struct StorageDeviceInfo
{
u8 name[0x20]; // 0x0
be_t<u32> zero; // 0x20
be_t<u32> zero2; // 0x24
be_t<u64> sector_count; // 0x28
be_t<u32> sector_size; // 0x30
be_t<u32> one; // 0x34
u8 flags[8]; // 0x38
};
// SysCalls
error_code sys_storage_open(u64 device, u64 mode, vm::ptr<u32> fd, u64 flags);
error_code sys_storage_close(u32 fd);
error_code sys_storage_read(u32 fd, u32 mode, u32 start_sector, u32 num_sectors, vm::ptr<void> bounce_buf, vm::ptr<u32> sectors_read, u64 flags);
error_code sys_storage_write(u32 fd, u32 mode, u32 start_sector, u32 num_sectors, vm::ptr<void> data, vm::ptr<u32> sectors_wrote, u64 flags);
error_code sys_storage_send_device_command(u32 dev_handle, u64 cmd, vm::ptr<void> in, u64 inlen, vm::ptr<void> out, u64 outlen);
error_code sys_storage_async_configure(u32 fd, u32 io_buf, u32 equeue_id, u32 unk);
error_code sys_storage_async_read();
error_code sys_storage_async_write();
error_code sys_storage_async_cancel();
error_code sys_storage_get_device_info(u64 device, vm::ptr<StorageDeviceInfo> buffer);
error_code sys_storage_get_device_config(vm::ptr<u32> storages, vm::ptr<u32> devices);
error_code sys_storage_report_devices(u32 storages, u32 start, u32 devices, vm::ptr<u64> device_ids);
error_code sys_storage_configure_medium_event(u32 fd, u32 equeue_id, u32 c);
error_code sys_storage_set_medium_polling_interval();
error_code sys_storage_create_region();
error_code sys_storage_delete_region();
error_code sys_storage_execute_device_command(u32 fd, u64 cmd, vm::ptr<char> cmdbuf, u64 cmdbuf_size, vm::ptr<char> databuf, u64 databuf_size, vm::ptr<u32> driver_status);
error_code sys_storage_check_region_acl();
error_code sys_storage_set_region_acl();
error_code sys_storage_async_send_device_command(u32 dev_handle, u64 cmd, vm::ptr<void> in, u64 inlen, vm::ptr<void> out, u64 outlen, u64 unk);
error_code sys_storage_get_region_offset();
error_code sys_storage_set_emulated_speed();

View File

@ -174,7 +174,7 @@ u64 get_guest_system_time()
}
// Functions
s32 sys_time_get_timezone(vm::ptr<s32> timezone, vm::ptr<s32> summertime)
error_code sys_time_get_timezone(vm::ptr<s32> timezone, vm::ptr<s32> summertime)
{
sys_time.warning("sys_time_get_timezone(timezone=*0x%x, summertime=*0x%x)", timezone, summertime);
@ -184,7 +184,7 @@ s32 sys_time_get_timezone(vm::ptr<s32> timezone, vm::ptr<s32> summertime)
return CELL_OK;
}
s32 sys_time_get_current_time(vm::ptr<s64> sec, vm::ptr<s64> nsec)
error_code sys_time_get_current_time(vm::ptr<s64> sec, vm::ptr<s64> nsec)
{
sys_time.trace("sys_time_get_current_time(sec=*0x%x, nsec=*0x%x)", sec, nsec);
@ -273,3 +273,10 @@ u64 sys_time_get_timebase_frequency()
return g_timebase_freq;
}
error_code sys_time_get_rtc(vm::ptr<u64> rtc)
{
sys_time.todo("sys_time_get_rtc(rtc=*0x%x)", rtc);
return CELL_OK;
}

View File

@ -3,6 +3,8 @@
#include "Emu/Memory/vm_ptr.h"
// SysCalls
s32 sys_time_get_timezone(vm::ptr<s32> timezone, vm::ptr<s32> summertime);
s32 sys_time_get_current_time(vm::ptr<s64> sec, vm::ptr<s64> nsec);
error_code sys_time_get_timezone(vm::ptr<s32> timezone, vm::ptr<s32> summertime);
error_code sys_time_get_current_time(vm::ptr<s64> sec, vm::ptr<s64> nsec);
u64 sys_time_get_timebase_frequency();
error_code sys_time_get_rtc(vm::ptr<u64> rtc);

View File

@ -0,0 +1,36 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Cell/ErrorCodes.h"
#include "sys_uart.h"
LOG_CHANNEL(sys_uart);
error_code sys_uart_initialize()
{
sys_uart.todo("sys_uart_initialize()");
return CELL_OK;
}
error_code sys_uart_receive(vm::ptr<void> buffer, u64 size, u32 unk)
{
sys_uart.todo("sys_uart_receive(buffer=*0x%x, size=0x%llx, unk=0x%x)", buffer, size, unk);
return CELL_OK;
}
error_code sys_uart_send(vm::cptr<void> buffer, u64 size, u64 flags)
{
sys_uart.todo("sys_uart_send(buffer=0x%x, size=0x%llx, flags=0x%x)", buffer, size, flags);
return CELL_OK;
}
error_code sys_uart_get_params(vm::ptr<char> buffer)
{
sys_uart.todo("sys_uart_get_params(buffer=0x%x)", buffer);
return CELL_OK;
}

View File

@ -0,0 +1,10 @@
#pragma once
#include "Emu/Memory/vm_ptr.h"
// SysCalls
error_code sys_uart_initialize();
error_code sys_uart_receive(vm::ptr<void> buffer, u64 size, u32 unk);
error_code sys_uart_send(vm::cptr<void> buffer, u64 size, u64 flags);
error_code sys_uart_get_params(vm::ptr<char> buffer);

View File

@ -168,6 +168,16 @@
<ClCompile Include="Emu\Cell\lv2\sys_usbd.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_vm.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_ss.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_hid.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_io.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_rsxaudio.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_sm.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_storage.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_uart.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_bdemu.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_console.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_btsetting.cpp" />
<ClCompile Include="Emu\Cell\lv2\sys_crypto_engine.cpp" />
<ClCompile Include="Emu\Cell\Modules\sys_libc_.cpp" />
<ClCompile Include="Emu\Cell\PPUModule.cpp" />
<ClCompile Include="Emu\Cell\Modules\cellAdec.cpp" />
@ -282,7 +292,7 @@
<ClCompile Include="Emu\Cell\Modules\sysPrxForUser.cpp" />
<ClCompile Include="Emu\Cell\Modules\sys_game.cpp" />
<ClCompile Include="Emu\Cell\Modules\sys_heap.cpp" />
<ClCompile Include="Emu\Cell\Modules\sys_io.cpp" />
<ClCompile Include="Emu\Cell\Modules\sys_io_.cpp" />
<ClCompile Include="Emu\Cell\Modules\sys_libc.cpp" />
<ClCompile Include="Emu\Cell\Modules\sys_lv2dbg.cpp" />
<ClCompile Include="Emu\Cell\Modules\sys_lwcond_.cpp" />
@ -394,6 +404,7 @@
<ItemGroup>
<ClInclude Include="..\3rdparty\stblib\stb_image.h" />
<ClInclude Include="..\Utilities\address_range.h" />
<ClInclude Include="Emu\Cell\lv2\sys_crypto_engine.h" />
<ClInclude Include="Emu\Cell\Modules\cellCrossController.h" />
<ClInclude Include="Emu\Cell\Modules\cellRemotePlay.h" />
<ClInclude Include="Emu\Cell\Modules\cellSsl.h" />
@ -497,6 +508,15 @@
<ClInclude Include="Emu\Cell\lv2\sys_usbd.h" />
<ClInclude Include="Emu\Cell\lv2\sys_vm.h" />
<ClInclude Include="Emu\Cell\lv2\sys_ss.h" />
<ClInclude Include="Emu\Cell\lv2\sys_hid.h" />
<ClInclude Include="Emu\Cell\lv2\sys_io.h" />
<ClInclude Include="Emu\Cell\lv2\sys_rsxaudio.h" />
<ClInclude Include="Emu\Cell\lv2\sys_sm.h" />
<ClInclude Include="Emu\Cell\lv2\sys_storage.h" />
<ClInclude Include="Emu\Cell\lv2\sys_uart.h" />
<ClInclude Include="Emu\Cell\lv2\sys_bdemu.h" />
<ClInclude Include="Emu\Cell\lv2\sys_console.h" />
<ClCompile Include="Emu\Cell\lv2\sys_btsetting.h" />
<ClInclude Include="Emu\Cell\MFC.h" />
<ClInclude Include="Emu\Cell\PPUModule.h" />
<ClInclude Include="Emu\Cell\Modules\cellAdec.h" />

View File

@ -299,6 +299,33 @@
<ClCompile Include="Emu\Cell\lv2\sys_vm.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_uart.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_storage.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_sm.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_hid.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_io.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_rsxaudio.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_console.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_bdemu.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_btsetting.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\Modules\cellAdec.cpp">
<Filter>Emu\Cell\Modules</Filter>
</ClCompile>
@ -632,7 +659,7 @@
<ClCompile Include="Emu\Cell\Modules\sys_heap.cpp">
<Filter>Emu\Cell\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\Modules\sys_io.cpp">
<ClCompile Include="Emu\Cell\Modules\sys_io_.cpp">
<Filter>Emu\Cell\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\Modules\sys_libc.cpp">
@ -851,6 +878,12 @@
<ClCompile Include="Emu\RSX\Overlays\Shaders\shader_loading_dialog.cpp">
<Filter>Emu\GPU\RSX\Overlays\Shaders</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_btsetting.h">
<Filter>Header Files</Filter>
</ClCompile>
<ClCompile Include="Emu\Cell\lv2\sys_crypto_engine.cpp">
<Filter>Emu\Cell\lv2</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Crypto\aes.h">
@ -1159,6 +1192,33 @@
<ClInclude Include="Emu\Cell\lv2\sys_vm.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_uart.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_storage.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_sm.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_hid.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_io.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_rsxaudio.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_console.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_bdemu.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\lv2\sys_crypto_engine.h">
<Filter>Emu\Cell\lv2</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\Modules\cellAdec.h">
<Filter>Emu\Cell\Modules</Filter>
</ClInclude>