mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-21 12:29:51 +00:00
minor updates
This commit is contained in:
parent
3e90841500
commit
b3e9fb9c2f
@ -25,4 +25,10 @@ extern class spiram sram;
|
||||
extern class Memory memory;
|
||||
#endif
|
||||
|
||||
#if defined(DEBUGGING)
|
||||
#define DBG(x) Serial.x
|
||||
#else
|
||||
#define DBG(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
14
pia.cpp
14
pia.cpp
@ -177,3 +177,17 @@ uint8_t PIA::read_portb() {
|
||||
irq_b1 = irq_b2 = false;
|
||||
return (inb & ~ddrb) | (outb & ddrb);
|
||||
}
|
||||
|
||||
void PIA::write_porta_in_bit(uint8_t mask, bool state) {
|
||||
if (state)
|
||||
ina |= mask;
|
||||
else
|
||||
ina &= ~mask;
|
||||
}
|
||||
|
||||
void PIA::write_portb_in_bit(uint8_t mask, bool state) {
|
||||
if (state)
|
||||
inb |= mask;
|
||||
else
|
||||
inb &= ~mask;
|
||||
}
|
||||
|
2
pia.h
2
pia.h
@ -23,9 +23,11 @@ public:
|
||||
|
||||
// device input (external) interface
|
||||
void write_porta_in(uint8_t b) { ina = b; }
|
||||
void write_porta_in_bit(uint8_t, bool);
|
||||
void write_ca1(bool);
|
||||
void write_ca2(bool);
|
||||
void write_portb_in(uint8_t b) { inb = b; }
|
||||
void write_portb_in_bit(uint8_t, bool);
|
||||
void write_cb1(bool);
|
||||
void write_cb2(bool);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user