Add R/W pins to the MC6809 and MOS6502 processors. Hoping it'll ease peripheral development.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2019-09-15 12:49:32 +01:00
parent 1ba238bfc7
commit ee3ecc682d
6 changed files with 72 additions and 52 deletions
+3 -7
View File
@@ -68,13 +68,9 @@ namespace EightBit {
static constexpr auto lowered(const PinLevel line) { return line == PinLevel::Low; }
static void lower(PinLevel& line) noexcept { line = PinLevel::Low; }
static void match(PinLevel& line, int condition) {
match(line, condition != 0);
}
static void match(PinLevel& line, bool condition) {
condition ? raise(line) : lower(line);
}
static void match(PinLevel& line, int condition) { match(line, condition != 0); }
static void match(PinLevel& line, bool condition) { condition ? raise(line) : lower(line); }
static void match(PinLevel& out, PinLevel in) { out = in; }
virtual ~Device() {};