mirror of
https://github.com/jscrane/r65emu.git
synced 2024-09-27 13:56:20 +00:00
minor change
This commit is contained in:
parent
279bbc6b5a
commit
78e3fff5c3
5
pia.cpp
5
pia.cpp
@ -27,7 +27,7 @@ void PIA::write(Memory::address a, uint8_t b) {
|
|||||||
Serial.print(' ');
|
Serial.print(' ');
|
||||||
Serial.println(b, 16);
|
Serial.println(b, 16);
|
||||||
#endif
|
#endif
|
||||||
switch(a % 4) {
|
switch(a & 3) {
|
||||||
case 0:
|
case 0:
|
||||||
output_selected(cra)? write_porta(b): write_ddra(b);
|
output_selected(cra)? write_porta(b): write_ddra(b);
|
||||||
break;
|
break;
|
||||||
@ -49,7 +49,7 @@ uint8_t PIA::read(Memory::address a) {
|
|||||||
Serial.print(" < ");
|
Serial.print(" < ");
|
||||||
Serial.println(a, 16);
|
Serial.println(a, 16);
|
||||||
#endif
|
#endif
|
||||||
switch (a % 4) {
|
switch (a & 3) {
|
||||||
case 0:
|
case 0:
|
||||||
return output_selected(cra)? read_porta(): read_ddra();
|
return output_selected(cra)? read_porta(): read_ddra();
|
||||||
case 1:
|
case 1:
|
||||||
@ -59,7 +59,6 @@ uint8_t PIA::read(Memory::address a) {
|
|||||||
case 3:
|
case 3:
|
||||||
return read_crb();
|
return read_crb();
|
||||||
}
|
}
|
||||||
return 0xff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PIA::checkpoint(Stream &s) {
|
void PIA::checkpoint(Stream &s) {
|
||||||
|
Loading…
Reference in New Issue
Block a user