Пример #1
0
static bool try_fast_audio_dispatching(struct hle_t* hle)
{
    uint32_t v;
    /* identify audio ucode by using the content of ucode_data */
    uint32_t ucode_data = *dmem_u32(hle, TASK_UCODE_DATA);

    if (*dram_u32(hle, ucode_data) == 0x00000001)
    {
        if (*dram_u32(hle, ucode_data + 0x30) == 0xf0000f00)
        {
           v = *dram_u32(hle, ucode_data + 0x28);
           switch(v)
           {
              case 0x1e24138c: /* audio ABI (most common) */
                 alist_process_audio(hle); return true;
              case 0x1dc8138c: /* GoldenEye */
                 alist_process_audio_ge(hle); return true;
              case 0x1e3c1390: /* BlastCorp, DiddyKongRacing */
                 alist_process_audio_bc(hle); return true;
              default:
                 HleWarnMessage(hle->user_defined, "ABI1 identification regression: v=%08x", v);
           }
        }
        else
        {
           v = *dram_u32(hle, ucode_data + 0x10);
           switch(v)
           {
              case 0x11181350: /* MarioKart, WaveRace (E) */
                 alist_process_nead_mk(hle); return true;
              case 0x111812e0: /* StarFox (J) */
                 alist_process_nead_sfj(hle); return true;
              case 0x110412ac: /* WaveRace (J RevB) */
                 alist_process_nead_wrjb(hle); return true;
              case 0x110412cc: /* StarFox/LylatWars (except J) */
                 alist_process_nead_sf(hle); return true;
              case 0x1cd01250: /* FZeroX */
                 alist_process_nead_fz(hle); return true;
              case 0x1f08122c: /* YoshisStory */
                 alist_process_nead_ys(hle); return true;
              case 0x1f38122c: /* 1080° Snowboarding */
                 alist_process_nead_1080(hle); return true;
              case 0x1f681230: /* Zelda OoT / Zelda MM (J, J RevA) */
                 alist_process_nead_oot(hle); return true;
              case 0x1f801250: /* Zelda MM (except J, J RevA, E Beta), PokemonStadium 2 */
                 alist_process_nead_mm(hle); return true;
              case 0x109411f8: /* Zelda MM (E Beta) */
                 alist_process_nead_mmb(hle); return true;
              case 0x1eac11b8: /* AnimalCrossing */
                 alist_process_nead_ac(hle); return true;
              case 0x00010010: /* MusyX v2 (IndianaJones, BattleForNaboo) */
                 musyx_v2_task(hle); return true;

              default:
                 HleWarnMessage(hle->user_defined, "ABI2 identification regression: v=%08x", v);
           }
        }
    }
    else
    {
       v = *dram_u32(hle, ucode_data + 0x10);
       switch(v)
       {
          /* -- MusyX v1 --
             Star Wars: Rogue Squadron
             Resident Evil 2
             Polaris SnoCross
             007: The World Is Not Enough
             Rugrats In Paris
             NBA ShowTime
             Hydro Thunder
             Tarzan
             Gauntlet Legends
             Rush 2049
             */
          case 0x00000001:
             musyx_v1_task(hle);
             return true;
             /* NAUDIO (many games) */
          case 0x0000127c:
             alist_process_naudio(hle);
             return true;
             /* Banjo Kazooie */
          case 0x00001280:
             alist_process_naudio_bk(hle);
             return true;
             /* Donkey Kong 64 */
          case 0x1c58126c:
             alist_process_naudio_dk(hle);
             return true;
             /* Banjo Tooie
              * Jet Force Gemini
              * Mickey's SpeedWay USA
              * Perfect Dark */
          case 0x1ae8143c:
             alist_process_naudio_mp3(hle);
             return true;
          case 0x1ab0140c:
             /* Conker's Bad Fur Day */
             alist_process_naudio_cbfd(hle);
             return true;
          default:
             HleWarnMessage(hle->user_defined, "ABI3 identification regression: v=%08x", v);
       }
    }

    return false;
}
Пример #2
0
void ProcessMusyX_v1()
{
	SetupMusyX();
	musyx_v1_task(&_hle);
}
Пример #3
0
bool CHle::try_fast_audio_dispatching(void)
{
    /* identify audio ucode by using the content of ucode_data */
    uint32_t ucode_data = *dmem_u32(this, TASK_UCODE_DATA);
    uint32_t v;

    if (*dram_u32(this, ucode_data) == 0x00000001)
    {
        if (*dram_u32(this, ucode_data + 0x30) == 0xf0000f00)
        {
            v = *dram_u32(this, ucode_data + 0x28);
            switch (v)
            {
            case 0x1e24138c: /* audio ABI (most common) */
                alist_process_audio(this);
                return true;
            case 0x1dc8138c: /* GoldenEye */
                alist_process_audio_ge(this);
                return true;
            case 0x1e3c1390: /* BlastCorp, DiddyKongRacing */
                alist_process_audio_bc(this);
                return true;
            default:
                WarnMessage("ABI1 identification regression: v=%08x", v);
            }
        }
        else
        {
            v = *dram_u32(this, ucode_data + 0x10);
            switch (v)
            {
            case 0x11181350: /* MarioKart, WaveRace (E) */
                alist_process_nead_mk(this);
                return true;
            case 0x111812e0: /* StarFox (J) */
                alist_process_nead_sfj(this);
                return true;
            case 0x110412ac: /* WaveRace (J RevB) */
                alist_process_nead_wrjb(this);
                return true;
            case 0x110412cc: /* StarFox/LylatWars (except J) */
                alist_process_nead_sf(this);
                return true;
            case 0x1cd01250: /* FZeroX */
                alist_process_nead_fz(this);
                return true;
            case 0x1f08122c: /* YoshisStory */
                alist_process_nead_ys(this);
                return true;
            case 0x1f38122c: /* 1080° Snowboarding */
                alist_process_nead_1080(this);
                return true;
            case 0x1f681230: /* Zelda OoT / Zelda MM (J, J RevA) */
                alist_process_nead_oot(this);
                return true;
            case 0x1f801250: /* Zelda MM (except J, J RevA, E Beta), PokemonStadium 2 */
                alist_process_nead_mm(this);
                return true;
            case 0x109411f8: /* Zelda MM (E Beta) */
                alist_process_nead_mmb(this);
                return true;
            case 0x1eac11b8: /* AnimalCrossing */
                alist_process_nead_ac(this);
                return true;
            case 0x00010010: /* MusyX v2 (IndianaJones, BattleForNaboo) */
                musyx_v2_task(this);
                return true;
            default:
                WarnMessage("ABI2 identification regression: v=%08x", v);
            }
        }
    }
    else
    {
        v = *dram_u32(this, ucode_data + 0x10);
        switch (v)
        {
        case 0x00000001: /* MusyX v1
                         RogueSquadron, ResidentEvil2, PolarisSnoCross,
                         TheWorldIsNotEnough, RugratsInParis, NBAShowTime,
                         HydroThunder, Tarzan, GauntletLegend, Rush2049 */
            musyx_v1_task(this);
            return true;
        case 0x0000127c: /* naudio (many games) */
            alist_process_naudio(this);
            return true;
        case 0x00001280: /* BanjoKazooie */
            alist_process_naudio_bk(this);
            return true;
        case 0x1c58126c: /* DonkeyKong */
            alist_process_naudio_dk(this);
            return true;
        case 0x1ae8143c: /* BanjoTooie, JetForceGemini, MickeySpeedWayUSA, PerfectDark */
            alist_process_naudio_mp3(this);
            return true;
        case 0x1ab0140c: /* ConkerBadFurDay */
            alist_process_naudio_cbfd(this);
            return true;
        default:
            WarnMessage("ABI3 identification regression: v=%08x", v);
        }
    }
    return false;
}