Manufacter ID was Media type all along

change all relevant code accordingly
This commit is contained in:
Squall Leonhart 2021-01-11 11:58:44 +11:00
parent 9d90fbc6b8
commit 7d882f75b6
9 changed files with 30 additions and 28 deletions

View File

@ -427,7 +427,7 @@ enum LanguageStringID
INFO_LOCATION_TEXT = 803,
INFO_SIZE_TEXT = 804,
INFO_CART_ID_TEXT = 805,
INFO_MANUFACTURER_TEXT = 806,
INFO_MEDIA_TEXT = 806,
INFO_COUNTRY_TEXT = 807,
INFO_CRC1_TEXT = 808,
INFO_CRC2_TEXT = 809,

View File

@ -165,7 +165,7 @@ void CLanguage::LoadDefaultStrings(void)
DEF_STR(RB_NOTES_PLUGIN, "Notes (default plugins)");
DEF_STR(RB_NOTES_USER, "Notes (user)");
DEF_STR(RB_CART_ID, "Cartridge ID");
DEF_STR(RB_MANUFACTUER, "Manufacturer");
DEF_STR(RB_MANUFACTUER, "Media");
DEF_STR(RB_COUNTRY, "Country");
DEF_STR(RB_DEVELOPER, "Developer");
DEF_STR(RB_CRC1, "CRC1");
@ -392,7 +392,7 @@ void CLanguage::LoadDefaultStrings(void)
DEF_STR(INFO_LOCATION_TEXT, "Location:");
DEF_STR(INFO_SIZE_TEXT, "ROM size:");
DEF_STR(INFO_CART_ID_TEXT, "Cartridge ID:");
DEF_STR(INFO_MANUFACTURER_TEXT, "Manufacturer:");
DEF_STR(INFO_MEDIA_TEXT, "Media:");
DEF_STR(INFO_COUNTRY_TEXT, "Country:");
DEF_STR(INFO_CRC1_TEXT, "CRC1:");
DEF_STR(INFO_CRC2_TEXT, "CRC2:");

View File

@ -304,7 +304,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory)
RomInfo.CartID[0] = *(RomData + 0x3F);
RomInfo.CartID[1] = *(RomData + 0x3E);
RomInfo.CartID[2] = '\0';
RomInfo.Manufacturer = *(RomData + 0x38);
RomInfo.Media = *(RomData + 0x38);
RomInfo.Country = *(RomData + 0x3D);
RomInfo.CRC1 = *(uint32_t *)(RomData + 0x10);
RomInfo.CRC2 = *(uint32_t *)(RomData + 0x14);
@ -535,7 +535,7 @@ bool CRomList::FillRomInfo(ROM_INFO * pRomInfo)
pRomInfo->CartID[0] = *(RomData + 0x3F);
pRomInfo->CartID[1] = *(RomData + 0x3E);
pRomInfo->CartID[2] = '\0';
pRomInfo->Manufacturer = *(RomData + 0x38);
pRomInfo->Media = *(RomData + 0x38);
pRomInfo->Country = *(RomData + 0x3D);
pRomInfo->CRC1 = *(uint32_t *)(RomData + 0x10);
pRomInfo->CRC2 = *(uint32_t *)(RomData + 0x14);
@ -556,7 +556,7 @@ bool CRomList::FillRomInfo(ROM_INFO * pRomInfo)
pRomInfo->CartID[0] = *(RomData + 0x100);
pRomInfo->CartID[1] = *(RomData + 0x101);
pRomInfo->CartID[2] = *(RomData + 0x102);
pRomInfo->Manufacturer = '\0';
pRomInfo->Media = '\0';
pRomInfo->Country = *(RomData + 0x100);
pRomInfo->CRC1 = 0;
for (uint32_t i = 0; i < 0x200; i += 4)

View File

@ -47,7 +47,7 @@ public:
int32_t SelColor;
uint32_t SelTextColor;
int32_t RomSize;
uint8_t Manufacturer;
uint8_t Media;
uint8_t Country;
uint32_t CRC1;
uint32_t CRC2;

View File

@ -111,7 +111,7 @@ private:
RB_FileName = 0, RB_InternalName = 1, RB_GoodName = 2,
RB_Name = 3, RB_Status = 4, RB_RomSize = 5,
RB_CoreNotes = 6, RB_PluginNotes = 7, RB_UserNotes = 8,
RB_CartridgeID = 9, RB_Manufacturer = 10, RB_Country = 11,
RB_CartridgeID = 9, RB_Media = 10, RB_Country = 11,
RB_Developer = 12, RB_Crc1 = 13, RB_Crc2 = 14,
RB_CICChip = 15, RB_ReleaseDate = 16, RB_Genre = 17,
RB_Players = 18, RB_ForceFeedback = 19, RB_FileFormat = 20

