1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-28 06:29:37 +00:00

Add some logging.

This commit is contained in:
Thomas Harte 2024-12-09 22:22:20 -05:00
parent cbde504057
commit 064c4b4312

View File

@ -63,6 +63,12 @@ public:
ConcreteMachine(const Analyser::Static::Commodore::Target &target, const ROMMachine::ROMFetcher &rom_fetcher) : ConcreteMachine(const Analyser::Static::Commodore::Target &target, const ROMMachine::ROMFetcher &rom_fetcher) :
m6502_(*this) m6502_(*this)
{ {
// PAL: 8'867'240 divided by 5 or 4?
// NTSC: 7'159'090?
// i.e. colour subcarriers multiplied by two?
set_clock_rate(8'867'240); // TODO.
const auto kernel = ROM::Name::Plus4KernelPALv5; const auto kernel = ROM::Name::Plus4KernelPALv5;
const auto basic = ROM::Name::Plus4BASIC; const auto basic = ROM::Name::Plus4BASIC;
@ -88,11 +94,24 @@ public:
const uint16_t address, const uint16_t address,
uint8_t *const value uint8_t *const value
) { ) {
(void)operation; // printf("%04x\n", address);
(void)address;
(void)value;
return Cycles(1); 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 Cycles(5);
}
if(isReadOperation(operation)) {
*value = map_.read(address);
} else {
map_.write(address) = *value;
}
return Cycles(5);
} }
private: private: