1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Stubs in control registers and disables exit-on-miss.

I think I may be running up against the limits of stubbing now. Probably time to implement some stuff.
This commit is contained in:
Thomas Harte 2021-07-22 19:28:01 -04:00
parent d1ac54fe92
commit 6123349b79
2 changed files with 12 additions and 2 deletions

View File

@ -61,9 +61,16 @@ void MOS6526<BusHandlerT, personality>::write(int address, uint8_t value) {
update_interrupts();
break;
// Control.
case 14:
case 15:
registers_.control[address - 14] = value;
printf("Ignoring control write: %02x to %d\n", value, address);
break;
default:
printf("Unhandled 6526 write: %02x to %d\n", value, address);
assert(false);
// assert(false);
break;
}
}
@ -79,10 +86,12 @@ uint8_t MOS6526<BusHandlerT, personality>::read(int address) {
case 2: case 3:
return registers_.data_direction[address - 2];
case 14: case 15:
return registers_.control[address - 14];
default:
printf("Unhandled 6526 read from %d\n", address);
assert(false);
// assert(false);
break;
}
return 0xff;

View File

@ -18,6 +18,7 @@ struct MOS6526Storage {
uint8_t output[2] = {0, 0};
uint8_t data_direction[2] = {0, 0};
uint8_t interrupt_control_ = 0;
uint8_t control[2] = {0, 0};
} registers_;
};