mirror of https://github.com/stella-emu/stella.git
Set undefined bits on TIA read from last data bus value.
This commit is contained in:
parent
0efbbdec45
commit
146d0afe4f
|
@ -288,35 +288,39 @@ uInt8 TIA::peek(uInt16 address)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CXBLPF:
|
case CXBLPF:
|
||||||
result = collCXBLPF();
|
result = collCXBLPF() | (lastDataBusValue & 0x40);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INPT0:
|
case INPT0:
|
||||||
updatePaddle(0);
|
updatePaddle(0);
|
||||||
result = myPaddleReaders[0].inpt(myTimestamp);
|
result = myPaddleReaders[0].inpt(myTimestamp) | (lastDataBusValue & 0x40);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INPT1:
|
case INPT1:
|
||||||
updatePaddle(1);
|
updatePaddle(1);
|
||||||
result = myPaddleReaders[1].inpt(myTimestamp);
|
result = myPaddleReaders[1].inpt(myTimestamp) | (lastDataBusValue & 0x40);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INPT2:
|
case INPT2:
|
||||||
updatePaddle(2);
|
updatePaddle(2);
|
||||||
result = myPaddleReaders[2].inpt(myTimestamp);
|
result = myPaddleReaders[2].inpt(myTimestamp) | (lastDataBusValue & 0x40);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INPT3:
|
case INPT3:
|
||||||
updatePaddle(3);
|
updatePaddle(3);
|
||||||
result = myPaddleReaders[3].inpt(myTimestamp);
|
result = myPaddleReaders[3].inpt(myTimestamp) | (lastDataBusValue & 0x40);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INPT4:
|
case INPT4:
|
||||||
result = myInput0.inpt(!myConsole.leftController().read(Controller::Six));
|
result =
|
||||||
|
myInput0.inpt(!myConsole.leftController().read(Controller::Six)) |
|
||||||
|
(lastDataBusValue & 0x40);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INPT5:
|
case INPT5:
|
||||||
result = myInput1.inpt(!myConsole.rightController().read(Controller::Six));
|
result =
|
||||||
|
myInput1.inpt(!myConsole.rightController().read(Controller::Six)) |
|
||||||
|
(lastDataBusValue & 0x40);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue