diff --git a/src/emucore/Joystick.cxx b/src/emucore/Joystick.cxx index 6974cfdf1..1c18045b9 100644 --- a/src/emucore/Joystick.cxx +++ b/src/emucore/Joystick.cxx @@ -110,8 +110,7 @@ void Joystick::updateDigitalAxes() setPin(DigitalPin::One, myEvent.get(myUpEvent) == 0); setPin(DigitalPin::Two, myEvent.get(myDownEvent) == 0); setPin(DigitalPin::Three, myEvent.get(myLeftEvent) == 0); - setPin(DigitalPin::Four, myEvent.get(myRightEvent) != 1); - cerr << myEvent.get(myRightEvent) << endl; + setPin(DigitalPin::Four, myEvent.get(myRightEvent) == 0); } //// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index 119e55340..7c291a3ed 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -2009,14 +2009,14 @@ void TIA::updateDumpPorts(uInt8 value) if(myArePortsDumped != newIsDumped) { myArePortsDumped = newIsDumped; - myDumpPortsTimestamp = myTimestamp; + myDumpPortsCycles = mySystem->cycles() + Delay::vblank; } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Int64 TIA::dumpPortsCycles() { - return (myTimestamp - myDumpPortsTimestamp) / 3; + return mySystem->cycles() - myDumpPortsCycles; } #ifdef DEBUGGER_SUPPORT diff --git a/src/emucore/tia/TIA.hxx b/src/emucore/tia/TIA.hxx index 6367e5667..11de48d48 100644 --- a/src/emucore/tia/TIA.hxx +++ b/src/emucore/tia/TIA.hxx @@ -920,7 +920,7 @@ class TIA : public Device /** * The number of CPU clocks since the last dump ports state change. */ - uInt64 myDumpPortsTimestamp{0}; + uInt64 myDumpPortsCycles{0}; /** * The current dump ports state.