Beispiel #1
0
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);
}
Beispiel #2
0
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);
}
Beispiel #3
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);
}
Beispiel #4
0
void CHle::normal_task_dispatching(void)
{
    const unsigned int sum =
        sum_bytes((const uint8_t *)dram_u32(this, *dmem_u32(this, TASK_UCODE)), min(*dmem_u32(this, 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 (m_ForwardGFX)
        {
            m_ProcessDList();
            return;
        }
        break;

        /* JPEG: found in Pokemon Stadium J */
    case 0x2c85a:
        jpeg_decode_PS0(this);
        return;

        /* JPEG: found in Zelda Ocarina of Time, Pokemon Stadium 1, Pokemon Stadium 2 */
    case 0x2caa6:
        jpeg_decode_PS(this);
        return;

        /* JPEG: found in Ogre Battle, Bottom of the 9th */
    case 0x130de:
    case 0x278b0:
        jpeg_decode_OB(this);
        return;
    }

    WarnMessage("unknown OSTask: sum: %x PC:%x", sum, *m_sp_pc);
#ifdef ENABLE_TASK_DUMP
    dump_unknown_task(this, sum);
#endif
}