mirror of https://github.com/stella-emu/stella.git
Provide better error message on console for Xin1 bankswitch schemes,
and make 'Default' button do the right thing when configuring global ROM properties. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2530 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
21f25d1553
commit
15ea3e6439
|
@ -95,7 +95,8 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
type = createFromMultiCart(image, size, 2, md5, id, settings);
|
type = createFromMultiCart(image, size, 2, md5, id, settings);
|
||||||
buf << id;
|
buf << id;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
dtype = "WRONG_SIZE";
|
||||||
}
|
}
|
||||||
else if(type == "4IN1")
|
else if(type == "4IN1")
|
||||||
{
|
{
|
||||||
|
@ -106,6 +107,8 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
type = createFromMultiCart(image, size, 4, md5, id, settings);
|
type = createFromMultiCart(image, size, 4, md5, id, settings);
|
||||||
buf << id;
|
buf << id;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
dtype = "WRONG_SIZE";
|
||||||
}
|
}
|
||||||
else if(type == "8IN1")
|
else if(type == "8IN1")
|
||||||
{
|
{
|
||||||
|
@ -116,6 +119,8 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
type = createFromMultiCart(image, size, 8, md5, id, settings);
|
type = createFromMultiCart(image, size, 8, md5, id, settings);
|
||||||
buf << id;
|
buf << id;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
dtype = "WRONG_SIZE";
|
||||||
}
|
}
|
||||||
else if(type == "16IN1")
|
else if(type == "16IN1")
|
||||||
{
|
{
|
||||||
|
@ -126,6 +131,8 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
type = createFromMultiCart(image, size, 16, md5, id, settings);
|
type = createFromMultiCart(image, size, 16, md5, id, settings);
|
||||||
buf << id;
|
buf << id;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
dtype = "WRONG_SIZE";
|
||||||
}
|
}
|
||||||
else if(type == "32IN1")
|
else if(type == "32IN1")
|
||||||
{
|
{
|
||||||
|
@ -136,6 +143,8 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
type = createFromMultiCart(image, size, 32, md5, id, settings);
|
type = createFromMultiCart(image, size, 32, md5, id, settings);
|
||||||
buf << id;
|
buf << id;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
dtype = "WRONG_SIZE";
|
||||||
}
|
}
|
||||||
else if(type == "64IN1")
|
else if(type == "64IN1")
|
||||||
{
|
{
|
||||||
|
@ -146,6 +155,8 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
type = createFromMultiCart(image, size, 64, md5, id, settings);
|
type = createFromMultiCart(image, size, 64, md5, id, settings);
|
||||||
buf << id;
|
buf << id;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
dtype = "WRONG_SIZE";
|
||||||
}
|
}
|
||||||
else if(type == "128IN1")
|
else if(type == "128IN1")
|
||||||
{
|
{
|
||||||
|
@ -156,6 +167,8 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
type = createFromMultiCart(image, size, 128, md5, id, settings);
|
type = createFromMultiCart(image, size, 128, md5, id, settings);
|
||||||
buf << id;
|
buf << id;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
dtype = "WRONG_SIZE";
|
||||||
}
|
}
|
||||||
|
|
||||||
// We should know the cart's type by now so let's create it
|
// We should know the cart's type by now so let's create it
|
||||||
|
@ -219,6 +232,8 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
cartridge = new CartridgeSB(image, size, settings);
|
cartridge = new CartridgeSB(image, size, settings);
|
||||||
else if(type == "X07")
|
else if(type == "X07")
|
||||||
cartridge = new CartridgeX07(image, size, settings);
|
cartridge = new CartridgeX07(image, size, settings);
|
||||||
|
else if(dtype == "WRONG_SIZE")
|
||||||
|
cerr << "ERROR: Invalid cartridge size for type " << type << " ..." << endl;
|
||||||
else
|
else
|
||||||
cerr << "ERROR: Invalid cartridge type " << type << " ..." << endl;
|
cerr << "ERROR: Invalid cartridge type " << type << " ..." << endl;
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ void GlobalPropsDialog::loadConfig()
|
||||||
{
|
{
|
||||||
Settings& settings = instance().settings();
|
Settings& settings = instance().settings();
|
||||||
|
|
||||||
myBSType->setSelected(settings.getString("bs"), "DEFAULT");
|
myBSType->setSelected(settings.getString("bs"), "AUTO-DETECT");
|
||||||
myLeftDiff->setSelected(settings.getString("ld"), "DEFAULT");
|
myLeftDiff->setSelected(settings.getString("ld"), "DEFAULT");
|
||||||
myRightDiff->setSelected(settings.getString("rd"), "DEFAULT");
|
myRightDiff->setSelected(settings.getString("rd"), "DEFAULT");
|
||||||
myTVType->setSelected(settings.getString("tv"), "DEFAULT");
|
myTVType->setSelected(settings.getString("tv"), "DEFAULT");
|
||||||
|
@ -201,7 +201,7 @@ void GlobalPropsDialog::saveConfig()
|
||||||
string s;
|
string s;
|
||||||
|
|
||||||
s = myBSType->getSelectedTag();
|
s = myBSType->getSelectedTag();
|
||||||
if(s == "DEFAULT") s = "";
|
if(s == "AUTO-DETECT") s = "";
|
||||||
settings.setString("bs", s);
|
settings.setString("bs", s);
|
||||||
|
|
||||||
s = myLeftDiff->getSelectedTag();
|
s = myLeftDiff->getSelectedTag();
|
||||||
|
@ -224,7 +224,7 @@ void GlobalPropsDialog::saveConfig()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void GlobalPropsDialog::setDefaults()
|
void GlobalPropsDialog::setDefaults()
|
||||||
{
|
{
|
||||||
myBSType->setSelected("DEFAULT", "");
|
myBSType->setSelected("AUTO-DETECT", "");
|
||||||
myLeftDiff->setSelected("DEFAULT", "");
|
myLeftDiff->setSelected("DEFAULT", "");
|
||||||
myRightDiff->setSelected("DEFAULT", "");
|
myRightDiff->setSelected("DEFAULT", "");
|
||||||
myTVType->setSelected("DEFAULT", "");
|
myTVType->setSelected("DEFAULT", "");
|
||||||
|
|
|
@ -642,7 +642,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
instance().settings().setString("lastrom", myList->getSelectedString());
|
instance().settings().setString("lastrom", myList->getSelectedString());
|
||||||
else
|
else
|
||||||
instance().frameBuffer().showMessage(
|
instance().frameBuffer().showMessage(
|
||||||
"Error creating console (check ROM file)",
|
"Error creating console (check ROM file/bankswitch scheme)",
|
||||||
kMiddleCenter, true);
|
kMiddleCenter, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue