Fixed issue with randomizing RAM for M6532 and various carts. It seems

that randomization was only done once per game invocation, and not each
time Device::reset() was called (which according to its definition is
when it should be done).  This has the side-effect of fixing A. Davies
notBoulderdash ROM, which didn't work if display-type was set to
auto-detect.

Some fixes for dynamic menus generated by PopUpWidget and its
associated dialog/surfaces.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1546 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2008-08-01 12:16:00 +00:00
parent a661d6b804
commit 60da49f3ef
25 changed files with 159 additions and 196 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: FrameBufferGL.hxx,v 1.54 2008-06-19 12:01:30 stephena Exp $
// $Id: FrameBufferGL.hxx,v 1.55 2008-08-01 12:15:57 stephena Exp $
//============================================================================
#ifndef FRAMEBUFFER_GL_HXX
@ -35,7 +35,7 @@ class GUI::Font;
This class implements an SDL OpenGL framebuffer.
@author Stephen Anthony
@version $Id: FrameBufferGL.hxx,v 1.54 2008-06-19 12:01:30 stephena Exp $
@version $Id: FrameBufferGL.hxx,v 1.55 2008-08-01 12:15:57 stephena Exp $
*/
class FrameBufferGL : public FrameBuffer
{
@ -210,7 +210,7 @@ class FrameBufferGL : public FrameBuffer
A surface suitable for software rendering mode.
@author Stephen Anthony
@version $Id: FrameBufferGL.hxx,v 1.54 2008-06-19 12:01:30 stephena Exp $
@version $Id: FrameBufferGL.hxx,v 1.55 2008-08-01 12:15:57 stephena Exp $
*/
class FBSurfaceGL : public FBSurface
{
@ -227,6 +227,8 @@ class FBSurfaceGL : public FBSurface
void addDirtyRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h);
void getPos(uInt32& x, uInt32& y) const;
void setPos(uInt32 x, uInt32 y);
uInt32 getWidth() const { return myWidth; }
uInt32 getHeight() const { return myHeight; }
void setWidth(uInt32 w);
void setHeight(uInt32 h);
void translateCoords(Int32& x, Int32& y) const;

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: FrameBufferSoft.hxx,v 1.52 2008-06-19 12:01:30 stephena Exp $
// $Id: FrameBufferSoft.hxx,v 1.53 2008-08-01 12:15:57 stephena Exp $
//============================================================================
#ifndef FRAMEBUFFER_SOFT_HXX
@ -33,7 +33,7 @@ class RectList;
This class implements an SDL software framebuffer.
@author Stephen Anthony
@version $Id: FrameBufferSoft.hxx,v 1.52 2008-06-19 12:01:30 stephena Exp $
@version $Id: FrameBufferSoft.hxx,v 1.53 2008-08-01 12:15:57 stephena Exp $
*/
class FrameBufferSoft : public FrameBuffer
{
@ -162,7 +162,7 @@ class FrameBufferSoft : public FrameBuffer
A surface suitable for software rendering mode.
@author Stephen Anthony
@version $Id: FrameBufferSoft.hxx,v 1.52 2008-06-19 12:01:30 stephena Exp $
@version $Id: FrameBufferSoft.hxx,v 1.53 2008-08-01 12:15:57 stephena Exp $
*/
class FBSurfaceSoft : public FBSurface
{
@ -179,6 +179,8 @@ class FBSurfaceSoft : public FBSurface
void addDirtyRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h);
void getPos(uInt32& x, uInt32& y) const;
void setPos(uInt32 x, uInt32 y);
uInt32 getWidth() const { return myWidth; }
uInt32 getHeight() const { return myHeight; }
void setWidth(uInt32 w);
void setHeight(uInt32 h);
void translateCoords(Int32& x, Int32& y) const;

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: Cart3E.cxx,v 1.15 2008-03-28 23:29:13 stephena Exp $
// $Id: Cart3E.cxx,v 1.16 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -31,17 +31,7 @@ Cartridge3E::Cartridge3E(const uInt8* image, uInt32 size)
myImage = new uInt8[mySize];
// Copy the ROM image into my buffer
for(uInt32 addr = 0; addr < mySize; ++addr)
{
myImage[addr] = image[addr];
}
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 32768; ++i)
{
myRam[i] = random.next();
}
memcpy(myImage, image, mySize);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -53,6 +43,11 @@ Cartridge3E::~Cartridge3E()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Cartridge3E::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 32768; ++i)
myRam[i] = random.next();
// We'll map bank 0 into the first segment upon reset
bank(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: Cart4A50.cxx,v 1.14 2008-03-28 23:29:13 stephena Exp $
// $Id: Cart4A50.cxx,v 1.15 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -35,11 +35,6 @@ Cartridge4A50::Cartridge4A50(const uInt8* image, uInt32 size)
else size = 131072;
for(uInt32 slice = 0; slice < 131072 / size; ++slice)
memcpy(myImage + (slice*size), image, size);
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 32768; ++i)
myRAM[i] = random.next();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -50,6 +45,11 @@ Cartridge4A50::~Cartridge4A50()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Cartridge4A50::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 32768; ++i)
myRAM[i] = random.next();
mySliceLow = mySliceMiddle = mySliceHigh = 0;
myIsRomLow = myIsRomMiddle = myIsRomHigh = true;

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: CartAR.cxx,v 1.22 2008-05-30 12:06:17 stephena Exp $
// $Id: CartAR.cxx,v 1.23 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -28,20 +28,11 @@
CartridgeAR::CartridgeAR(const uInt8* image, uInt32 size, bool fastbios)
: my6502(0)
{
uInt32 i;
// Create a load image buffer and copy the given image
myLoadImages = new uInt8[size];
myNumberOfLoadImages = size / 8448;
memcpy(myLoadImages, image, size);
// Initialize RAM with random values
class Random random;
for(i = 0; i < 6 * 1024; ++i)
{
myImage[i] = random.next();
}
// Initialize SC BIOS ROM
initializeROM(fastbios);
}
@ -55,6 +46,11 @@ CartridgeAR::~CartridgeAR()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeAR::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 6 * 1024; ++i)
myImage[i] = random.next();
myPower = true;
myPowerRomCycle = mySystem->cycles();
myWriteEnabled = false;

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: CartCV.cxx,v 1.16 2008-02-06 13:45:21 stephena Exp $
// $Id: CartCV.cxx,v 1.17 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -24,51 +24,45 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeCV::CartridgeCV(const uInt8* image, uInt32 size)
: myROM(0),
mySize(size)
{
uInt32 addr;
if(size == 2048)
{
// Copy the ROM image into my buffer
for(uInt32 addr = 0; addr < 2048; ++addr)
{
myImage[addr] = image[addr];
}
myROM = new uInt8[mySize];
memcpy(myROM, image, mySize);
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 1024; ++i)
{
myRAM[i] = random.next();
}
}
else if(size == 4096)
{
// The game has something saved in the RAM
// Usefull for MagiCard program listings
// Copy the ROM image into my buffer
for(addr = 0; addr < 2048; ++addr)
{
myImage[addr] = image[addr + 2048];
}
// Copy the RAM image into my buffer
for(addr = 0; addr < 1024; ++addr)
{
myRAM[addr] = image[addr];
}
}
reset();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeCV::~CartridgeCV()
{
delete[] myROM;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeCV::reset()
{
if(mySize == 2048)
{
// Copy the ROM data into my buffer
memcpy(myImage, myROM, 2048);
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 1024; ++i)
myRAM[i] = random.next();
}
else if(mySize == 4096)
{
// The game has something saved in the RAM
// Useful for MagiCard program listings
// Copy the ROM data into my buffer
memcpy(myImage, myROM + 2048, 2048);
// Copy the RAM image into my buffer
memcpy(myRAM, myROM, 1024);
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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: CartCV.hxx,v 1.11 2008-02-06 13:45:21 stephena Exp $
// $Id: CartCV.hxx,v 1.12 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#ifndef CARTRIDGECV_HXX
@ -32,7 +32,7 @@ class System;
$F800-$FFFF ROM
@author Eckhard Stolberg
@version $Id: CartCV.hxx,v 1.11 2008-02-06 13:45:21 stephena Exp $
@version $Id: CartCV.hxx,v 1.12 2008-08-01 12:15:58 stephena Exp $
*/
class CartridgeCV : public Cartridge
{
@ -139,6 +139,12 @@ class CartridgeCV : public Cartridge
virtual void poke(uInt16 address, uInt8 value);
private:
// Pointer to the initial cart data
uInt8* myROM;
// Initial size of the cart data
uInt32 mySize;
// The 2k ROM image for the cartridge
uInt8 myImage[2048];

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: CartE7.cxx,v 1.19 2008-03-28 23:29:13 stephena Exp $
// $Id: CartE7.cxx,v 1.20 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -26,17 +26,7 @@
CartridgeE7::CartridgeE7(const uInt8* image)
{
// Copy the ROM image into my buffer
for(uInt32 addr = 0; addr < 16384; ++addr)
{
myImage[addr] = image[addr];
}
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 2048; ++i)
{
myRAM[i] = random.next();
}
memcpy(myImage, image, 16384);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -47,6 +37,11 @@ CartridgeE7::~CartridgeE7()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeE7::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 2048; ++i)
myRAM[i] = random.next();
// Install some default banks for the RAM and first segment
bankRAM(0);
bank(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: CartF4SC.cxx,v 1.17 2008-03-28 23:29:13 stephena Exp $
// $Id: CartF4SC.cxx,v 1.18 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -26,17 +26,7 @@
CartridgeF4SC::CartridgeF4SC(const uInt8* image)
{
// Copy the ROM image into my buffer
for(uInt32 addr = 0; addr < 32768; ++addr)
{
myImage[addr] = image[addr];
}
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 128; ++i)
{
myRAM[i] = random.next();
}
memcpy(myImage, image, 32768);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -47,6 +37,11 @@ CartridgeF4SC::~CartridgeF4SC()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeF4SC::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 128; ++i)
myRAM[i] = random.next();
// Upon reset we switch to bank 0
bank(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: CartF6SC.cxx,v 1.16 2008-03-28 23:29:13 stephena Exp $
// $Id: CartF6SC.cxx,v 1.17 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -26,17 +26,7 @@
CartridgeF6SC::CartridgeF6SC(const uInt8* image)
{
// Copy the ROM image into my buffer
for(uInt32 addr = 0; addr < 16384; ++addr)
{
myImage[addr] = image[addr];
}
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 128; ++i)
{
myRAM[i] = random.next();
}
memcpy(myImage, image, 16384);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -47,6 +37,11 @@ CartridgeF6SC::~CartridgeF6SC()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeF6SC::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 128; ++i)
myRAM[i] = random.next();
// Upon reset we switch to bank 0
bank(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: CartF8SC.cxx,v 1.16 2008-03-28 23:29:13 stephena Exp $
// $Id: CartF8SC.cxx,v 1.17 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -26,17 +26,7 @@
CartridgeF8SC::CartridgeF8SC(const uInt8* image)
{
// Copy the ROM image into my buffer
for(uInt32 addr = 0; addr < 8192; ++addr)
{
myImage[addr] = image[addr];
}
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 128; ++i)
{
myRAM[i] = random.next();
}
memcpy(myImage, image, 8192);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -47,6 +37,11 @@ CartridgeF8SC::~CartridgeF8SC()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeF8SC::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 128; ++i)
myRAM[i] = random.next();
// Upon reset we switch to bank 1
bank(1);
}

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: CartFASC.cxx,v 1.16 2008-03-28 23:29:13 stephena Exp $
// $Id: CartFASC.cxx,v 1.17 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -26,17 +26,7 @@
CartridgeFASC::CartridgeFASC(const uInt8* image)
{
// Copy the ROM image into my buffer
for(uInt32 addr = 0; addr < 12288; ++addr)
{
myImage[addr] = image[addr];
}
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 256; ++i)
{
myRAM[i] = random.next();
}
memcpy(myImage, image, 12288);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -47,6 +37,11 @@ CartridgeFASC::~CartridgeFASC()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeFASC::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 256; ++i)
myRAM[i] = random.next();
// Upon reset we switch to bank 2
bank(2);
}

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: CartMC.cxx,v 1.14 2008-02-06 13:45:21 stephena Exp $
// $Id: CartMC.cxx,v 1.15 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#include <cassert>
@ -26,47 +26,28 @@
CartridgeMC::CartridgeMC(const uInt8* image, uInt32 size)
: mySlot3Locked(false)
{
uInt32 i;
// Make sure size is reasonable
assert(size <= 128 * 1024);
// Allocate array for the cart's RAM
myRAM = new uInt8[32 * 1024];
// Initialize RAM with random values
class Random random;
for(i = 0; i < 32 * 1024; ++i)
{
myRAM[i] = random.next();
}
// Allocate array for the ROM image
myImage = new uInt8[128 * 1024];
assert(size <= 131072);
// Set the contents of the entire ROM to 0
for(i = 0; i < 128 * 1024; ++i)
{
myImage[i] = 0;
}
memset(myImage, 0, 131072);
// Copy the ROM image to the end of the ROM buffer
for(i = 0; i < size; ++i)
{
myImage[128 * 1024 - size + i] = image[i];
}
memcpy(myImage + 131072 - size, image, size);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeMC::~CartridgeMC()
{
delete[] myRAM;
delete[] myImage;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeMC::reset()
{
// Initialize RAM with random values
class Random random;
for(uInt32 i = 0; i < 32768; ++i)
myRAM[i] = random.next();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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: CartMC.hxx,v 1.10 2008-02-06 13:45:21 stephena Exp $
// $Id: CartMC.hxx,v 1.11 2008-08-01 12:15:58 stephena Exp $
//============================================================================
#ifndef CARTRIDGEMC_HXX
@ -133,7 +133,7 @@ class System;
@author Bradford W. Mott
@version $Id: CartMC.hxx,v 1.10 2008-02-06 13:45:21 stephena Exp $
@version $Id: CartMC.hxx,v 1.11 2008-08-01 12:15:58 stephena Exp $
*/
class CartridgeMC : public Cartridge
{
@ -243,17 +243,17 @@ class CartridgeMC : public Cartridge
virtual void poke(uInt16 address, uInt8 value);
private:
// The 128K ROM image for the cartridge
uInt8 myImage[131072];
// The 32K of RAM for the cartridge
uInt8 myRAM[32768];
// Indicates which block is currently active for the four segments
uInt8 myCurrentBlock[4];
// Indicates if slot 3 is locked to block $FF or not
bool mySlot3Locked;
// Pointer to the 32K bytes of RAM for the cartridge
uInt8* myRAM;
// Pointer to the 128K bytes of ROM for the cartridge
uInt8* myImage;
};
#endif

View File

@ -2957,7 +2957,7 @@ static const char* DefProps[DEF_PROPS_SIZE][21] = {
{ "fc6052438f339aea373bbc999433388a", "Atari, David Crane", "CX2653P", "Slot Machine (1979) (Atari) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "fc668a2251dd79cbd903d4fa0e558f96", "", "", "Thrust (V1.1) (2000) (TJ) [a1]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "fc92d74f073a44bc6e46a3b3fa8256a2", "", "", "Megademo (19xx) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "fc9c1652fe3a2cade6188f4d3692481f", "", "", "Andrew Davies early notBoulderDash demo (NTSC)", "", "", "", "", "", "", "", "", "", "", "", "NTSC", "", "", "YES", "", "" },
{ "fc9c1652fe3a2cade6188f4d3692481f", "", "", "Andrew Davies early notBoulderDash demo (NTSC)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
{ "fca4a5be1251927027f2c24774a02160", "Activision, John Van Ryzin", "AZ-036-04", "H.E.R.O. (1984) (Activision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "fcea12625c071ddc49f4e409f4038c60", "Fabrizio Zavagli", "", "Balls! (16-09-2002) (Fabrizio Zavagli)", "", "Homebrew", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
{ "fcf8e306f6615f74feba5cb25550038c", "", "", "Blue Dot Demo (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },

View File

@ -1,4 +1,4 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
@ -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: FrameBuffer.cxx,v 1.137 2008-07-25 12:41:41 stephena Exp $
// $Id: FrameBuffer.cxx,v 1.138 2008-08-01 12:15:59 stephena Exp $
//============================================================================
#include <algorithm>
@ -629,6 +629,8 @@ const StringMap& FrameBuffer::supportedTIAFilters(const string& type)
{
uInt32 max_zoom = maxWindowSizeForScreen(320, 210,
myOSystem->desktopWidth(), myOSystem->desktopHeight());
uInt8 mask = (type == "soft" ? 0x1 : 0x2);
#ifdef SMALL_SCREEN
uInt32 firstmode = 0;
#else
@ -639,7 +641,7 @@ const StringMap& FrameBuffer::supportedTIAFilters(const string& type)
{
// For now, just include all filters
// This will change once OpenGL-only filters are added
if(ourGraphicsModes[i].zoom <= max_zoom)
if((ourGraphicsModes[i].avail & mask) && ourGraphicsModes[i].zoom <= max_zoom)
{
myTIAFilters.push_back(ourGraphicsModes[i].description,
ourGraphicsModes[i].name);

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: FrameBuffer.hxx,v 1.102 2008-07-25 12:41:41 stephena Exp $
// $Id: FrameBuffer.hxx,v 1.103 2008-08-01 12:16:00 stephena Exp $
//============================================================================
#ifndef FRAMEBUFFER_HXX
@ -90,7 +90,7 @@ enum {
turn drawn here as well.
@author Stephen Anthony
@version $Id: FrameBuffer.hxx,v 1.102 2008-07-25 12:41:41 stephena Exp $
@version $Id: FrameBuffer.hxx,v 1.103 2008-08-01 12:16:00 stephena Exp $
*/
class FrameBuffer
{
@ -511,7 +511,7 @@ class FrameBuffer
FrameBuffer type.
@author Stephen Anthony
@version $Id: FrameBuffer.hxx,v 1.102 2008-07-25 12:41:41 stephena Exp $
@version $Id: FrameBuffer.hxx,v 1.103 2008-08-01 12:16:00 stephena Exp $
*/
// Text alignment modes for drawString()
enum TextAlignment {
@ -615,6 +615,12 @@ class FBSurface
*/
virtual void setPos(uInt32 x, uInt32 y) = 0;
/**
This method answers the current dimensions of the surface.
*/
virtual uInt32 getWidth() const = 0;
virtual uInt32 getHeight() const = 0;
/**
This method sets the width of the drawable area of the surface.
*/

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: M6532.cxx,v 1.27 2008-05-22 17:54:54 stephena Exp $
// $Id: M6532.cxx,v 1.28 2008-08-01 12:16:00 stephena Exp $
//============================================================================
#include <assert.h>
@ -30,15 +30,6 @@
M6532::M6532(const Console& console)
: myConsole(console)
{
// Randomize the 128 bytes of memory
class Random random;
for(uInt32 t = 0; t < 128; ++t)
{
myRAM[t] = random.next();
}
// Initialize other data members
reset();
}
@ -52,6 +43,10 @@ void M6532::reset()
{
class Random random;
// Randomize the 128 bytes of memory
for(uInt32 t = 0; t < 128; ++t)
myRAM[t] = random.next();
// The timer absolutely cannot be initialized to zero; some games will
// loop or hang (notably Solaris and H.E.R.O.)
myTimer = (0xff - (random.next() % 0xfe)) << 10;

View File

@ -17617,7 +17617,6 @@
"Cartridge.MD5" "fc9c1652fe3a2cade6188f4d3692481f"
"Cartridge.Name" "Andrew Davies early notBoulderDash demo (NTSC)"
"Display.Format" "NTSC"
"Display.Phosphor" "YES"
""

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: BrowserDialog.cxx,v 1.31 2008-06-13 13:14:51 stephena Exp $
// $Id: BrowserDialog.cxx,v 1.32 2008-08-01 12:16:00 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -180,9 +180,6 @@ void BrowserDialog::updateListing()
// Only hilite the 'up' button if there's a parent directory
_goUpButton->setEnabled(_node.hasParent());
// Finally, redraw
setDirty(); draw();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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: Dialog.cxx,v 1.63 2008-06-19 19:15:44 stephena Exp $
// $Id: Dialog.cxx,v 1.64 2008-08-01 12:16:00 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -79,6 +79,16 @@ void Dialog::open()
// Instead, dirty rectangle updates should be performed
if(_surface == NULL)
_surface = instance().frameBuffer().createSurface(_w, _h, _isBase);
else if((uInt32)_w > _surface->getWidth() || (uInt32)_h > _surface->getHeight())
{
delete _surface;
_surface = instance().frameBuffer().createSurface(_w, _h, _isBase);
}
else
{
_surface->setWidth(_w);
_surface->setHeight(_h);
}
center();

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: FileSnapDialog.cxx,v 1.19 2008-06-13 13:14:51 stephena Exp $
// $Id: FileSnapDialog.cxx,v 1.20 2008-08-01 12:16:00 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -137,7 +137,8 @@ FileSnapDialog::FileSnapDialog(
}
// Create file browser dialog
myBrowser = new BrowserDialog(this, font, 60, 20, 200, 200);
// FIXME - let dialog determine its own size
myBrowser = new BrowserDialog(this, font, 0, 0, 300, 300);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -199,6 +200,7 @@ void FileSnapDialog::setDefaults()
void FileSnapDialog::openBrowser(const string& title, const string& startpath,
FilesystemNode::ListMode mode, int cmd)
{
cerr << " ==> add browser: " << title << " -> " << startpath << endl;
parent().addDialog(myBrowser);
myBrowser->setTitle(title);

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: GameInfoDialog.cxx,v 1.58 2008-07-25 12:41:41 stephena Exp $
// $Id: GameInfoDialog.cxx,v 1.59 2008-08-01 12:16:00 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -452,7 +452,8 @@ void GameInfoDialog::saveConfig()
// Controller properties
myGameProperties.set(Controller_Left, myP0Controller->getSelectedTag());
myGameProperties.set(Controller_Right, myP1Controller->getSelectedTag());
myGameProperties.set(Console_SwapPorts, myLeftPort->getSelectedTag());
myGameProperties.set(Console_SwapPorts,
myLeftPort->getSelectedTag() == "L" ? "NO" : "YES");
myGameProperties.set(Controller_SwapPaddles, mySwapPaddles->getSelectedTag());
// Display properties

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: OptionsDialog.cxx,v 1.70 2008-06-13 13:14:51 stephena Exp $
// $Id: OptionsDialog.cxx,v 1.71 2008-08-01 12:16:00 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -48,7 +48,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent,
GuiObject* boss, bool global)
: Dialog(osystem, parent, 0, 0, 1, 1),
: Dialog(osystem, parent, 0, 0, 0, 0),
myVideoDialog(NULL),
myAudioDialog(NULL),
myInputDialog(NULL),

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: RomAuditDialog.cxx,v 1.4 2008-06-13 13:14:51 stephena Exp $
// $Id: RomAuditDialog.cxx,v 1.5 2008-08-01 12:16:00 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -99,7 +99,7 @@ RomAuditDialog::RomAuditDialog(OSystem* osystem, DialogContainer* parent,
addToFocusList(wid);
// Create file browser dialog
myBrowser = new BrowserDialog(this, font, 60, 20, 200, 200);
myBrowser = new BrowserDialog(this, font, 0, 0, 200, 200);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -