mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-28 06:29:37 +00:00
Separate out TED calls, to aid with logging.
This commit is contained in:
parent
6b7edac6e4
commit
891d5c2066
@ -172,7 +172,20 @@ public:
|
|||||||
timers_.tick(timers_cycles.as<int>());
|
timers_.tick(timers_cycles.as<int>());
|
||||||
|
|
||||||
// Perform actual access.
|
// Perform actual access.
|
||||||
if(address >= 0xff00 && address < 0xff40) {
|
if(address < 0xfd00 || address >= 0xff40) {
|
||||||
|
if(isReadOperation(operation)) {
|
||||||
|
*value = map_.read(address);
|
||||||
|
} else {
|
||||||
|
map_.write(address) = *value;
|
||||||
|
}
|
||||||
|
} else if(address < 0xff00) {
|
||||||
|
// Miscellaneous hardware. All TODO.
|
||||||
|
// if(isReadOperation(operation)) {
|
||||||
|
// printf("TODO: read @ %04x\n", address);
|
||||||
|
// } else {
|
||||||
|
// printf("TODO: write of %02x @ %04x\n", *value, address);
|
||||||
|
// }
|
||||||
|
} else {
|
||||||
if(isReadOperation(operation)) {
|
if(isReadOperation(operation)) {
|
||||||
switch(address) {
|
switch(address) {
|
||||||
case 0xff00: *value = timers_.read<0>(); break;
|
case 0xff00: *value = timers_.read<0>(); break;
|
||||||
@ -181,6 +194,9 @@ public:
|
|||||||
case 0xff03: *value = timers_.read<3>(); break;
|
case 0xff03: *value = timers_.read<3>(); break;
|
||||||
case 0xff04: *value = timers_.read<4>(); break;
|
case 0xff04: *value = timers_.read<4>(); break;
|
||||||
case 0xff05: *value = timers_.read<5>(); break;
|
case 0xff05: *value = timers_.read<5>(); break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
printf("TODO: TED read at %04x\n", address);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch(address) {
|
switch(address) {
|
||||||
@ -190,25 +206,13 @@ public:
|
|||||||
case 0xff03: timers_.write<3>(*value); break;
|
case 0xff03: timers_.write<3>(*value); break;
|
||||||
case 0xff04: timers_.write<4>(*value); break;
|
case 0xff04: timers_.write<4>(*value); break;
|
||||||
case 0xff05: timers_.write<5>(*value); break;
|
case 0xff05: timers_.write<5>(*value); break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
printf("TODO: TED write at %04x\n", address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(address >= 0xfd00 && address < 0xff40) {
|
|
||||||
if(isReadOperation(operation)) {
|
|
||||||
printf("TODO: TED read @ %04x\n", address);
|
|
||||||
} else {
|
|
||||||
printf("TODO: TED write of %02x @ %04x\n", *value, address);
|
|
||||||
}
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isReadOperation(operation)) {
|
|
||||||
*value = map_.read(address);
|
|
||||||
} else {
|
|
||||||
map_.write(address) = *value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user