static bool try_fast_task_dispatching(struct hle_t* hle) { /* identify task ucode by its type */ switch (*dmem_u32(hle, TASK_TYPE)) { case 1: if (FORWARD_GFX) { forward_gfx_task(hle); return true; } break; case 2: if (FORWARD_AUDIO) { if (rsp_info.ProcessAlistList) rsp_info.ProcessAlistList(); return true; } if (try_fast_audio_dispatching(hle)) return true; break; case 7: if (rsp_info.ShowCFB) rsp_info.ShowCFB(); return true; } return false; }
static void normal_task_dispatching(void) { const uint32_t sum = sum_bytes((void*)dram_u32(*dmem_u32(TASK_UCODE)), min(*dmem_u32(TASK_UCODE_SIZE), 0xf80) >> 1); switch (sum) { /* StoreVe12: found in Zelda Ocarina of Time [misleading task->type == 4] */ case 0x278: /* Nothing to emulate */ return; /* GFX: Twintris [misleading task->type == 0] */ case 0x212ee: if (FORWARD_GFX) { forward_gfx_task(); return; } break; /* JPEG: found in Pokemon Stadium J */ case 0x2c85a: jpeg_decode_PS0(); return; /* JPEG: found in Zelda Ocarina of Time, Pokemon Stadium 1, Pokemon Stadium 2 */ case 0x2caa6: jpeg_decode_PS(); return; /* JPEG: found in Ogre Battle, Bottom of the 9th */ case 0x130de: case 0x278b0: jpeg_decode_OB(); return; } handle_unknown_task(sum); }
static int try_fast_task_dispatching(void) { /* identify task ucode by its type */ switch (*dmem_u32(TASK_TYPE)) { case 1: if (FORWARD_GFX) { forward_gfx_task(); return 1; } break; case 2: if (FORWARD_AUDIO) { forward_audio_task(); return 1; } else if (try_fast_audio_dispatching()) return 1; break; case 7: show_cfb(); return 1; } return 0; }
static bool try_fast_task_dispatching(struct hle_t* hle) { /* identify task ucode by its type */ switch (*dmem_u32(hle, TASK_TYPE)) { case 1: if (FORWARD_GFX) { forward_gfx_task(hle); return true; } break; case 2: if (FORWARD_AUDIO) { HleProcessAlistList(hle->user_defined); return true; } else if (try_fast_audio_dispatching(hle)) return true; break; case 7: HleShowCFB(hle->user_defined); return true; } return false; }
static void normal_task_dispatching() { const OSTask_t * const task = get_task(); const unsigned int sum = sum_bytes(rspInfo.RDRAM + task->ucode, min(task->ucode_size, 0xf80) >> 1); switch (sum) { /* StoreVe12: found in Zelda Ocarina of Time [misleading task->type == 4] */ case 0x278: /* Nothing to emulate */ return; /* GFX: Twintris [misleading task->type == 0] */ case 0x212ee: if (FORWARD_GFX) { forward_gfx_task(); return; } break; /* JPEG: found in Pokemon Stadium J */ case 0x2c85a: jpeg_decode_PS0(); return; /* JPEG: found in Zelda Ocarina of Time, Pokemon Stadium 1, Pokemon Stadium 2 */ case 0x2caa6: jpeg_decode_PS(); return; /* JPEG: found in Ogre Battle, Bottom of the 9th */ case 0x130de: case 0x278b0: jpeg_decode_OB(); return; } handle_unknown_task(sum); }
static int try_fast_task_dispatching() { /* identify task ucode by its type */ const OSTask_t * const task = get_task(); switch (task->type) { case 1: if (FORWARD_GFX) { forward_gfx_task(); return 1; } break; case 2: if (FORWARD_AUDIO) { forward_audio_task(); return 1; } else if (try_fast_audio_dispatching()) { return 1; } break; case 7: show_cfb(); return 1; } return 0; }
static void normal_task_dispatching(struct hle_t* hle) { const unsigned int sum = sum_bytes((void*)dram_u32(hle, *dmem_u32(hle, TASK_UCODE)), min(*dmem_u32(hle, TASK_UCODE_SIZE), 0xf80) >> 1); switch (sum) { /* StoreVe12: found in Zelda Ocarina of Time [misleading task->type == 4] */ case 0x278: /* Nothing to emulate */ return; /* GFX: Twintris [misleading task->type == 0] */ case 0x212ee: if (FORWARD_GFX) { forward_gfx_task(hle); return; } break; /* JPEG: found in Pokemon Stadium J */ case 0x2c85a: jpeg_decode_PS0(hle); return; /* JPEG: found in Zelda Ocarina of Time, Pokemon Stadium 1, Pokemon Stadium 2 */ case 0x2caa6: jpeg_decode_PS(hle); return; /* JPEG: found in Ogre Battle, Bottom of the 9th */ case 0x130de: case 0x278b0: jpeg_decode_OB(hle); return; } HleWarnMessage(hle->user_defined, "unknown OSTask: sum: %x PC:%x", sum, *hle->sp_pc); }