View File

@ -57,7 +57,7 @@ void CRomBrowser::GetFieldInfo(ROMBROWSER_FIELDS_LIST & Fields, bool UseDefault
AddField(Fields, "Notes (default plugins)", 3, RB_PluginNotes, 188, RB_NOTES_PLUGIN, UseDefault);
AddField(Fields, "Notes (User)", -1, RB_UserNotes, 100, RB_NOTES_USER, UseDefault);
AddField(Fields, "Cartridge ID", -1, RB_CartridgeID, 100, RB_CART_ID, UseDefault);
AddField(Fields, "Manufacturer", -1, RB_Manufacturer, 100, RB_MANUFACTUER, UseDefault);
AddField(Fields, "Media", -1, RB_Media, 100, RB_MANUFACTUER, UseDefault);
AddField(Fields, "Country", -1, RB_Country, 100, RB_COUNTRY, UseDefault);
AddField(Fields, "Developer", -1, RB_Developer, 100, RB_DEVELOPER, UseDefault);
AddField(Fields, "CRC1", -1, RB_Crc1, 100, RB_CRC1, UseDefault);
@ -669,7 +669,7 @@ int32_t CALLBACK CRomBrowser::RomList_CompareItems(uint32_t lParam1, uint32_t lP
case RB_PluginNotes: result = (int32_t)lstrcmpiA(pRomInfo1->PluginNotes, pRomInfo2->PluginNotes); break;
case RB_UserNotes: result = (int32_t)lstrcmpiA(pRomInfo1->UserNotes, pRomInfo2->UserNotes); break;
case RB_CartridgeID: result = (int32_t)lstrcmpiA(pRomInfo1->CartID, pRomInfo2->CartID); break;
case RB_Manufacturer: result = (int32_t)pRomInfo1->Manufacturer - (int32_t)pRomInfo2->Manufacturer; break;
case RB_Media: result = (int32_t)pRomInfo1->Media - (int32_t)pRomInfo2->Media; break;
case RB_Country: result = (int32_t)pRomInfo1->Country - (int32_t)pRomInfo2->Country; break;
case RB_Developer: result = (int32_t)lstrcmpiA(pRomInfo1->Developer, pRomInfo2->Developer); break;
case RB_Crc1: result = (int32_t)pRomInfo1->CRC1 - (int32_t)pRomInfo2->CRC1; break;
@ -712,13 +712,14 @@ void CRomBrowser::RomList_GetDispInfo(uint32_t pnmh)
case RB_Status: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->Status).ToUTF16().c_str(), lpdi->item.cchTextMax / sizeof(wchar_t)); break;
case RB_RomSize: swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"%.1f MBit", (float)pRomInfo->RomSize / 0x20000); break;
case RB_CartridgeID: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->CartID).ToUTF16().c_str(), lpdi->item.cchTextMax / sizeof(wchar_t)); break;
case RB_Manufacturer:
switch (pRomInfo->Manufacturer)
case RB_Media:
switch (pRomInfo->Media)
{
case 'C':wcsncpy(lpdi->item.pszText, L"Nintendo", lpdi->item.cchTextMax / sizeof(wchar_t)); break;
case 'N':wcsncpy(lpdi->item.pszText, L"Nintendo", lpdi->item.cchTextMax / sizeof(wchar_t)); break;
case 'C':wcsncpy(lpdi->item.pszText, L"N64 Cartridge (Disk Compatible)", lpdi->item.cchTextMax / sizeof(wchar_t)); break;
case 'N':wcsncpy(lpdi->item.pszText, L"N64 Cartridge", lpdi->item.cchTextMax / sizeof(wchar_t)); break;
case 'Z':wcsncpy(lpdi->item.pszText, L"Aleck64", lpdi->item.cchTextMax / sizeof(wchar_t)); break;
case 0: wcsncpy(lpdi->item.pszText, L"None", lpdi->item.cchTextMax / sizeof(wchar_t)); break;
default: swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"(Unknown %c (%X))", pRomInfo->Manufacturer, pRomInfo->Manufacturer); break;
default: swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"(Unknown %c (%X))", pRomInfo->Media, pRomInfo->Media); break;
}
break;
case RB_Country:

View File

@ -96,7 +96,7 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam)
SetDlgItemText(hDlg, IDC_ROM_MD5, wGS(INFO_MD5_TEXT).c_str());
SetDlgItemText(hDlg, IDC_ROM_SIZE, wGS(INFO_SIZE_TEXT).c_str());
SetDlgItemText(hDlg, IDC_CART_ID, wGS(INFO_CART_ID_TEXT).c_str());
SetDlgItemText(hDlg, IDC_MANUFACTURER, wGS(INFO_MANUFACTURER_TEXT).c_str());
SetDlgItemText(hDlg, IDC_MEDIA, wGS(INFO_MEDIA_TEXT).c_str());
SetDlgItemText(hDlg, IDC_COUNTRY, wGS(INFO_COUNTRY_TEXT).c_str());
SetDlgItemText(hDlg, IDC_CRC1, wGS(INFO_CRC1_TEXT).c_str());
SetDlgItemText(hDlg, IDC_CRC2, wGS(INFO_CRC2_TEXT).c_str());
@ -116,10 +116,11 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam)
switch (RomHeader[0x38])
{
case 'C': SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"Nintendo"); break;
case 'N': SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"Nintendo"); break;
case 0: SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"None"); break;
default: SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"(Unknown)"); break;
case 'C': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"N64 Cartridge (Disk Compatible)"); break;
case 'N': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"N64 Cartridge"); break;
case 'Z': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"Aleck64"); break;
case 0: SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"None"); break;
default: SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"(Unknown)"); break;
}
switch (RomHeader[0x3D])
@ -177,7 +178,7 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam)
//SetDlgItemText(hDlg, IDC_ROM_MD5, wGS(INFO_MD5_TEXT).c_str());
//SetDlgItemText(hDlg, IDC_ROM_SIZE, wGS(INFO_SIZE_TEXT).c_str());
SetDlgItemText(hDlg, IDC_CART_ID, wGS(INFO_CART_ID_TEXT).c_str());
//SetDlgItemText(hDlg, IDC_MANUFACTURER, wGS(INFO_MANUFACTURER_TEXT).c_str());
//SetDlgItemText(hDlg, IDC_MEDIA, wGS(INFO_MEDIA_TEXT).c_str());
SetDlgItemText(hDlg, IDC_COUNTRY, wGS(INFO_COUNTRY_TEXT).c_str());
//SetDlgItemText(hDlg, IDC_CRC1, wGS(INFO_CRC1_TEXT).c_str());
//SetDlgItemText(hDlg, IDC_CRC2, wGS(INFO_CRC2_TEXT).c_str());
@ -197,9 +198,9 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam)
/*switch (DiskHeader[0x00])
{
case 'N': SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"Nintendo"); break;
case 0: SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"None"); break;
default: SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"(Unknown)"); break;
case 'N': SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"Nintendo"); break;
case 0: SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"None"); break;
default: SetDlgItemText(hDlg, IDC_INFO_MEDIA, L"(Unknown)"); break;
}*/
switch (DiskHeader[0x00])

View File

@ -184,8 +184,8 @@ BEGIN
EDITTEXT IDC_INFO_ROMSIZE,77,74,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
LTEXT "Cartridge ID:",IDC_CART_ID,11,90,64,10
EDITTEXT IDC_INFO_CARTID,77,89,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
LTEXT "Manufacturer:",IDC_MANUFACTURER,11,106,64,10
EDITTEXT IDC_INFO_MANUFACTURER,77,104,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
LTEXT "Media:",IDC_MEDIA,11,106,64,10
EDITTEXT IDC_INFO_MEDIA,77,104,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
LTEXT "Country:",IDC_COUNTRY,11,122,64,10
EDITTEXT IDC_INFO_COUNTRY,77,119,153,13,ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
LTEXT "CRC1:",IDC_CRC1,11,135,64,10

View File

@ -109,7 +109,7 @@
#define IDC_CHK_VADDR 1011
#define IDC_CHK_HEX 1011
#define IDC_DISPLAY_FRAMERATE 1012
#define IDC_INFO_MANUFACTURER 1012
#define IDC_INFO_MEDIA 1012
#define IDC_ALT 1012
#define IDC_LIST 1012
#define IDC_HLE_AUDIO 1012
@ -375,7 +375,7 @@
#define IDC_ROM_SIZE 1194
#define IDC_REG_TABS 1194
#define IDC_CART_ID 1195
#define IDC_MANUFACTURER 1196
#define IDC_MEDIA 1196
#define IDC_COUNTRY 1197
#define IDC_CRC1 1198
#define IDC_CRC2 1199