fixed QuadTari multiplexing timing (fixes #766)

This commit is contained in:
thrust26 2021-02-06 10:27:17 +01:00
parent 54f33da48d
commit d3f250a516
3 changed files with 4 additions and 5 deletions

View File

@ -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);
}
//// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -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

View File

@ -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.