1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-06-18 14:29:32 +00:00

minor change

This commit is contained in:
steve 2023-09-30 12:51:46 +01:00
parent 279bbc6b5a
commit 78e3fff5c3

View File

@ -27,7 +27,7 @@ void PIA::write(Memory::address a, uint8_t b) {
Serial.print(' ');
Serial.println(b, 16);
#endif
switch(a % 4) {
switch(a & 3) {
case 0:
output_selected(cra)? write_porta(b): write_ddra(b);
break;
@ -49,7 +49,7 @@ uint8_t PIA::read(Memory::address a) {
Serial.print(" < ");
Serial.println(a, 16);
#endif
switch (a % 4) {
switch (a & 3) {
case 0:
return output_selected(cra)? read_porta(): read_ddra();
case 1:
@ -59,7 +59,6 @@ uint8_t PIA::read(Memory::address a) {
case 3:
return read_crb();
}
return 0xff;
}
void PIA::checkpoint(Stream &s) {