created branch

This commit is contained in:
thrust26 2021-02-05 19:27:35 +01:00
parent 54f33da48d
commit 783b30d78a
4 changed files with 10 additions and 6 deletions

View File

@ -68,6 +68,10 @@ void Driving::update()
updateDigitalAxes();
updateMouseAxes();
// Only consider the lower-most bits (corresponding to pins 1 & 2)
myGrayIndex = Int32(myCounter * SENSITIVITY / 4.0F) & 0b11;
updateStelladaptorAxes();
// Gray codes for rotation
@ -117,9 +121,6 @@ void Driving::updateDigitalAxes()
--myCounter;
else if(myEvent.get(myCWEvent) != 0 || d_axis > 16384)
++myCounter;
// Only consider the lower-most bits (corresponding to pins 1 & 2)
myGrayIndex = Int32(myCounter * SENSITIVITY / 4.0F) & 0b11;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -99,7 +99,7 @@ void Joystick::updateMouseButtons(bool& pressedLeft, bool& pressedRight)
if(myControlID > -1)
{
pressedLeft |= (myEvent.get(Event::MouseButtonLeftValue) != 0);
pressedRight |= (pressedRight || myEvent.get(Event::MouseButtonRightValue) != 0);
pressedRight |= (myEvent.get(Event::MouseButtonRightValue) != 0);
}
}
@ -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

@ -122,6 +122,7 @@ bool QuadTari::read(DigitalPin pin)
else
// If bit 7 of VBlank is not set, read first, else second controller
readFirst = !(mySystem.tia().registerValue(VBLANK) & 0x80);
cerr << mySystem.tia().dumpPortsCycles() << " ";
if(readFirst)
return myFirstController->read(pin);

View File

@ -1688,6 +1688,7 @@ void TIA::delayedWrite(uInt8 address, uInt8 value)
case VBLANK:
flushLineCache();
myFrameManager->setVblank(value & 0x02);
//updateDumpPorts(value);
break;
case HMOVE:
@ -2010,6 +2011,7 @@ void TIA::updateDumpPorts(uInt8 value)
{
myArePortsDumped = newIsDumped;
myDumpPortsTimestamp = myTimestamp;
//myDumpPortsTimestamp = mySystem->cycles();
}
}
@ -2017,6 +2019,7 @@ void TIA::updateDumpPorts(uInt8 value)
Int64 TIA::dumpPortsCycles()
{
return (myTimestamp - myDumpPortsTimestamp) / 3;
//return mySystem->cycles() - myDumpPortsTimestamp;
}
#ifdef DEBUGGER_SUPPORT