mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-27 20:32:55 +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.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) {
|
||||
|
Loading…
Reference in New Issue
Block a user