Exemplo n.º 1
0
/***********************************************************************
* get pad data direct over syscall 
* (very simple, no error-handling, no synchronization...)
* 
* int32_t port_no   = pad port number (0 - 7)
* CellPadData *data = data struct for holding pad_data
***********************************************************************/
void MyPadGetData(int32_t port_no, CellPadData *data)
{
  	uint32_t port = *(uint32_t*)(*(uint32_t*)(get_vsh_pad_obj() + 4) + 0x104 + port_no * 0xE8);
  
  	// sys_hid_manager_read()
	system_call_4(0x1F6, (uint64_t)port, /*0x02*//*0x82*/0xFF, (uint64_t)(uint32_t)data+4, 0x80);
	
	data->len = (int32_t)p1;
}
Exemplo n.º 2
0
int ps3mapi_get_process_by_pid(process_id_t pid, process_t process)
{
	system_call_4(8, SYSCALL8_OPCODE_PS3MAPI, PS3MAPI_OPCODE_GET_PROC_BY_PID, (uint64_t)pid, (uint64_t)((uint32_t)process));
	return_to_user_prog(int);						
}
Exemplo n.º 3
0
int ps3_shutdown(void)
{
	cellFsUnlink((char*)"/dev_hdd0/tmp/turnoff");
	system_call_4(379, 0x1100, 0, 0, 0);
	return_to_user_prog(int);						
}
Exemplo n.º 4
0
int ps3mapi_set_psid(uint64_t part1, uint64_t part2)
{
	system_call_4(8, SYSCALL8_OPCODE_PS3MAPI, PS3MAPI_OPCODE_SET_PSID, (uint64_t)part1, (uint64_t)part2);
	return_to_user_prog(int);						
}
Exemplo n.º 5
0
int ps3mapi_unload_process_modules(process_id_t pid, sys_prx_id_t prx_id)
{
	system_call_4(8, SYSCALL8_OPCODE_PS3MAPI, PS3MAPI_OPCODE_UNLOAD_PROC_MODULE, (uint64_t)pid, (uint64_t)prx_id);
	return_to_user_prog(int);						
}
Exemplo n.º 6
0
int ps3mapi_get_all_process_modules_prx_id(process_id_t pid, sys_prx_id_t *prx_id_list)
{
	system_call_4(8, SYSCALL8_OPCODE_PS3MAPI, PS3MAPI_OPCODE_GET_ALL_PROC_MODULE_PID, (uint64_t)pid, (uint64_t)((uint32_t)prx_id_list));
	return_to_user_prog(int);						
}
Exemplo n.º 7
0
int ccapi_get_process_mem(process_id_t pid, uint64_t addr, char *buf, int size)
{
	system_call_4(200, (uint64_t)pid, (uint64_t)addr, (uint64_t)size, (uint64_t)((uint32_t)buf));
	return_to_user_prog(int);
}