[64DD] Added TOOL/USA IPL support

This commit is contained in:
luigiblood 2016-08-28 18:36:56 +02:00
parent 653197b12c
commit aef22c147b
6 changed files with 14 additions and 3 deletions

View File

@ -37,6 +37,7 @@ void CDMA::OnFirstDMA()
case CIC_NUS_6101: offset = +0x0318; break;
case CIC_NUS_5167: offset = +0x0318; break;
case CIC_NUS_8303: offset = +0x0318; break;
case CIC_NUS_DDUS: offset = +0x0318; break;
case CIC_UNKNOWN:
case CIC_NUS_6102: offset = +0x0318; break;
case CIC_NUS_6103: offset = +0x0318; break;

View File

@ -271,7 +271,7 @@ bool CN64System::RunFileImage(const char * FileLoc)
WriteTrace(TraceN64System, TraceDebug, "Loading \"%s\"", FileLoc);
if (g_Rom->LoadN64Image(FileLoc))
{
if (g_Rom->CicChipID() == CIC_NUS_8303)
if (g_Rom->CicChipID() == CIC_NUS_8303 || g_Rom->CicChipID() == CIC_NUS_DDUS)
{
//64DD IPL
if (g_DDRom == NULL)
@ -356,7 +356,7 @@ bool CN64System::RunFileImageIPL(const char * FileLoc)
WriteTrace(TraceN64System, TraceDebug, "Loading \"%s\"", FileLoc);
if (g_DDRom->LoadN64ImageIPL(FileLoc))
{
if (g_DDRom->CicChipID() != CIC_NUS_8303)
if (g_DDRom->CicChipID() != CIC_NUS_8303 && g_DDRom->CicChipID() != CIC_NUS_DDUS)
{
//If not 64DD IPL then it's wrong
WriteTrace(TraceN64System, TraceError, "LoadN64ImageIPL failed (\"%s\")", FileLoc);
@ -885,6 +885,9 @@ void CN64System::InitRegisters(bool bPostPif, CMipsMemoryVM & MMU)
case CIC_NUS_5167: //64DD CONVERSION CIC
m_Reg.m_GPR[22].DW = 0x00000000000000DD;
break;
case CIC_NUS_DDUS: //64DD US IPL CIC
m_Reg.m_GPR[22].DW = 0x00000000000000DE;
break;
case CIC_UNKNOWN:
case CIC_NUS_6102:
m_Reg.m_GPR[1].DW = 0x0000000000000001;

View File

@ -288,6 +288,8 @@ CICChip CN64Rom::GetCicChipID(uint8_t * RomData, uint64_t * CRC)
case 0x000000D6D5BE5580: return CIC_NUS_6106;
case 0x000001053BC19870: return CIC_NUS_5167; //64DD CONVERSION CIC
case 0x000000D2E53EF008: return CIC_NUS_8303; //64DD IPL
case 0x000000D2E53EF39F: return CIC_NUS_8303; //64DD IPL TOOL
case 0x000000D2E53E5DDA: return CIC_NUS_DDUS; //64DD IPL US (different CIC)
default:
return CIC_UNKNOWN;
}

View File

@ -65,7 +65,7 @@ enum CICChip
{
CIC_UNKNOWN = -1, CIC_NUS_6101 = 1, CIC_NUS_6102 = 2, CIC_NUS_6103 = 3,
CIC_NUS_6104 = 4, CIC_NUS_6105 = 5, CIC_NUS_6106 = 6, CIC_NUS_5167 = 7,
CIC_NUS_8303 = 8
CIC_NUS_8303 = 8, CIC_NUS_DDUS = 9
};
enum Country

View File

@ -735,6 +735,10 @@ void CRomBrowser::RomList_GetDispInfo(uint32_t pnmh)
{
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-5167", pRomInfo->CicChip);
}
else if (pRomInfo->CicChip == CIC_NUS_DDUS)
{
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-????", pRomInfo->CicChip);
}
else
{
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-610%d", pRomInfo->CicChip);

View File

@ -117,6 +117,7 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam)
case CIC_UNKNOWN: CicChip = L"Unknown"; break;
case CIC_NUS_8303: CicChip = L"CIC-NUS-8303"; break;
case CIC_NUS_5167: CicChip = L"CIC-NUS-5167"; break;
case CIC_NUS_DDUS: CicChip = L"CIC-NUS-????"; break;
default: CicChip = stdstr_f("CIC-NUS-610%d", _this->m_pRomInfo->CicChipID()).ToUTF16(); break;
}
SetDlgItemTextW(hDlg, IDC_INFO_CIC, CicChip.c_str());