Finished changes to 4A50 class so it compiles again. It's still not

working though.  I think there still needs to be TIA/RIOT chained from
the peek/poke methods.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1395 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2008-01-24 23:43:24 +00:00
parent 41ad0de1fb
commit f0c75eb1ff
2 changed files with 19 additions and 6 deletions

View File

@ -13,13 +13,14 @@
// 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.7 2008-01-24 20:43:41 stephena Exp $
// $Id: Cart4A50.cxx,v 1.8 2008-01-24 23:43:24 stephena Exp $
//============================================================================
#include <cassert>
#include "Random.hxx"
#include "System.hxx"
#include "TIA.hxx"
#include "Cart4A50.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -83,7 +84,7 @@ uInt8 Cartridge4A50::peek(uInt16 address)
if(!(address & 0x1000))
{
// ReadHardware();
bank(address);
checkBankSwitch(address, 0);
}
else
{
@ -126,7 +127,7 @@ void Cartridge4A50::poke(uInt16 address, uInt8 value)
if(!(address & 0x1000))
{
// WriteHardware();
bank(address);
checkBankSwitch(address, value);
}
else
{
@ -158,7 +159,7 @@ void Cartridge4A50::poke(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Cartridge4A50::bank(uInt16 address)
void Cartridge4A50::checkBankSwitch(uInt16 address, uInt8 value)
{
// Not bankswitching in the normal sense
// This scheme contains so many hotspots that it's easier to just check
@ -249,6 +250,12 @@ void Cartridge4A50::bank(uInt16 address)
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Cartridge4A50::bank(uInt16)
{
// Doesn't support bankswitching in the normal sense
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int Cartridge4A50::bank()
{

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.hxx,v 1.8 2008-01-24 20:43:41 stephena Exp $
// $Id: Cart4A50.hxx,v 1.9 2008-01-24 23:43:24 stephena Exp $
//============================================================================
#ifndef CARTRIDGE4A50_HXX
@ -37,7 +37,7 @@ class System;
bytes of ROM.
@author Stephen Anthony
@version $Id: Cart4A50.hxx,v 1.8 2008-01-24 20:43:41 stephena Exp $
@version $Id: Cart4A50.hxx,v 1.9 2008-01-24 23:43:24 stephena Exp $
*/
class Cartridge4A50 : public Cartridge
{
@ -143,6 +143,12 @@ class Cartridge4A50 : public Cartridge
*/
virtual void poke(uInt16 address, uInt8 value);
private:
/**
Check all possible hotspots
*/
void checkBankSwitch(uInt16 address, uInt8 value);
private:
// The 64K ROM image of the cartridge
uInt8 myImage[65536];