Added 'fastscbios' commandline boolean argument, which affects how fast

the vertical bars are drawn in the SuperCharger BIOS roms.  When this is
set to true, each bar is drawn as fast as possible, to speed up loading
of SC BIOS.  Requested by various people on AtariAge.

Still TODO is add a GUI checkbox for this (figure out exactly where in
the settings this item belongs).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1142 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2006-11-08 00:09:53 +00:00
parent a4eea07b85
commit 340b0770b2
6 changed files with 35 additions and 24 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.20 2006-06-12 14:12:51 stephena Exp $
// $Id: Cart.cxx,v 1.21 2006-11-08 00:09:53 stephena Exp $
//============================================================================
#include <assert.h>
@ -43,10 +43,11 @@
#include "CartUA.hxx"
#include "MD5.hxx"
#include "Props.hxx"
#include "Settings.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
const Properties& properties)
const Properties& properties, const Settings& settings)
{
Cartridge* cartridge = 0;
@ -69,7 +70,7 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
else if(type == "4K")
cartridge = new Cartridge4K(image);
else if(type == "AR")
cartridge = new CartridgeAR(image, size);
cartridge = new CartridgeAR(image, size, settings.getBool("fastscbios"));
else if(type == "DPC")
cartridge = new CartridgeDPC(image, size);
else if(type == "E0")

View File

@ -13,15 +13,16 @@
// 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.9 2005-10-12 03:32:28 urchlay Exp $
// $Id: Cart.hxx,v 1.10 2006-11-08 00:09:53 stephena Exp $
//============================================================================
#ifndef CARTRIDGE_HXX
#define CARTRIDGE_HXX
class Cartridge;
class Properties;
class System;
class Properties;
class Settings;
#include <fstream>
#include "bspf.hxx"
@ -32,7 +33,7 @@ class System;
game and handles any bankswitching performed by the cartridge.
@author Bradford W. Mott
@version $Id: Cart.hxx,v 1.9 2005-10-12 03:32:28 urchlay Exp $
@version $Id: Cart.hxx,v 1.10 2006-11-08 00:09:53 stephena Exp $
*/
class Cartridge : public Device
{
@ -41,13 +42,14 @@ class Cartridge : public Device
Create a new cartridge object allocated on the heap. The
type of cartridge created depends on the properties object.
@param image A pointer to the ROM image
@param size The size of the ROM image
@param properties The properties associated with the game
@return Pointer to the new cartridge object allocated on the heap
@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 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& properties);
const Properties& props, const Settings& settings);
public:
/**

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.14 2005-12-23 20:48:50 stephena Exp $
// $Id: CartAR.cxx,v 1.15 2006-11-08 00:09:53 stephena Exp $
//============================================================================
#include <assert.h>
@ -27,7 +27,7 @@
#include <iostream>
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeAR::CartridgeAR(const uInt8* image, uInt32 size)
CartridgeAR::CartridgeAR(const uInt8* image, uInt32 size, bool fastbios)
: my6502(0)
{
uInt32 i;
@ -45,7 +45,7 @@ CartridgeAR::CartridgeAR(const uInt8* image, uInt32 size)
}
// Initialize SC BIOS ROM
initializeROM();
initializeROM(fastbios);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -319,7 +319,7 @@ int CartridgeAR::bankCount()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeAR::initializeROM()
void CartridgeAR::initializeROM(bool fastbios)
{
static uInt8 dummyROMCode[] = {
0xa5, 0xfa, 0x85, 0x80, 0x4c, 0x18, 0xf8, 0xff,
@ -361,6 +361,11 @@ void CartridgeAR::initializeROM()
0x4c
};
// If fastbios is enabled, set the wait time between vertical bars
// to 0 (default is 8), which is stored at address 189 of the bios
if(fastbios)
dummyROMCode[189] = 0x0;
uInt32 size = sizeof(dummyROMCode);
// Initialize ROM with illegal 6502 opcode that causes a real 6502 to jam

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.hxx,v 1.8 2005-07-30 16:58:22 urchlay Exp $
// $Id: CartAR.hxx,v 1.9 2006-11-08 00:09:53 stephena Exp $
//============================================================================
#ifndef CARTRIDGEAR_HXX
@ -37,7 +37,7 @@ class Deserializer;
and one bank of ROM. All 6K of the RAM can be read and written.
@author Bradford W. Mott
@version $Id: CartAR.hxx,v 1.8 2005-07-30 16:58:22 urchlay Exp $
@version $Id: CartAR.hxx,v 1.9 2006-11-08 00:09:53 stephena Exp $
*/
class CartridgeAR : public Cartridge
{
@ -45,10 +45,11 @@ class CartridgeAR : public Cartridge
/**
Create a new cartridge using the specified image and size
@param image Pointer to the ROM image
@param size The size of the ROM image
@param image Pointer to the ROM image
@param size The size of the ROM image
@param fastbios Whether or not to quickly execute the BIOS code
*/
CartridgeAR(const uInt8* image, uInt32 size);
CartridgeAR(const uInt8* image, uInt32 size, bool fastbios);
/**
Destructor
@ -140,7 +141,7 @@ class CartridgeAR : public Cartridge
void loadIntoRAM(uInt8 load);
// Sets up a "dummy" BIOS ROM in the ROM bank of the cartridge
void initializeROM();
void initializeROM(bool fastbios);
private:
// Pointer to the 6502 processor in the system

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.97 2006-11-04 19:38:24 stephena Exp $
// $Id: Console.cxx,v 1.98 2006-11-08 00:09:53 stephena Exp $
//============================================================================
#include <assert.h>
@ -207,7 +207,8 @@ Console::Console(const uInt8* image, uInt32 size, const string& md5,
M6532* m6532 = new M6532(*this);
TIA *tia = new TIA(*this, myOSystem->settings());
tia->setSound(myOSystem->sound());
Cartridge* cartridge = Cartridge::create(image, size, myProperties);
Cartridge* cartridge = Cartridge::create(image, size, myProperties,
myOSystem->settings());
if(!cartridge)
return;

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: Settings.cxx,v 1.88 2006-11-06 00:52:03 stephena Exp $
// $Id: Settings.cxx,v 1.89 2006-11-08 00:09:53 stephena Exp $
//============================================================================
#include <cassert>
@ -83,6 +83,7 @@ Settings::Settings(OSystem* osystem)
setInternal("tiadefaults", "false");
setInternal("autoslot", "false");
setInternal("fastscbios", "false");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -