diff --git a/stella/src/emucore/TIA.cxx b/stella/src/emucore/TIA.cxx index 51c85c11a..db367dfb2 100644 --- a/stella/src/emucore/TIA.cxx +++ b/stella/src/emucore/TIA.cxx @@ -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: TIA.cxx,v 1.84 2008-02-19 12:33:05 stephena Exp $ +// $Id: TIA.cxx,v 1.85 2008-03-03 17:51:55 estolberg Exp $ //============================================================================ #include @@ -191,6 +191,10 @@ void TIA::reset() myAllowHMOVEBlanks = (myConsole.properties().get(Emulation_HmoveBlanks) == "YES"); + myFloatTIAOutputPins = true; +// (myConsole.properties().get(Emulation_FloatOutputPins) == "YES"); +// TODO: add an actual command line switch to set this + if(myConsole.getFramerate() > 55) // NTSC { myColorLossEnabled = false; @@ -1969,6 +1973,13 @@ uInt8 TIA::peek(uInt16 addr) updateFrame(mySystem->cycles() * 3); uInt8 noise = mySystem->getDataBusState() & 0x3F; + +/* + On certain CMOS EPROM chips the unused TIA pins on a read are not + floating but pulled high. Programmers might want to check their + games for compatibility, so we make this optional. +*/ + if(myFloatTIAOutputPins == false) noise = 0x3F; switch(addr & 0x000f) { diff --git a/stella/src/emucore/TIA.hxx b/stella/src/emucore/TIA.hxx index 5207596b4..5bddf7233 100644 --- a/stella/src/emucore/TIA.hxx +++ b/stella/src/emucore/TIA.hxx @@ -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: TIA.hxx,v 1.45 2008-02-19 12:33:05 stephena Exp $ +// $Id: TIA.hxx,v 1.46 2008-03-03 17:51:55 estolberg Exp $ //============================================================================ #ifndef TIA_HXX @@ -40,7 +40,7 @@ class Settings; be displayed on screen. @author Bradford W. Mott - @version $Id: TIA.hxx,v 1.45 2008-02-19 12:33:05 stephena Exp $ + @version $Id: TIA.hxx,v 1.46 2008-03-03 17:51:55 estolberg Exp $ */ class TIA : public Device , public MediaSource { @@ -506,6 +506,9 @@ class TIA : public Device , public MediaSource // Indicates if we're allowing HMOVE blanks to be enabled bool myAllowHMOVEBlanks; + // Indicates if unused TIA pins are floating on a peek + bool myFloatTIAOutputPins; + // TIA M0 "bug" used for stars in Cosmic Ark flag bool myM0CosmicArkMotionEnabled;