MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / RSP_HLE_ProcessTask

Function RSP_HLE_ProcessTask

Source/Core/RSP_HLE.cpp:262–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260
261
262void RSP_HLE_ProcessTask()
263{
264 OSTask * pTask = (OSTask *)(g_pu8SpMemBase + 0x0FC0);
265
266 EProcessResult result( PR_NOT_STARTED );
267
268 // non task
269 if(pTask->t.ucode_boot_size > 0x1000)
270 {
271 RSP_HLE_CICX105(pTask);
272 RSP_HLE_Finished(SP_STATUS_BROKE|SP_STATUS_HALT);
273 return;
274 }
275
276 switch ( pTask->t.type )
277 {
278 case M_GFXTASK:
279 // frozen task
280 if(Memory_DPC_GetRegister(DPC_STATUS_REG) & DPC_STATUS_FREEZE)
281 {
282 return;
283 }
284 result = RSP_HLE_Graphics();
285 break;
286
287 case M_AUDTASK:
288 result = RSP_HLE_Audio();
289 break;
290
291 case M_VIDTASK:
292 // Can't handle
293 break;
294
295 case M_JPGTASK:
296 result = RSP_HLE_Jpeg(pTask);
297 break;
298 #ifdef DAEDALUS_ENABLE_ASSERTS
299 default:
300
301 // This can be easily handled, need to find first a game that uses this though
302 DAEDALUS_ASSERT( pTask->t.type != M_FBTASK, "FB task is not handled");
303
304 // Can't handle
305 DBGConsole_Msg(0, "Unknown task: %08x", pTask->t.type );
306 // RSP_HLE_DumpTaskInfo( pTask );
307 // RDP_DumpRSPCode("boot", 0xDEAFF00D, (u32*)(g_pu8RamBase + (((u32)pTask->t.ucode_boot)&0x00FFFFFF)), 0x04001000, pTask->t.ucode_boot_size);
308 // RDP_DumpRSPCode("unkcode", 0xDEAFF00D, (u32*)(g_pu8RamBase + (((u32)pTask->t.ucode)&0x00FFFFFF)), 0x04001080, 0x1000 - 0x80);//pTask->t.ucode_size);
309
310 break;
311 #endif
312 }
313
314 // Started and completed. No need to change cores. [synchronously]
315 if( result == PR_COMPLETED )
316 RSP_HLE_Finished(SP_STATUS_TASKDONE|SP_STATUS_BROKE|SP_STATUS_HALT);
317}

Callers 2

MemoryUpdateSPStatusFunction · 0.85
MemoryUpdateDPFunction · 0.85

Calls 5

RSP_HLE_CICX105Function · 0.85
RSP_HLE_FinishedFunction · 0.85
RSP_HLE_GraphicsFunction · 0.85
RSP_HLE_AudioFunction · 0.85
RSP_HLE_JpegFunction · 0.85

Tested by

no test coverage detected