From 21f25d1553276e2f0bd4de45efeeab7c1619a3ff Mon Sep 17 00:00:00 2001 From: stephena Date: Thu, 7 Jun 2012 14:09:11 +0000 Subject: [PATCH] Added 64in1 and 128in1 multicart bankswitch schemes, although for the latter you'll probably require the patience of Job. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2529 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- Changes.txt | 4 ++ src/emucore/Cart.cxx | 20 ++++++++++ src/gui/GameInfoDialog.cxx | 72 +++++++++++++++++----------------- src/gui/GlobalPropsDialog.cxx | 73 ++++++++++++++++++----------------- 4 files changed, 98 insertions(+), 71 deletions(-) diff --git a/Changes.txt b/Changes.txt index 01d76e3fe..de9bc89a4 100644 --- a/Changes.txt +++ b/Changes.txt @@ -27,6 +27,10 @@ this, added Shift-Control-f key to step backwards through the available modes. + * Added '64in1' and '128in1' multicart bankswitching schemes, which work + the same as the 2in1/4in1/etc ones (Control-r switches to each + consecutive game in the ROM). + * Fixed several bugs in DPC+ bankswitching scheme, including ability to load and save state files. As well, ROMs now work correctly after console format autodetection. diff --git a/src/emucore/Cart.cxx b/src/emucore/Cart.cxx index a43861e37..327f7b7c8 100644 --- a/src/emucore/Cart.cxx +++ b/src/emucore/Cart.cxx @@ -137,6 +137,26 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5, buf << id; } } + else if(type == "64IN1") + { + // Make sure we have a valid sized image + if(size == 64*2048 || size == 64*4096) + { + dtype = type; + type = createFromMultiCart(image, size, 64, md5, id, settings); + buf << id; + } + } + else if(type == "128IN1") + { + // Make sure we have a valid sized image + if(size == 128*2048 || size == 128*4096) + { + dtype = type; + type = createFromMultiCart(image, size, 128, md5, id, settings); + buf << id; + } + } // We should know the cart's type by now so let's create it if(type == "0840") diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index 355792c50..1be7e87a2 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -136,41 +136,43 @@ GameInfoDialog::GameInfoDialog( "Type:", kTextAlignLeft); pwidth = font.getStringWidth("CM (SpectraVideo CompuMate)"); items.clear(); - items.push_back("Auto-detect", "AUTO-DETECT"); - items.push_back("0840 (8K ECONObank)", "0840" ); - items.push_back("2IN1 Multicart (4-32K)", "2IN1" ); - items.push_back("4IN1 Multicart (8-32K)", "4IN1" ); - items.push_back("8IN1 Multicart (16-64K)", "8IN1" ); - items.push_back("16IN1 Multicart (32-128K)", "16IN1"); - items.push_back("32IN1 Multicart (64-128K)", "32IN1"); - items.push_back("2K (64-2048 bytes Atari)", "2K" ); - items.push_back("3E (32K Tigervision)", "3E" ); - items.push_back("3F (512K Tigervision)", "3F" ); - items.push_back("4A50 (64K 4A50 + ram)", "4A50" ); - items.push_back("4K (4K Atari)", "4K" ); - items.push_back("AR (Supercharger)", "AR" ); - items.push_back("CV (Commavid extra ram)", "CV" ); - items.push_back("CM (SpectraVideo CompuMate)","CM" ); - items.push_back("DPC (Pitfall II)", "DPC" ); - items.push_back("DPC+ (Enhanced DPC)", "DPC+" ); - items.push_back("E0 (8K Parker Bros)", "E0" ); - items.push_back("E7 (16K M-network)", "E7" ); - items.push_back("EF (64K H. Runner)", "EF" ); - items.push_back("EFSC (64K H. Runner + ram)", "EFSC" ); - items.push_back("F0 (Dynacom Megaboy)", "F0" ); - items.push_back("F4 (32K Atari)", "F4" ); - items.push_back("F4SC (32K Atari + ram)", "F4SC" ); - items.push_back("F6 (16K Atari)", "F6" ); - items.push_back("F6SC (16K Atari + ram)", "F6SC" ); - items.push_back("F8 (8K Atari)", "F8" ); - items.push_back("F8SC (8K Atari + ram)", "F8SC" ); - items.push_back("FA (CBS RAM Plus)", "FA" ); - items.push_back("FA2 (CBS RAM Plus 24K)", "FA2" ); - items.push_back("FE (8K Decathlon)", "FE" ); - items.push_back("MC (C. Wilkson Megacart)", "MC" ); - items.push_back("SB (128-256K SUPERbank)", "SB" ); - items.push_back("UA (8K UA Ltd.)", "UA" ); - items.push_back("X07 (64K AtariAge)", "X07" ); + items.push_back("Auto-detect", "AUTO-DETECT"); + items.push_back("0840 (8K ECONObank)", "0840" ); + items.push_back("2IN1 Multicart (4-32K)", "2IN1" ); + items.push_back("4IN1 Multicart (8-32K)", "4IN1" ); + items.push_back("8IN1 Multicart (16-64K)", "8IN1" ); + items.push_back("16IN1 Multicart (32-128K)", "16IN1"); + items.push_back("32IN1 Multicart (64/128K)", "32IN1"); + items.push_back("64IN1 Multicart (128/256K)", "64IN1"); + items.push_back("128IN1 Multicart (256/512K)","128IN1"); + items.push_back("2K (64-2048 bytes Atari)", "2K" ); + items.push_back("3E (32K Tigervision)", "3E" ); + items.push_back("3F (512K Tigervision)", "3F" ); + items.push_back("4A50 (64K 4A50 + ram)", "4A50" ); + items.push_back("4K (4K Atari)", "4K" ); + items.push_back("AR (Supercharger)", "AR" ); + items.push_back("CV (Commavid extra ram)", "CV" ); + items.push_back("CM (SpectraVideo CompuMate)", "CM" ); + items.push_back("DPC (Pitfall II)", "DPC" ); + items.push_back("DPC+ (Enhanced DPC)", "DPC+" ); + items.push_back("E0 (8K Parker Bros)", "E0" ); + items.push_back("E7 (16K M-network)", "E7" ); + items.push_back("EF (64K H. Runner)", "EF" ); + items.push_back("EFSC (64K H. Runner + ram)", "EFSC" ); + items.push_back("F0 (Dynacom Megaboy)", "F0" ); + items.push_back("F4 (32K Atari)", "F4" ); + items.push_back("F4SC (32K Atari + ram)", "F4SC" ); + items.push_back("F6 (16K Atari)", "F6" ); + items.push_back("F6SC (16K Atari + ram)", "F6SC" ); + items.push_back("F8 (8K Atari)", "F8" ); + items.push_back("F8SC (8K Atari + ram)", "F8SC" ); + items.push_back("FA (CBS RAM Plus)", "FA" ); + items.push_back("FA2 (CBS RAM Plus 24/28K)", "FA2" ); + items.push_back("FE (8K Decathlon)", "FE" ); + items.push_back("MC (C. Wilkson Megacart)", "MC" ); + items.push_back("SB (128-256K SUPERbank)", "SB" ); + items.push_back("UA (8K UA Ltd.)", "UA" ); + items.push_back("X07 (64K AtariAge)", "X07" ); myType = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myType); diff --git a/src/gui/GlobalPropsDialog.cxx b/src/gui/GlobalPropsDialog.cxx index 526b37804..257a0dc4e 100644 --- a/src/gui/GlobalPropsDialog.cxx +++ b/src/gui/GlobalPropsDialog.cxx @@ -64,42 +64,43 @@ GlobalPropsDialog:: new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, "Bankswitch type:", kTextAlignLeft); items.clear(); - items.push_back("Default", "DEFAULT"); - items.push_back("Auto-detect", "AUTO-DETECT"); - items.push_back("0840 (8K ECONObank)", "0840" ); - items.push_back("2IN1 Multicart (4-32K)", "2IN1" ); - items.push_back("4IN1 Multicart (8-32K)", "4IN1" ); - items.push_back("8IN1 Multicart (16-64K)", "8IN1" ); - items.push_back("16IN1 Multicart (32-128K)", "16IN1"); - items.push_back("32IN1 Multicart (64-128K)", "32IN1"); - items.push_back("2K (64-2048 bytes Atari)", "2K" ); - items.push_back("3E (32K Tigervision)", "3E" ); - items.push_back("3F (512K Tigervision)", "3F" ); - items.push_back("4A50 (64K 4A50 + ram)", "4A50" ); - items.push_back("4K (4K Atari)", "4K" ); - items.push_back("AR (Supercharger)", "AR" ); - items.push_back("CV (Commavid extra ram)", "CV" ); - items.push_back("CM (SpectraVideo CompuMate)","CM" ); - items.push_back("DPC (Pitfall II)", "DPC" ); - items.push_back("DPC+ (Enhanced DPC)", "DPC+" ); - items.push_back("E0 (8K Parker Bros)", "E0" ); - items.push_back("E7 (16K M-network)", "E7" ); - items.push_back("EF (64K H. Runner)", "EF" ); - items.push_back("EFSC (64K H. Runner + ram)", "EFSC" ); - items.push_back("F0 (Dynacom Megaboy)", "F0" ); - items.push_back("F4 (32K Atari)", "F4" ); - items.push_back("F4SC (32K Atari + ram)", "F4SC" ); - items.push_back("F6 (16K Atari)", "F6" ); - items.push_back("F6SC (16K Atari + ram)", "F6SC" ); - items.push_back("F8 (8K Atari)", "F8" ); - items.push_back("F8SC (8K Atari + ram)", "F8SC" ); - items.push_back("FA (CBS RAM Plus)", "FA" ); - items.push_back("FA2 (CBS RAM Plus 24K)", "FA2" ); - items.push_back("FE (8K Decathlon)", "FE" ); - items.push_back("MC (C. Wilkson Megacart)", "MC" ); - items.push_back("SB (128-256K SUPERbank)", "SB" ); - items.push_back("UA (8K UA Ltd.)", "UA" ); - items.push_back("X07 (64K AtariAge)", "X07" ); + items.push_back("Auto-detect", "AUTO-DETECT"); + items.push_back("0840 (8K ECONObank)", "0840" ); + items.push_back("2IN1 Multicart (4-32K)", "2IN1" ); + items.push_back("4IN1 Multicart (8-32K)", "4IN1" ); + items.push_back("8IN1 Multicart (16-64K)", "8IN1" ); + items.push_back("16IN1 Multicart (32-128K)", "16IN1"); + items.push_back("32IN1 Multicart (64/128K)", "32IN1"); + items.push_back("64IN1 Multicart (128/256K)", "64IN1"); + items.push_back("128IN1 Multicart (256/512K)","128IN1"); + items.push_back("2K (64-2048 bytes Atari)", "2K" ); + items.push_back("3E (32K Tigervision)", "3E" ); + items.push_back("3F (512K Tigervision)", "3F" ); + items.push_back("4A50 (64K 4A50 + ram)", "4A50" ); + items.push_back("4K (4K Atari)", "4K" ); + items.push_back("AR (Supercharger)", "AR" ); + items.push_back("CV (Commavid extra ram)", "CV" ); + items.push_back("CM (SpectraVideo CompuMate)", "CM" ); + items.push_back("DPC (Pitfall II)", "DPC" ); + items.push_back("DPC+ (Enhanced DPC)", "DPC+" ); + items.push_back("E0 (8K Parker Bros)", "E0" ); + items.push_back("E7 (16K M-network)", "E7" ); + items.push_back("EF (64K H. Runner)", "EF" ); + items.push_back("EFSC (64K H. Runner + ram)", "EFSC" ); + items.push_back("F0 (Dynacom Megaboy)", "F0" ); + items.push_back("F4 (32K Atari)", "F4" ); + items.push_back("F4SC (32K Atari + ram)", "F4SC" ); + items.push_back("F6 (16K Atari)", "F6" ); + items.push_back("F6SC (16K Atari + ram)", "F6SC" ); + items.push_back("F8 (8K Atari)", "F8" ); + items.push_back("F8SC (8K Atari + ram)", "F8SC" ); + items.push_back("FA (CBS RAM Plus)", "FA" ); + items.push_back("FA2 (CBS RAM Plus 24/28K)", "FA2" ); + items.push_back("FE (8K Decathlon)", "FE" ); + items.push_back("MC (C. Wilkson Megacart)", "MC" ); + items.push_back("SB (128-256K SUPERbank)", "SB" ); + items.push_back("UA (8K UA Ltd.)", "UA" ); + items.push_back("X07 (64K AtariAge)", "X07" ); myBSType = new PopUpWidget(this, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); wid.push_back(myBSType);