//------------------------------------------------------------------------- void cdvdfsv_rpc0_th(void *args) { sceSifSetRpcQueue(&rpc0_DQ, GetThreadId()); sceSifRegisterRpc(&S596_rpcSD, 0x80000596, (void *)cbrpc_S596, S596_rpcbuf, NULL, NULL, &rpc0_DQ); sceSifRegisterRpc(&cddiskready2_rpcSD, 0x8000059c, (void *)cbrpc_cddiskready2, cddiskready2_rpcbuf, NULL, NULL, &rpc0_DQ); sceSifRpcLoop(&rpc0_DQ); }
//------------------------------------------------------------------------- void cdvdfsv_rpc2_th(void *args) { // Starts NCMD rpc server // Starts Search file rpc server sceSifSetRpcQueue(&rpc2_DQ, GetThreadId()); sceSifRegisterRpc(&cdvdNcmds_rpcSD, 0x80000595, (void *)cbrpc_cdvdNcmds, cdvdNcmds_rpcbuf, NULL, NULL, &rpc2_DQ); sceSifRegisterRpc(&cdsearchfile_rpcSD, 0x80000597, (void *)cbrpc_cdsearchfile, cdsearchfile_rpcbuf, NULL, NULL, &rpc2_DQ); sceSifRpcLoop(&rpc2_DQ); }
//------------------------------------------------------------------------- void cdvdfsv_rpc1_th(void *args) { // Starts cd Init rpc Server // Starts cd Disk ready rpc server // Starts SCMD rpc server; sceSifSetRpcQueue(&rpc1_DQ, GetThreadId()); sceSifRegisterRpc(&cdinit_rpcSD, 0x80000592, (void *)cbrpc_cdinit, cdinit_rpcbuf, NULL, NULL, &rpc1_DQ); sceSifRegisterRpc(&cdvdScmds_rpcSD, 0x80000593, (void *)cbrpc_cdvdScmds, cdvdScmds_rpcbuf, NULL, NULL, &rpc1_DQ); sceSifRegisterRpc(&cddiskready_rpcSD, 0x8000059a, (void *)cbrpc_cddiskready, cddiskready_rpcbuf, NULL, NULL, &rpc1_DQ); sceSifRpcLoop(&rpc1_DQ); }
/* ------------------------------------------------------------------------ Main thread for the ezbgm module. After execution, initialize interrupt environment, register command, and then wait until there is a request from the EE. ------------------------------------------------------------------------ */ int sce_bgm_loop() { sceSifQueueData qd; sceSifServeData sd; //-- Initialize interrupt environment in advance. CpuEnableIntr(); EnableIntr( INUM_DMA_4 ); EnableIntr( INUM_DMA_7 ); //--- Register function that is called according to request sceSifInitRpc(0); sceSifSetRpcQueue( &qd, GetThreadId() ); sceSifRegisterRpc( &sd, EZBGM_DEV, bgmFunc, (void*)gRpcArg, NULL, NULL, &qd ); PRINTF(("goto bgm cmd loop\n")); //--- Command-wait loop sceSifRpcLoop(&qd); return 0; }
void rpc_thread(void *d) { printf(BANNER, VER_MAJOR, VER_MINOR); sceSifInitRpc(0); sceSifSetRpcQueue(&queue, GetThreadId()); sceSifRegisterRpc(&server, BINDID_PS2SND, (void*)rpc_server, rpc_buffer[0], 0, 0, &queue); sceSifRpcLoop(&queue); }
//-------------------------------------------------------------- void thread_rpc_S_0A10(void* arg) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); sceSifSetRpcQueue(&rpc_qdS_0A10, GetThreadId()); sceSifRegisterRpc(&rpc_sdS_0A10, 0x80000a10, (void *)cb_rpc_S_0A10, &ntpbserver_rpc_buf, NULL, NULL, &rpc_qdS_0A10); sceSifRpcLoop(&rpc_qdS_0A10); }
//-------------------------------------------------------------- void thread_rpc_S_0400(void* arg) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); sceSifSetRpcQueue(&mcserv_qdS_0400, GetThreadId()); sceSifRegisterRpc(&mcserv_sdS_0400, 0x80000400, (void *)cb_rpc_S_0400, &mcserv_rpc_buf, NULL, NULL, &mcserv_qdS_0400); sceSifRpcLoop(&mcserv_qdS_0400); }
void rpcMainThread(void* param) { //int ret=-1; int tid; sceSifInitRpc(0); tid = GetThreadId(); sceSifSetRpcQueue(&rpc_queue, tid); sceSifRegisterRpc(&rpc_server, BIND_RPC_ID, (void *) rpcCommandHandler, (u8 *) &_rpc_buffer, 0, 0, &rpc_queue); sceSifRpcLoop(&rpc_queue); }
static void rpc_end_thread(void *unused) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); sceSifSetRpcQueue(&end_qd, GetThreadId()); sceSifRegisterRpc(&end_sd, RPCS_ATA_DMA_END, rpc_end_func, NULL, NULL, NULL, &end_qd); sceSifRpcLoop(&end_qd); }
static void rpc_thread(void *unused) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); sceSifSetRpcQueue(&qd, GetThreadId()); sceSifRegisterRpc(&sd, RPCS_ATA_DMA_BEGIN, rpc_func, &dma_transfer, NULL, NULL, &qd); sceSifRpcLoop(&qd); }
static void _rpc_thread(void* param) { int tid; M_DEBUG("%s\n", __func__); M_PRINTF("RPC thread running\n"); tid = GetThreadId(); sceSifSetRpcQueue(&rpc_queue, tid); sceSifRegisterRpc(&rpc_server, SMAP_BIND_RPC_ID, (void *)_rpc_cmd_handler, _rpc_buffer, 0, 0, &rpc_queue); sceSifRpcLoop(&rpc_queue); }