mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +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:
parent
d1ac54fe92
commit
6123349b79
@ -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;
|
||||
|
@ -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_;
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user