mirror of https://github.com/stella-emu/stella.git
Added support for 4IN1, 8IN1 and 32IN1 bankswitch formats. These all act
as if they were 32in1 carts, in that you have to do a on-off power cycle to switch between each ROM. Updated ROM properties for the aforementioned BS types, and fixed some others (SWOOPS, etc). Added PERL tool to scan a snapshot directory and report any extra and/or missing snapshots. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1774 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
346fbb1cc0
commit
9b7963d3f3
|
@ -53,15 +53,11 @@
|
|||
#include "Settings.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
|
||||
const Properties& properties, Settings& settings)
|
||||
Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||
string& id, string type, Settings& settings)
|
||||
{
|
||||
Cartridge* cartridge = 0;
|
||||
|
||||
// Get the type of the cartridge we're creating
|
||||
const string& md5 = properties.get(Cartridge_MD5);
|
||||
string type = properties.get(Cartridge_Type);
|
||||
|
||||
// First consider the ROMs that are special and don't have a properties entry
|
||||
// Hopefully this list will be very small
|
||||
if(md5 == "bc24440b59092559a1ec26055fd1270e" ||
|
||||
|
@ -72,19 +68,6 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
|
|||
// from the opposite bank compared to normal ones
|
||||
type = "F8 swapped";
|
||||
}
|
||||
else if(md5 == "291bcdb05f2b37cdf9452d2bf08e0321" ||
|
||||
md5 == "291dd47588b9158beebe4accc3a093a6")
|
||||
{
|
||||
// The 32-in-1 ROM consists of 32 games of 2K each, where the current
|
||||
// game is automatically incremented on each power cycle
|
||||
// We emulate this by incrementing the current game id on each run,
|
||||
// and creating a 2K Cart of the appropriate part of the image
|
||||
if(size == 32*2048)
|
||||
{
|
||||
type = "32in1";
|
||||
size = 2048;
|
||||
}
|
||||
}
|
||||
|
||||
// Collect some info about the ROM
|
||||
ostringstream buf;
|
||||
|
@ -102,26 +85,39 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
|
|||
type = detected;
|
||||
}
|
||||
buf << type << autodetect;
|
||||
if(type == "32in1")
|
||||
buf << " [G" << settings.getInt("romloadcount") << "]";
|
||||
if(size < 1024)
|
||||
buf << " (" << size << "B) ";
|
||||
else
|
||||
buf << " (" << (size/1024) << "K) ";
|
||||
myAboutString = buf.str();
|
||||
|
||||
// Check for multicart first; if found, get the correct part of the image
|
||||
if(type == "4IN1")
|
||||
{
|
||||
// Make sure we have a valid sized image
|
||||
if(size == 4*2048 || size == 4*4096 || size == 4*8192)
|
||||
{
|
||||
type = createFromMultiCart(image, size, 4, md5, id, settings);
|
||||
buf << id;
|
||||
}
|
||||
}
|
||||
else if(type == "8IN1")
|
||||
{
|
||||
// Make sure we have a valid sized image
|
||||
if(size == 8*2048 || size == 8*4096 || size == 8*8192)
|
||||
{
|
||||
type = createFromMultiCart(image, size, 8, md5, id, settings);
|
||||
buf << id;
|
||||
}
|
||||
}
|
||||
else if(type == "32IN1")
|
||||
{
|
||||
// Make sure we have a valid sized image
|
||||
if(size == 32*2048 || size == 32*4096)
|
||||
{
|
||||
type = createFromMultiCart(image, size, 32, md5, id, settings);
|
||||
buf << id;
|
||||
}
|
||||
}
|
||||
|
||||
// We should know the cart's type by now so let's create it
|
||||
if(type == "2K")
|
||||
cartridge = new Cartridge2K(image, size);
|
||||
else if(type == "32in1")
|
||||
{
|
||||
// Get a 2K piece of the 64K image and create a normal 2K image
|
||||
uInt32 i = settings.getInt("romloadcount");
|
||||
const uInt8* piece = image + i*2048;
|
||||
// Move to the next game the next time this ROM is loaded
|
||||
settings.setInt("romloadcount", (i+1)%32);
|
||||
cartridge = new Cartridge2K(piece, size);
|
||||
}
|
||||
else if(type == "3E")
|
||||
cartridge = new Cartridge3E(image, size);
|
||||
else if(type == "3F")
|
||||
|
@ -177,9 +173,39 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
|
|||
else
|
||||
cerr << "ERROR: Invalid cartridge type " << type << " ..." << endl;
|
||||
|
||||
if(size < 1024)
|
||||
buf << " (" << size << "B) ";
|
||||
else
|
||||
buf << " (" << (size/1024) << "K) ";
|
||||
myAboutString = buf.str();
|
||||
|
||||
return cartridge;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string Cartridge::createFromMultiCart(const uInt8*& image, uInt32& size,
|
||||
uInt32 numroms, string& md5, string& id, Settings& settings)
|
||||
{
|
||||
// Get a piece of the larger image
|
||||
uInt32 i = settings.getInt("romloadcount");
|
||||
size /= numroms;
|
||||
image += i*size;
|
||||
|
||||
// We need a new md5 and name
|
||||
md5 = MD5(image, size);
|
||||
ostringstream buf;
|
||||
buf << " [G" << (i+1) << "]";
|
||||
id = buf.str();
|
||||
|
||||
// Move to the next game the next time this ROM is loaded
|
||||
settings.setInt("romloadcount", (i+1)%numroms);
|
||||
|
||||
if(size <= 2048) return "2K";
|
||||
else if(size == 4096) return "4K";
|
||||
else if(size == 8192) return "F8";
|
||||
else /* default */ return "4K";
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Cartridge::Cartridge()
|
||||
{
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define CARTRIDGE_HXX
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
class Cartridge;
|
||||
class System;
|
||||
|
@ -46,12 +47,14 @@ class Cartridge : public Device
|
|||
|
||||
@param image A pointer to the ROM image
|
||||
@param size The size of the ROM image
|
||||
@param props The properties associated with the game
|
||||
@param md5 The md5sum for the given ROM image (can be updated)
|
||||
@param name The name of the ROM (can be updated)
|
||||
@param type The bankswitch type of the ROM image
|
||||
@param settings The settings associated with the system
|
||||
@return Pointer to the new cartridge object allocated on the heap
|
||||
*/
|
||||
static Cartridge* create(const uInt8* image, uInt32 size,
|
||||
const Properties& props, Settings& settings);
|
||||
static Cartridge* create(const uInt8* image, uInt32 size, string& md5,
|
||||
string& name, string type, Settings& settings);
|
||||
|
||||
/**
|
||||
Create a new cartridge
|
||||
|
@ -170,6 +173,21 @@ class Cartridge : public Device
|
|||
void registerRamArea(uInt16 start, uInt16 size, uInt16 roffset, uInt16 woffset);
|
||||
|
||||
private:
|
||||
/**
|
||||
Get an image pointer and size for a ROM that is part of a larger,
|
||||
multi-ROM image.
|
||||
|
||||
@param image A pointer to the ROM image
|
||||
@param size The size of the ROM image
|
||||
@param numroms The number of ROMs in the multicart
|
||||
@param md5 The md5sum for the specific cart in the ROM image
|
||||
@param id The ID for the specific cart in the ROM image
|
||||
@param settings The settings associated with the system
|
||||
@return The bankswitch type for the specific cart in the ROM image
|
||||
*/
|
||||
static string createFromMultiCart(const uInt8*& image, uInt32& size,
|
||||
uInt32 numroms, string& md5, string& id, Settings& settings);
|
||||
|
||||
/**
|
||||
Try to auto-detect the bankswitching type of the cartridge
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ Console::Console(OSystem* osystem, Cartridge* cart, const Properties& props)
|
|||
if(myTIA->scanlines() > 285)
|
||||
++palCount;
|
||||
}
|
||||
myDisplayFormat = (palCount >= 30) ? "PAL" : "NTSC";
|
||||
myDisplayFormat = (palCount >= 20) ? "PAL" : "NTSC";
|
||||
if(myProperties.get(Display_Format) == "AUTO-DETECT")
|
||||
autodetected = "*";
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
regenerated and the application recompiled.
|
||||
*/
|
||||
|
||||
#define DEF_PROPS_SIZE 3220
|
||||
#define DEF_PROPS_SIZE 3219
|
||||
|
||||
static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
||||
{ "000509d1ed2b8d30a9d94be1b3b5febb", "Greg Zumwalt", "", "Jungle Jane (2003) (Greg Zumwalt) (Hack)", "Hack of Pitfall!", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
@ -525,7 +525,7 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "277fa4b9a6bb7a8dcea2c5f38a4c25f0", "Atari, Alan J. Murphy, Robert Zdybel", "CX2668", "RealSports Football (1982) (Atari) (Prototype)", "AKA Football II", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" },
|
||||
{ "278155fc9956e9b6ef2359eb238f7c7f", "", "", "Donkey Kong Junior (Unknown) (Hack)", "Hack of Donkey Kong Junior", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "2783006ee6519f15cbc96adae031c9a9", "Telegames", "", "Night Stalker (1989) (Telegames) (PAL) [a]", "AKA Dark Cavern", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "278f14887d601b5e5b620f1870bc09f6", "", "", "SWOOPS! (v0.96) (Thomas Jentzsch)", "Uses the Joystick (L) and Paddle (R) Controllers", "", "", "", "", "", "", "", "", "PADDLES", "", "", "30", "", "", "" },
|
||||
{ "278f14887d601b5e5b620f1870bc09f6", "Thomas Jentzsch", "", "SWOOPS! (v0.96) (TJ)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "30", "", "", "" },
|
||||
{ "27a3c5216b6c6e96e321634973b73784", "", "", "Greeting Cart Atari Coin (V1) (SnailSoft)(PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "27c4c2af4b46394bb98638af8e0f6e9d", "Atari, Jerome Domurat, Peter C. Niday, Robert Vieira", "CX26109", "Sorcerer's Apprentice (1983) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "27c6a2ca16ad7d814626ceea62fa8fb4", "Parker Brothers, Mark Lesser", "PB5590", "Frogger II (1984) (Parker Bros)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" },
|
||||
|
@ -545,9 +545,9 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "28a4cd87fb9de4ee91693a38611cb53c", "", "", "Skeleton (V1.1) (NTSC) (24-10-2002) (Eric Ball)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "28d5df3ed036ed63d33a31d0d8b85c47", "Bit Corporation", "PG204", "Open, Sesame! (1982) (BitCorp) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "256", "YES", "" },
|
||||
{ "2903896d88a341511586d69fcfc20f7d", "Activision, David Crane", "AX-014, AX-014-04", "Grand Prix (1982) (Activision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "291bcdb05f2b37cdf9452d2bf08e0321", "Atari", "CX26163P", "32 in 1 Game Cartridge (1988) (Atari) (Prototype) (PAL)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "42", "", "", "" },
|
||||
{ "291bcdb05f2b37cdf9452d2bf08e0321", "Atari", "CX26163P", "32 in 1 Game Cartridge (1988) (Atari) (Prototype) (PAL)", "", "Prototype", "", "32IN1", "", "", "", "", "", "", "", "", "42", "", "", "" },
|
||||
{ "291cc37604bc899e8e065c30153fc4b9", "Activision, Carol Shaw", "AX-020, AX-020-04", "River Raid (1982) (Activision) (16K)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "291dd47588b9158beebe4accc3a093a6", "Atari", "", "32 in 1 Console ROM (02-10-1989) (Atari) (Prototype) (PAL)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "42", "", "", "" },
|
||||
{ "291dd47588b9158beebe4accc3a093a6", "Atari", "", "32 in 1 Console ROM (02-10-1989) (Atari) (Prototype) (PAL)", "", "Prototype", "", "32IN1", "", "", "", "", "", "", "", "", "42", "", "", "" },
|
||||
{ "292a0bb975b2587f9ac784c960e1b453", "", "", "Qb (05-02-2001) (AD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" },
|
||||
{ "292f2446a0325b7b423e88a2ebfeb5a0", "", "", "Cube Conquest (Non Interlaced) (Billy Eno) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" },
|
||||
{ "29396db58406084e416032c372734a3e", "", "", "Gunfight 2600 - Fixed Beta Release! (2001) (MP)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
@ -660,7 +660,7 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "318046ae3711c05fd16e479b298e5fcc", "Retroactive", "", "Qb (V2.08) (Stella) (2001) (Retroactive)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" },
|
||||
{ "318a9d6dda791268df92d72679914ac3", "Activision, Steve Cartwright", "AX-017, AX-017-04", "MegaMania (1982) (Activision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "319a142aab6260842ab616382848c204", "", "", "Marble Craze (05-02-2002) (Paul Slocum)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "31bb9b8ceed46cb3e506777a9e65f3ce", "Bit Corporation", "", "4 Game in One Light Green (1983) (BitCorp) (PAL)", "Ice Hockey, Phantom UFO, Spy Vs. Spy, Cosmic Avenger", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "31bb9b8ceed46cb3e506777a9e65f3ce", "Bit Corporation", "", "4 Game in One Light Green (1983) (BitCorp) (PAL)", "Phantom UFO, Ice Hockey, Cosmic Avenger, Spy Vs. Spy", "", "", "4IN1", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "31d08cb465965f80d3541a57ec82c625", "Atari, Alan Miller - Sears", "CX2641 - 99807, 49-75105", "Surround (1977) (Atari) (4K)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "31df1c50c4351e144c9a378adb8c10ba", "Quelle", "687.463 0", "Die Ratte und die Karotten (1983) (Quelle) (PAL)", "AKA Gopher", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "31e518debba46df6226b535fa8bd2543", "Atari, Douglas 'Solaris' Neubauer", "CX26134", "Last Starfighter (1984) (Atari) (Prototype)", "Solaris Beta", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
@ -1045,7 +1045,7 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "50200f697aeef38a3ce31c4f49739551", "Mystique - American Multiple Industries, Joel H. Martin", "", "Custer's Revenge (1982) (Mystique) (PAL60)", "", "", "", "", "", "", "", "", "", "", "", "PAL60", "", "", "", "" },
|
||||
{ "502044b1ac111b394e6fbb0d821fca41", "", "", "Hangman Invader 4letter (Hack)", "Hack of Hangman", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "502168660bfd9c1d2649d415dc89c69d", "Activision, Bob Whitehead - Ariola", "EAG-019, EAG-019-04I - 711 019-715", "Sky Jinks (1982) (Activision) (PAL) (4K)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "504688d49a41bf03d8a955512609f3f2", "", "", "SWOOPS!", "Uses the Joystick (L) and Paddle (R) Controllers", "", "", "", "", "", "", "", "", "PADDLES", "", "", "30", "", "", "" },
|
||||
{ "504688d49a41bf03d8a955512609f3f2", "Thomas Jentzsch", "", "SWOOPS! (TJ)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "30", "", "", "" },
|
||||
{ "50568c80ac61cab789d9923c9b05b68e", "Ebivision", "", "Merlin's Walls - Standard Edition (1999) (Ebivision)", "Image rotated 90 degrees CW", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "50a410a5ded0fc9aa6576be45a04f215", "Activision, Bob Whitehead - Ariola", "EAG-019, EAG-019-04I - 711 019-715", "Sky Jinks (1982) (Activision) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "50ef88f9a5e0e1e6b86e175362a27fdb", "", "", "Multi-Sprite Game V2.4 (Piero Cavina) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
@ -1189,7 +1189,7 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "5d132d121aabc5235dd039dfc46aa024", "", "", "Basketball (208 in 1) (Unknown) (PAL) (Hack)", "", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "5d2cc33ca798783dee435eb29debf6d6", "Activision, Mike Reidel", "AK-043-04", "Commando (1988) (Activision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "5d799bfa9e1e7b6224877162accada0d", "Spectravision, Spectravideo, David Lubar", "SA-206", "Challenge of.... Nexar, The (1982) (Spectravision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "5d8f1ab95362acdf3426d572a6301bf2", "", "", "SWOOPS! (v0.96) (Thomas Jentzsch) (PAL)", "Uses the Joystick (L) and Paddle (R) Controllers", "", "", "", "", "", "", "", "", "PADDLES", "", "", "30", "", "", "" },
|
||||
{ "5d8f1ab95362acdf3426d572a6301bf2", "Thomas Jentzsch", "", "SWOOPS! (v0.96) (TJ) (PAL)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "30", "", "", "" },
|
||||
{ "5d8fb14860c2f198472b233874f6b0c9", "", "", "Boing! (PD) [a2]", "", "New Release", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "5d9592756425192ec621d2613d0e683d", "CCE", "C-839", "Misterious Thief, A (1983) (CCE) [a]", "AKA A Mysterious Thief", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "5da8fd0b5ed33a360bff37f8b5d0cd58", "Tron", "", "Pole Position (Tron)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
@ -1441,7 +1441,7 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "6ffc95108e5add6f9b8abcaf330be835", "Charles Morgan", "", "TP Bug (Charles Morgan) (Hack)", "Hack of Pac-Man", "Hack", "", "", "", "", "", "", "", "", "", "", "33", "", "", "" },
|
||||
{ "700a786471c8a91ec09e2f8e47f14a04", "Activision", "", "Unknown Activision Game #2 (1983) (Activision) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "37", "", "", "" },
|
||||
{ "703d32062436e4c20c48313dff30e257", "", "", "Moving Maze Demo (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" },
|
||||
{ "703f0f7af350b0fa29dfe5fbf45d0d75", "Bit Corporation", "P460", "4 Game in One Dark Green (1983) (BitCorp) (PAL)", "Rodeo Champ, Open Sesame, Bobby is Going Home, Festival", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "703f0f7af350b0fa29dfe5fbf45d0d75", "Bit Corporation", "P460", "4 Game in One Dark Green (1983) (BitCorp) (PAL)", "Rodeo Champ, Bobby is Going Home, Open Sesame, Festival", "", "", "4IN1", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "705fe719179e65b0af328644f3a04900", "Atari, David Crane - Sears", "CX2653 - 6-99823, 49-75111", "Slot Machine (1979) (Atari) (4K) [a]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "706e3cc4931f984447213b92d1417aff", "", "", "Joustpong (06-07-2002) (Kirk Israel) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "707ecd80030e85751ef311ced66220bc", "", "", "Double-Height 6-Digit Score Display (Background Color Change) (2001) (AD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
@ -1495,7 +1495,7 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "742de93b8d849220f266b627fbabba82", "", "", "SCSIcide (25-02-2001) (Chris Wilkson) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7450ae4e10ba8380c55b259d7c2b13e8", "", "", "Register Twiddler Demo 2 (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7454786af7126ccc7a0c31fcf5af40f1", "", "", "Phantom Tank (Unknown) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7465b06b6e25a4a6c6d77d02242af6d6", "Atari", "CX26193", "8 in 1 (01-16-92) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7465b06b6e25a4a6c6d77d02242af6d6", "Atari", "CX26193", "8 in 1 (01-16-92) (Atari) (Prototype)", "", "Prototype", "", "8IN1", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "747d3031eb37e32abc7f6e5ee928cd8f", "", "", "Greeting Cart Goth (SnailSoft)(PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7481f0771bff13885b2ff2570cf90d7b", "Starpath Corporation, Brian McGhie", "AR-4104", "Rabbit Transit (1983) (Starpath) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "749fec9918160921576f850b2375b516", "Spectravision, Spectravideo", "SA-205", "China Syndrome (1982) (Spectravision)", "", "", "", "", "", "", "", "", "", "", "", "", "29", "", "YES", "" },
|
||||
|
@ -1598,7 +1598,6 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "7c757bb151269b2a626c907a22f5dae7", "TNT Games, Adam Clayton", "26192", "BMX Air Master (1989) (TNT Games) (PAL)", "", "Extremely Rare", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7c9b3b8b25acf2fe3b8da834f69629c6", "", "", "I Robot (1984) (Atari) (Prototype) [!]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7ca7a471d70305c673fedd08174a81e8", "Tim Snider", "", "Venture II (2001) (Tim Snider)", "", "New Release", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" },
|
||||
{ "7cafc884a21aa3b7052f7109e690ca70", "", "", "sgems.bin", "", "", "", "", "", "", "", "", "", "", "", "", "30", "", "", "" },
|
||||
{ "7cc77f6745e1f2b20df4a4327d350545", "Atari, Richard Maurer", "CX2632, CX2632P", "Space Invaders (1980) (Atari) (PAL) [fixed]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7ccf350354ee15cd9b85564a2014b08c", "", "", "Big Dig (13-04-2003) (CT)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "7cd379da92c93679f3b6d2548617746a", "", "", "Demo Image Series #5 - Clown (19-02-2003) (AD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
@ -3228,7 +3227,7 @@ static const char* DefProps[DEF_PROPS_SIZE][20] = {
|
|||
{ "fe0bc4bb92c1c4de7d5706aaa8d8c10d", "", "", "Sprite Demo 2 (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "fe3b461d4c8b179fe68bc77760294c25", "Atari, Joe Decuir", "CX2621, CX2621P", "Video Olympics (1977) (Atari) (PAL) (4K)", "Uses the Paddle Controllers", "", "", "", "", "", "", "", "PADDLES", "PADDLES", "", "", "", "", "", "" },
|
||||
{ "fe67087f9c22655ce519616fc6c6ef4d", "Atari, Robert Neve", "CX26142", "Crack'ed (11-28-1988) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "fe6abc0f63e31e2646c9c600926b5b7f", "Atari", "CX26137", "4 in 1 - Canyon Bomber, Home Run, Night Driver, Sky Diver (02-19-1987) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "fe6abc0f63e31e2646c9c600926b5b7f", "Atari", "CX26137", "4 in 1 (02-19-1987) (Atari) (Prototype)", "Home Run, Canyon Bomber, Sky Diver, Night Driver", "Prototype", "", "4IN1", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "fe870018332a0221eb59fb18b0c6bccc", "", "", "Incoming (08-11-2002) (Ben Larson) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "fe940ab8eaa07e4db801f1728e391dbd", "Arcadia Corporation, Dennis Caswell", "AR-4000, AR-4100", "Phaser Patrol (1982) (Arcadia) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "24", "", "YES", "" },
|
||||
{ "fe9ae625d924b54c9f8a14ac9a0f6c6d", "BG Dodson", "", "High Bid! (BG Dodson) (Hack)", "Hack of Pepsi Invaders", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
|
|
@ -619,10 +619,31 @@ Console* OSystem::openConsole(const string& romfile, string& md5)
|
|||
// Get a valid set of properties, including any entered on the commandline
|
||||
Properties props;
|
||||
myPropSet->getMD5(md5, props);
|
||||
|
||||
string s = "";
|
||||
CMDLINE_PROPS_UPDATE("bs", Cartridge_Type);
|
||||
CMDLINE_PROPS_UPDATE("type", Cartridge_Type);
|
||||
|
||||
// Now create the cartridge
|
||||
string id, cartmd5 = md5, type = props.get(Cartridge_Type);
|
||||
Cartridge* cart =
|
||||
Cartridge::create(image, size, cartmd5, id, type, *mySettings);
|
||||
|
||||
// It's possible that the cart created was from a piece of the image,
|
||||
// and that the md5 (and hence the cart) has changed
|
||||
if(props.get(Cartridge_MD5) != cartmd5)
|
||||
{
|
||||
string name = props.get(Cartridge_Name);
|
||||
myPropSet->getMD5(cartmd5, props);
|
||||
|
||||
// Add appropriate name if none exists
|
||||
if(props.get(Cartridge_Name) == "Untitled")
|
||||
{
|
||||
props.set(Cartridge_MD5, cartmd5);
|
||||
props.set(Cartridge_Name, name+id);
|
||||
myPropSet->insert(props, false);
|
||||
}
|
||||
}
|
||||
|
||||
CMDLINE_PROPS_UPDATE("channels", Cartridge_Sound);
|
||||
CMDLINE_PROPS_UPDATE("ld", Console_LeftDifficulty);
|
||||
CMDLINE_PROPS_UPDATE("rd", Console_RightDifficulty);
|
||||
|
@ -639,7 +660,7 @@ Console* OSystem::openConsole(const string& romfile, string& md5)
|
|||
CMDLINE_PROPS_UPDATE("pp", Display_Phosphor);
|
||||
CMDLINE_PROPS_UPDATE("ppblend", Display_PPBlend);
|
||||
|
||||
Cartridge* cart = Cartridge::create(image, size, props, *mySettings);
|
||||
// Finally, create the cart with the correct properties
|
||||
if(cart)
|
||||
console = new Console(this, cart, props);
|
||||
}
|
||||
|
|
|
@ -1945,6 +1945,7 @@
|
|||
"Cartridge.ModelNo" "CX26163P"
|
||||
"Cartridge.Name" "32 in 1 Game Cartridge (1988) (Atari) (Prototype) (PAL)"
|
||||
"Cartridge.Rarity" "Prototype"
|
||||
"Cartridge.Type" "32IN1"
|
||||
"Display.YStart" "42"
|
||||
""
|
||||
|
||||
|
@ -3061,8 +3062,10 @@
|
|||
""
|
||||
|
||||
"Cartridge.MD5" "278f14887d601b5e5b620f1870bc09f6"
|
||||
"Cartridge.Name" "SWOOPS! (v0.96) (Thomas Jentzsch)"
|
||||
"Cartridge.Manufacturer" "Thomas Jentzsch"
|
||||
"Cartridge.Name" "SWOOPS! (v0.96) (TJ)"
|
||||
"Cartridge.Note" "Uses the Joystick (L) and Paddle (R) Controllers"
|
||||
"Cartridge.Rarity" "Homebrew"
|
||||
"Controller.Right" "PADDLES"
|
||||
"Display.YStart" "30"
|
||||
""
|
||||
|
@ -3186,6 +3189,7 @@
|
|||
"Cartridge.Manufacturer" "Atari"
|
||||
"Cartridge.Name" "32 in 1 Console ROM (02-10-1989) (Atari) (Prototype) (PAL)"
|
||||
"Cartridge.Rarity" "Prototype"
|
||||
"Cartridge.Type" "32IN1"
|
||||
"Display.YStart" "42"
|
||||
""
|
||||
|
||||
|
@ -3627,7 +3631,8 @@
|
|||
"Cartridge.MD5" "31bb9b8ceed46cb3e506777a9e65f3ce"
|
||||
"Cartridge.Manufacturer" "Bit Corporation"
|
||||
"Cartridge.Name" "4 Game in One Light Green (1983) (BitCorp) (PAL)"
|
||||
"Cartridge.Note" "Ice Hockey, Phantom UFO, Spy Vs. Spy, Cosmic Avenger"
|
||||
"Cartridge.Note" "Phantom UFO, Ice Hockey, Cosmic Avenger, Spy Vs. Spy"
|
||||
"Cartridge.Type" "4IN1"
|
||||
""
|
||||
|
||||
"Cartridge.MD5" "2f2f9061398a74c80420b99ddecf6448"
|
||||
|
@ -6160,8 +6165,10 @@
|
|||
""
|
||||
|
||||
"Cartridge.MD5" "504688d49a41bf03d8a955512609f3f2"
|
||||
"Cartridge.Name" "SWOOPS!"
|
||||
"Cartridge.Manufacturer" "Thomas Jentzsch"
|
||||
"Cartridge.Name" "SWOOPS! (TJ)"
|
||||
"Cartridge.Note" "Uses the Joystick (L) and Paddle (R) Controllers"
|
||||
"Cartridge.Rarity" "Homebrew"
|
||||
"Controller.Right" "PADDLES"
|
||||
"Display.YStart" "30"
|
||||
""
|
||||
|
@ -7042,8 +7049,10 @@
|
|||
""
|
||||
|
||||
"Cartridge.MD5" "5d8f1ab95362acdf3426d572a6301bf2"
|
||||
"Cartridge.Name" "SWOOPS! (v0.96) (Thomas Jentzsch) (PAL)"
|
||||
"Cartridge.Manufacturer" "Thomas Jentzsch"
|
||||
"Cartridge.Name" "SWOOPS! (v0.96) (TJ) (PAL)"
|
||||
"Cartridge.Note" "Uses the Joystick (L) and Paddle (R) Controllers"
|
||||
"Cartridge.Rarity" "Homebrew"
|
||||
"Controller.Right" "PADDLES"
|
||||
"Display.YStart" "30"
|
||||
""
|
||||
|
@ -8281,7 +8290,8 @@
|
|||
"Cartridge.Manufacturer" "Bit Corporation"
|
||||
"Cartridge.ModelNo" "P460"
|
||||
"Cartridge.Name" "4 Game in One Dark Green (1983) (BitCorp) (PAL)"
|
||||
"Cartridge.Note" "Rodeo Champ, Open Sesame, Bobby is Going Home, Festival"
|
||||
"Cartridge.Note" "Rodeo Champ, Bobby is Going Home, Open Sesame, Festival"
|
||||
"Cartridge.Type" "4IN1"
|
||||
""
|
||||
|
||||
"Cartridge.MD5" "6d218dafbf5a691045cdc1f67ceb6a8f"
|
||||
|
@ -8904,6 +8914,7 @@
|
|||
"Cartridge.ModelNo" "CX26193"
|
||||
"Cartridge.Name" "8 in 1 (01-16-92) (Atari) (Prototype)"
|
||||
"Cartridge.Rarity" "Prototype"
|
||||
"Cartridge.Type" "8IN1"
|
||||
""
|
||||
|
||||
"Cartridge.MD5" "7481f0771bff13885b2ff2570cf90d7b"
|
||||
|
@ -9502,11 +9513,6 @@
|
|||
"Display.Phosphor" "YES"
|
||||
""
|
||||
|
||||
"Cartridge.MD5" "7cafc884a21aa3b7052f7109e690ca70"
|
||||
"Cartridge.Name" "sgems.bin"
|
||||
"Display.YStart" "30"
|
||||
""
|
||||
|
||||
"Cartridge.MD5" "7cc77f6745e1f2b20df4a4327d350545"
|
||||
"Cartridge.Manufacturer" "Atari, Richard Maurer"
|
||||
"Cartridge.ModelNo" "CX2632, CX2632P"
|
||||
|
@ -19318,8 +19324,10 @@
|
|||
"Cartridge.MD5" "fe6abc0f63e31e2646c9c600926b5b7f"
|
||||
"Cartridge.Manufacturer" "Atari"
|
||||
"Cartridge.ModelNo" "CX26137"
|
||||
"Cartridge.Name" "4 in 1 - Canyon Bomber, Home Run, Night Driver, Sky Diver (02-19-1987) (Atari) (Prototype)"
|
||||
"Cartridge.Name" "4 in 1 (02-19-1987) (Atari) (Prototype)"
|
||||
"Cartridge.Note" "Home Run, Canyon Bomber, Sky Diver, Night Driver"
|
||||
"Cartridge.Rarity" "Prototype"
|
||||
"Cartridge.Type" "4IN1"
|
||||
""
|
||||
|
||||
"Cartridge.MD5" "fe940ab8eaa07e4db801f1728e391dbd"
|
||||
|
|
|
@ -135,6 +135,9 @@ GameInfoDialog::GameInfoDialog(
|
|||
items.clear();
|
||||
items.push_back("Auto-detect", "AUTO-DETECT");
|
||||
items.push_back("0840 (8K ECONObank)", "0840" );
|
||||
items.push_back("4IN1 Multicart (8-32K)", "4IN1" );
|
||||
items.push_back("8IN1 Multicart (16-64K)", "8IN1" );
|
||||
items.push_back("32IN1 Multicart (64-128K)", "32IN1");
|
||||
items.push_back("2K (2K Atari)", "2K" );
|
||||
items.push_back("3E (32K Tigervision)", "3E" );
|
||||
items.push_back("3F (512K Tigervision)", "3F" );
|
||||
|
@ -157,7 +160,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
items.push_back("FE (8K Decathlon)", "FE" );
|
||||
items.push_back("MB (Dynacom Megaboy)", "MB" );
|
||||
items.push_back("MC (C. Wilkson Megacart)", "MC" );
|
||||
items.push_back("SB (128-256k SUPERbank)", "SB" );
|
||||
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,
|
||||
|
|
|
@ -66,6 +66,9 @@ GlobalPropsDialog::
|
|||
items.push_back("Default", "DEFAULT");
|
||||
items.push_back("Auto-detect", "AUTO-DETECT");
|
||||
items.push_back("0840 (8K ECONObank)", "0840" );
|
||||
items.push_back("4IN1 Multicart (8-32K)", "4IN1" );
|
||||
items.push_back("8IN1 Multicart (16-64K)", "8IN1" );
|
||||
items.push_back("32IN1 Multicart (64-128K)", "32IN1");
|
||||
items.push_back("2K (2K Atari)", "2K" );
|
||||
items.push_back("3E (32K Tigervision)", "3E" );
|
||||
items.push_back("3F (512K Tigervision)", "3F" );
|
||||
|
@ -88,7 +91,7 @@ GlobalPropsDialog::
|
|||
items.push_back("FE (8K Decathlon)", "FE" );
|
||||
items.push_back("MB (Dynacom Megaboy)", "MB" );
|
||||
items.push_back("MC (C. Wilkson Megacart)", "MC" );
|
||||
items.push_back("SB (128-256k SUPERbank)", "SB" );
|
||||
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,
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use File::Basename;
|
||||
|
||||
usage() if @ARGV < 2;
|
||||
|
||||
my %builtin = ();
|
||||
my %directory = ();
|
||||
|
||||
my @missing = ();
|
||||
my @delete = ();
|
||||
|
||||
# Get all snapshot files from the built-in database in Stella
|
||||
# This data comes from 'stella -listrominfo' (first commandline arg)
|
||||
# We use a hashmap to get constant lookup time
|
||||
open(INFILE, "$ARGV[0]");
|
||||
foreach $line (<INFILE>)
|
||||
{
|
||||
if($line =~ /\|/)
|
||||
{
|
||||
chomp $line;
|
||||
($md5, $name, $other) = split (/\|/, $line);
|
||||
$key = $name . ".png";
|
||||
$builtin{$key} = $key;
|
||||
}
|
||||
}
|
||||
close(INFILE);
|
||||
|
||||
# Get all snapshot files from the actual directory (second commandline arg)
|
||||
# We use a hashmap to get constant lookup time
|
||||
my @files = <$ARGV[1]/*>;
|
||||
foreach $file (@files)
|
||||
{
|
||||
($base,$path,$type) = fileparse($file);
|
||||
$directory{$base} = $base;
|
||||
}
|
||||
|
||||
# All files in %builtin but not in %directory are 'missing' snapshots
|
||||
while(($key, $value) = each(%builtin))
|
||||
{
|
||||
if(!defined $directory{$key})
|
||||
{
|
||||
push(@missing, $key);
|
||||
}
|
||||
}
|
||||
|
||||
# All files in %directory but not in %builtin are redundant, and should be deleted
|
||||
while(($key, $value) = each(%directory))
|
||||
{
|
||||
if(!defined $builtin{$key})
|
||||
{
|
||||
$file = $ARGV[1] . "/" . $key;
|
||||
push(@delete, $file);
|
||||
}
|
||||
}
|
||||
|
||||
$size = @missing;
|
||||
print "Missing snapshots: ($size)\n\n";
|
||||
if($size > 0)
|
||||
{
|
||||
@missing = sort(@missing);
|
||||
foreach $file (@missing)
|
||||
{
|
||||
print "$file\n";
|
||||
}
|
||||
}
|
||||
|
||||
$size = @delete;
|
||||
print "\n\nExtra snapshots: ($size)\n\n";
|
||||
if($size > 0)
|
||||
{
|
||||
@delete = sort(@delete);
|
||||
foreach $file (@delete)
|
||||
{
|
||||
print "$file\n";
|
||||
}
|
||||
|
||||
print "\nDelete extra snapshots [yN]: ";
|
||||
chomp ($input = <STDIN>);
|
||||
if($input eq 'y')
|
||||
{
|
||||
foreach $file (@delete)
|
||||
{
|
||||
$cmd = "rm \"$file\"";
|
||||
system($cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub usage {
|
||||
print "prune_snapshots.pl [listrominfo data] [snapshot dir]\n";
|
||||
exit(0);
|
||||
}
|
Loading…
Reference in New Issue