// // 6526Implementation.hpp // Clock Signal // // Created by Thomas Harte on 18/07/2021. // Copyright © 2021 Thomas Harte. All rights reserved. // #ifndef _526Implementation_h #define _526Implementation_h #include #include namespace MOS { namespace MOS6526 { template void MOS6526::write(int address, uint8_t value) { address &= 0xf; switch(address) { case 2: case 3: registers_.data_direction[address - 2] = value; break; default: printf("Unhandled 6526 write: %02x to %d\n", value, address); assert(false); break; } } template uint8_t MOS6526::read(int address) { address &= 0xf; switch(address) { case 2: case 3: return registers_.data_direction[address - 2]; break; default: printf("Unhandled 6526 read from %d\n", address); assert(false); break; } return 0xff; } template void MOS6526::run_for(const HalfCycles half_cycles) { (void)half_cycles; } } } #endif /* _526Implementation_h */