Print more informative error messages when using MBC6 or MBC7.

This commit is contained in:
Anthony J. Bentley 2014-01-31 05:53:03 -07:00
parent 4af2ece1e0
commit 675380edd0
3 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,8 @@ enum LoadRes {
LOADRES_UNSUPPORTED_MBC_HUC3 = -0x1FE,
LOADRES_UNSUPPORTED_MBC_TAMA5,
LOADRES_UNSUPPORTED_MBC_POCKET_CAMERA,
LOADRES_UNSUPPORTED_MBC_MBC7 = -0x122,
LOADRES_UNSUPPORTED_MBC_MBC6 = -0x120,
LOADRES_UNSUPPORTED_MBC_MBC4 = -0x117,
LOADRES_UNSUPPORTED_MBC_MMM01 = -0x10D,
LOADRES_OK = 0

View File

@ -9,6 +9,8 @@ static char const * to_cstr(LoadRes const loadres) {
case LOADRES_UNSUPPORTED_MBC_HUC3: return "Unsupported MBC: HuC3";
case LOADRES_UNSUPPORTED_MBC_TAMA5: return "Unsupported MBC: Tama5";
case LOADRES_UNSUPPORTED_MBC_POCKET_CAMERA: return "Unsupported MBC: Pocket Camera";
case LOADRES_UNSUPPORTED_MBC_MBC7: return "Unsupported MBC: MBC7";
case LOADRES_UNSUPPORTED_MBC_MBC6: return "Unsupported MBC: MBC6";
case LOADRES_UNSUPPORTED_MBC_MBC4: return "Unsupported MBC: MBC4";
case LOADRES_UNSUPPORTED_MBC_MMM01: return "Unsupported MBC: MMM01";
case LOADRES_OK: return "OK";

View File

@ -580,6 +580,8 @@ LoadRes Cartridge::loadROM(std::string const &romfile,
case 0x1C:
case 0x1D:
case 0x1E: type = type_mbc5; break;
case 0x20: return LOADRES_UNSUPPORTED_MBC_MBC6;
case 0x22: return LOADRES_UNSUPPORTED_MBC_MBC7;
case 0xFC: return LOADRES_UNSUPPORTED_MBC_POCKET_CAMERA;
case 0xFD: return LOADRES_UNSUPPORTED_MBC_TAMA5;
case 0xFE: return LOADRES_UNSUPPORTED_MBC_HUC3;