mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +00:00
Gets as far as seemingly yet another memory-map setting.
Tomorrow, maybe?
This commit is contained in:
parent
0a91ac5af5
commit
267dd59a59
@ -85,11 +85,25 @@ class ConcreteMachine:
|
||||
forceinline Cycles perform_bus_operation(const CPU::WDC65816::BusOperation operation, const uint32_t address, uint8_t *const value) {
|
||||
const auto ®ion = MemoryMapRegion(memory_, address);
|
||||
|
||||
printf("%06x\n", address);
|
||||
|
||||
if(region.flags & MemoryMap::Region::IsIO) {
|
||||
// TODO: all IO accesses.
|
||||
assert(false);
|
||||
switch(address & 0xffff) {
|
||||
|
||||
// New video register.
|
||||
case 0xc029:
|
||||
if(isReadOperation(operation)) {
|
||||
*value = 0;
|
||||
} else {
|
||||
printf("New video: %02x\n", *value);
|
||||
// TODO: this bit should affect memory bank selection, somehow?
|
||||
// Cf. Page 90.
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// TODO: all other IO accesses.
|
||||
printf("Unhandled IO: %04x\n", address);
|
||||
assert(false);
|
||||
}
|
||||
} else {
|
||||
if(isReadOperation(operation)) {
|
||||
MemoryMapRead(region, address, value);
|
||||
@ -98,6 +112,8 @@ class ConcreteMachine:
|
||||
}
|
||||
}
|
||||
|
||||
printf("%06x [%02x]\n", address, *value);
|
||||
|
||||
Cycles duration = Cycles(5);
|
||||
|
||||
// TODO: determine the cost of this access.
|
||||
|
Loading…
Reference in New Issue
Block a user