1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-06 01:28:57 +00:00

Improved commenting and initial state communication.

This commit is contained in:
Thomas Harte 2016-07-05 20:57:31 -04:00
parent 1e6d90de17
commit 6c4fa4ec5d
2 changed files with 7 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class SerialPortVIA: public MOS::MOS6522<SerialPortVIA>, public MOS::MOS6522IRQD
case ::Commodore::Serial::Line::Clock: _portB = (_portB & ~0x04) | (value ? 0 : 0x04); break;
case ::Commodore::Serial::Line::Attention:
_portB = (_portB & ~0x80) | (value ? 0 : 0x80);
set_control_line_input(Port::B, Line::Two, value);
set_control_line_input(Port::B, Line::Two, !value); // from active low to active high
break;
}
}

View File

@ -14,7 +14,13 @@ void Bus::add_port(std::shared_ptr<Port> port)
{
_ports.push_back(port);
for(int line = (int)ServiceRequest; line <= (int)Reset; line++)
{
// the addition of a new device may change the line output...
set_line_output_did_change((Line)line);
// ... but the new device will need to be told the current state regardless
port->set_input((Line)line, _line_values[line]);
}
}
void Bus::set_line_output_did_change(Line line)