Properly handle 'Cart.StartBank' set to 'AUTO' in the ROM properties.

This commit is contained in:
Stephen Anthony 2019-12-13 20:21:20 -03:30
parent 666b13593c
commit 112ed29e94
2 changed files with 3 additions and 2 deletions

View File

@ -119,7 +119,8 @@ Console::Console(OSystem& osystem, unique_ptr<Cartridge>& cart,
// Let the cart know how to query for the 'Cartridge.StartBank' property
myCart->setStartBankFromPropsFunc([this]() {
const string& startbank = myProperties.get(PropType::Cart_StartBank);
return startbank == EmptyString ? -1 : atoi(startbank.c_str());
return (startbank == EmptyString || BSPF::equalsIgnoreCase(startbank, "AUTO"))
? -1 : atoi(startbank.c_str());
});
// We can only initialize after all the devices/components have been created

View File

@ -314,7 +314,7 @@ string Properties::ourDefaultProperties[static_cast<uInt8>(PropType::NumTypes)]
"", // Cart.Note
"", // Cart.Rarity
"MONO", // Cart.Sound
"", // Cart.StartBank
"AUTO", // Cart.StartBank
"AUTO", // Cart.Type
"B", // Console.LeftDiff
"B", // Console.RightDiff