For all CiC related stuff, we should really be using our typedef rather than numbers.

This commit is contained in:
Emmet Young 2015-02-14 13:26:26 +11:00
parent c973db8e35
commit e2f73e9e3d
2 changed files with 12 additions and 12 deletions

View File

@ -18,11 +18,11 @@ CDMA::CDMA(CFlashram & FlashRam, CSram & Sram) :
void CDMA::OnFirstDMA (void) {
switch (g_Rom->CicChipID()) {
case 1: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case 2: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case 3: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case 5: *(DWORD *)&((g_MMU->Rdram())[0x3F0]) = g_MMU->RdramSize(); break;
case 6: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case CIC_NUS_6101: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case CIC_NUS_6102: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case CIC_NUS_6103: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
case CIC_NUS_6105: *(DWORD *)&((g_MMU->Rdram())[0x3F0]) = g_MMU->RdramSize(); break;
case CIC_NUS_6106: *(DWORD *)&((g_MMU->Rdram())[0x318]) = g_MMU->RdramSize(); break;
default: g_Notify->DisplayError("Unhandled CicChip(%d) in first DMA",g_Rom->CicChipID());
}
}

View File

@ -728,14 +728,14 @@ int CRomBrowser::GetCicChipID (BYTE * RomData) {
CRC += *(DWORD *)(RomData+count);
}
switch (CRC) {
case 0x000000D0027FDF31: return 1;
case 0x000000CFFB631223: return 1;
case 0x000000D057C85244: return 2;
case 0x000000D6497E414B: return 3;
case 0x0000011A49F60E96: return 5;
case 0x000000D6D5BE5580: return 6;
case 0x000000D0027FDF31: return CIC_NUS_6101;
case 0x000000CFFB631223: return CIC_NUS_6101;
case 0x000000D057C85244: return CIC_NUS_6102;
case 0x000000D6497E414B: return CIC_NUS_6103;
case 0x0000011A49F60E96: return CIC_NUS_6105;
case 0x000000D6D5BE5580: return CIC_NUS_6106;
default:
return -1;
return CIC_UNKNOWN;
}
}