Fixed issue with two F8 cartridges that have to start in the opposite bank.

It wasn't worth adding another bankswitch type for these, since they're
basically an anomoly, and I don't think any others exist like it.

Updated "Air Raid" ROM properties.  This is a PAL ROM, no matter what
the other emulators say.  The only way I'll change it at this point is to
see the real cartridge in action.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1256 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2006-12-31 02:16:37 +00:00
parent fc4e4b7b17
commit f0a3700e53
7 changed files with 56 additions and 43 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Cart.cxx,v 1.26 2006-12-28 18:31:22 stephena Exp $
// $Id: Cart.cxx,v 1.27 2006-12-31 02:16:36 stephena Exp $
//============================================================================
#include <cassert>
@ -53,8 +53,19 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
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" ||
md5 == "75ee371ccfc4f43e7d9b8f24e1266b55")
{
// These two ROMs are normal 8K images, except they must be initialized
// from the opposite bank compared to normal ones
type = "F8 swapped";
}
// Collect some info about the ROM
ostringstream buf;
buf << " Size of ROM: " << size << endl
@ -101,7 +112,9 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
else if(type == "F6SC")
cartridge = new CartridgeF6SC(image);
else if(type == "F8")
cartridge = new CartridgeF8(image);
cartridge = new CartridgeF8(image, false);
else if(type == "F8 swapped")
cartridge = new CartridgeF8(image, true);
else if(type == "F8SC")
cartridge = new CartridgeF8SC(image);
else if(type == "FASC")

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Cart.hxx,v 1.14 2006-12-28 18:31:22 stephena Exp $
// $Id: Cart.hxx,v 1.15 2006-12-31 02:16:36 stephena Exp $
//============================================================================
#ifndef CARTRIDGE_HXX
@ -33,7 +33,7 @@ class Settings;
game and handles any bankswitching performed by the cartridge.
@author Bradford W. Mott
@version $Id: Cart.hxx,v 1.14 2006-12-28 18:31:22 stephena Exp $
@version $Id: Cart.hxx,v 1.15 2006-12-31 02:16:36 stephena Exp $
*/
class Cartridge : public Device
{

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: CartF8.cxx,v 1.12 2006-12-08 16:49:22 stephena Exp $
// $Id: CartF8.cxx,v 1.13 2006-12-31 02:16:37 stephena Exp $
//============================================================================
#include <assert.h>
@ -24,13 +24,15 @@
#include <iostream>
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF8::CartridgeF8(const uInt8* image)
CartridgeF8::CartridgeF8(const uInt8* image, bool swapbanks)
{
// Copy the ROM image into my buffer
for(uInt32 addr = 0; addr < 8192; ++addr)
{
myImage[addr] = image[addr];
}
myResetBank = swapbanks ? 0 : 1;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -47,8 +49,8 @@ const char* CartridgeF8::name() const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeF8::reset()
{
// Upon reset we switch to bank 1
bank(1);
// Upon reset we switch to the reset bank (normally bank 1)
bank(myResetBank);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -157,16 +159,6 @@ void CartridgeF8::bank(uInt16 bank)
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeF8::bank() {
return myCurrentBank;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeF8::bankCount() {
return 2;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeF8::save(Serializer& out)
{
@ -222,7 +214,20 @@ bool CartridgeF8::load(Deserializer& in)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8* CartridgeF8::getImage(int& size) {
int CartridgeF8::bank()
{
return myCurrentBank;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeF8::bankCount()
{
return 2;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8* CartridgeF8::getImage(int& size)
{
size = 8192;
return &myImage[0];
}

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: CartF8.hxx,v 1.7 2006-12-08 16:49:22 stephena Exp $
// $Id: CartF8.hxx,v 1.8 2006-12-31 02:16:37 stephena Exp $
//============================================================================
#ifndef CARTRIDGEF8_HXX
@ -31,7 +31,7 @@ class Deserializer;
are two 4K banks.
@author Bradford W. Mott
@version $Id: CartF8.hxx,v 1.7 2006-12-08 16:49:22 stephena Exp $
@version $Id: CartF8.hxx,v 1.8 2006-12-31 02:16:37 stephena Exp $
*/
class CartridgeF8 : public Cartridge
{
@ -40,8 +40,9 @@ class CartridgeF8 : public Cartridge
Create a new cartridge using the specified image
@param image Pointer to the ROM image
@param swapbanks Whether to swap the startup bank
*/
CartridgeF8(const uInt8* image);
CartridgeF8(const uInt8* image, bool swapbanks);
/**
Destructor
@ -118,6 +119,9 @@ class CartridgeF8 : public Cartridge
// Indicates which bank is currently active
uInt16 myCurrentBank;
// Indicates the bank to use when resetting
uInt16 myResetBank;
// The 8K ROM image of the cartridge
uInt8 myImage[8192];
};

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Console.cxx,v 1.116 2006-12-30 22:26:28 stephena Exp $
// $Id: Console.cxx,v 1.117 2006-12-31 02:16:37 stephena Exp $
//============================================================================
#include <cassert>
@ -220,18 +220,6 @@ Console::Console(OSystem* osystem, Cartridge* cart, const Properties& props)
if(myProperties.get(Display_Height) == "210")
myProperties.set(Display_Height, "250");
// Make sure this ROM can fit in the screen dimensions
int sWidth, sHeight, iWidth, iHeight;
myOSystem->getScreenDimensions(sWidth, sHeight);
iWidth = atoi(myProperties.get(Display_Width).c_str()) << 1;
iHeight = atoi(myProperties.get(Display_Height).c_str());
if(iWidth > sWidth || iHeight > sHeight)
{
myOSystem->frameBuffer().showMessage("PAL ROMS not supported, screen too small",
kMiddleCenter, kTextColorEm);
return;
}
// Reset, the system to its power-on state
mySystem->reset();

View File

@ -26,7 +26,7 @@ static const char* DefProps[][23] = {
{ "0805366f1b165a64b6d4df20d2c39d25", "Atari", "CX2650 / 4975168", "Berzerk (1982) (Atari) (PAL) [!]", "", "Common", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "16cb43492987d2f32b423817cdaaf7c4", "Atari", "CX2602", "Air-Sea Battle (1977) (Atari) [!]", "", "Uncommon", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "26bc2bdf447a17376aea7ef187ff6e44", "", "", "Amanda Invaders (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "35be55426c1fec32dfb503b4f0651572", "", "C-817", "Air Raid (Men-A-Vision)", "", "Extremely Rare", "", "", "", "", "", "", "", "", "", "NTSC", "", "", "", "250", "YES", "", "" },
{ "35be55426c1fec32dfb503b4f0651572", "", "C-817", "Air Raid (Men-A-Vision)", "", "Extremely Rare", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "456453a54ca65191781aef316343ae00", "", "", "Full Screen Bitmap (3-D Green) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "575c0fb61e66a31d982c95c9dea6865c", "Atari", "", "Blackjack (1977) (Atari) (PAL) [p1][!]", "Uses the Paddle Controllers", "Rare", "", "", "", "", "", "", "Paddles", "Paddles", "", "", "", "", "", "", "", "", "" },
{ "6672de8f82c4f7b8f7f1ef8b6b4f614d", "Ariola", "", "Angling (Ariola) (PAL) [!]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -2718,7 +2718,7 @@ static const char* DefProps[][23] = {
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "504688d49a41bf03d8a955512609f3f2", "", "", "Swoops / Splatform", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "30", "", "", "", "NO" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "50dd164c77c4df579843baf838327469", "Champ Games", "", "Conquest Of Mars", "", "Homebrew", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },

View File

@ -3143,9 +3143,6 @@
"Cartridge.ModelNo" "C-817"
"Cartridge.Name" "Air Raid (Men-A-Vision)"
"Cartridge.Rarity" "Extremely Rare"
"Display.Format" "NTSC"
"Display.Height" "250"
"Display.Phosphor" "YES"
""
"Cartridge.MD5" "335793736cbf6fc99c9359ed2a32a49d"
@ -15686,3 +15683,9 @@
"Cartridge.Name" "Phantom II / Pirate (NTSC)"
"Cartridge.Rarity" "Homebrew"
""
"Cartridge.MD5" "504688d49a41bf03d8a955512609f3f2"
"Cartridge.Name" "Swoops / Splatform"
"Display.YStart" "30"
"Emulation.HmoveBlanks" "NO"
""