mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-03 11:30:02 +00:00
Made an attempt at implementing the loopbacks necessary for diagnostics.
This commit is contained in:
parent
41e7eff6c8
commit
8867ad647c
|
@ -27,6 +27,21 @@ namespace Oric {
|
||||||
class VIA: public MOS::MOS6522<VIA>, public MOS::MOS6522IRQDelegate {
|
class VIA: public MOS::MOS6522<VIA>, public MOS::MOS6522IRQDelegate {
|
||||||
public:
|
public:
|
||||||
using MOS6522IRQDelegate::set_interrupt_status;
|
using MOS6522IRQDelegate::set_interrupt_status;
|
||||||
|
|
||||||
|
void set_port_output(Port port, uint8_t value, uint8_t direction_mask) {
|
||||||
|
port_outputs[port] = value;
|
||||||
|
if(port)
|
||||||
|
set_control_line_input(port, Line::One, (value << 1)&value&128);
|
||||||
|
}
|
||||||
|
uint8_t get_port_input(Port port) {
|
||||||
|
if(port)
|
||||||
|
{
|
||||||
|
return port_outputs[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return (uint8_t)((port_outputs[port] >> 4) | (port_outputs[port] << 4));
|
||||||
|
}
|
||||||
|
uint8_t port_outputs[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
class Machine:
|
class Machine:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user