mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-11 02:29:50 +00:00
Wire up the MC6850 events to the board
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
df7c7904f4
commit
861fc28bba
@ -28,6 +28,12 @@ void Board::initialise() {
|
|||||||
ACIA().Accessing.connect(std::bind(&Board::Acia_Accessing, this, std::placeholders::_1));
|
ACIA().Accessing.connect(std::bind(&Board::Acia_Accessing, this, std::placeholders::_1));
|
||||||
ACIA().Accessed.connect(std::bind(&Board::Acia_Accessed, this, std::placeholders::_1));
|
ACIA().Accessed.connect(std::bind(&Board::Acia_Accessed, this, std::placeholders::_1));
|
||||||
|
|
||||||
|
ACIA().Transmitting.connect(std::bind(&Board::Acia_Transmitting, this, std::placeholders::_1));
|
||||||
|
ACIA().Transmitted.connect(std::bind(&Board::Acia_Transmitted, this, std::placeholders::_1));
|
||||||
|
|
||||||
|
ACIA().Receiving.connect(std::bind(&Board::Acia_Receiving, this, std::placeholders::_1));
|
||||||
|
ACIA().Received.connect(std::bind(&Board::Acia_Received, this, std::placeholders::_1));
|
||||||
|
|
||||||
CPU().powerOn();
|
CPU().powerOn();
|
||||||
CPU().raise(CPU().NMI());
|
CPU().raise(CPU().NMI());
|
||||||
CPU().raise(CPU().FIRQ());
|
CPU().raise(CPU().FIRQ());
|
||||||
@ -93,10 +99,24 @@ void Board::Cpu_ExecutedInstruction_Acia(EightBit::mc6809&) {
|
|||||||
|
|
||||||
void Board::Acia_Accessing(EightBit::EventArgs&) {
|
void Board::Acia_Accessing(EightBit::EventArgs&) {
|
||||||
if (_kbhit()) {
|
if (_kbhit()) {
|
||||||
ACIA().DATA() = _getch();
|
ACIA().RDR() = _getch();
|
||||||
ACIA().fillRDR();
|
ACIA().markReceiveStarting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Board::Acia_Accessed(EightBit::EventArgs&) {
|
void Board::Acia_Accessed(EightBit::EventArgs&) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Board::Acia_Transmitting(EightBit::EventArgs&) {
|
||||||
|
std::cout << ACIA().TDR();
|
||||||
|
ACIA().markTransmitComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Board::Acia_Transmitted(EightBit::EventArgs&) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void Board::Acia_Receiving(EightBit::EventArgs&) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void Board::Acia_Received(EightBit::EventArgs&) {
|
||||||
|
}
|
@ -46,9 +46,6 @@ private:
|
|||||||
EightBit::register16_t m_disassembleAt = 0x0000;
|
EightBit::register16_t m_disassembleAt = 0x0000;
|
||||||
bool m_ignoreDisassembly = false;
|
bool m_ignoreDisassembly = false;
|
||||||
|
|
||||||
uint64_t m_pollCounter = 0UL;
|
|
||||||
uint64_t m_pollInterval = 2000000 / 50;
|
|
||||||
|
|
||||||
void Cpu_ExecutingInstruction_Debug(EightBit::mc6809&);
|
void Cpu_ExecutingInstruction_Debug(EightBit::mc6809&);
|
||||||
void Cpu_ExecutedInstruction_Debug(EightBit::mc6809&);
|
void Cpu_ExecutedInstruction_Debug(EightBit::mc6809&);
|
||||||
|
|
||||||
@ -64,5 +61,11 @@ private:
|
|||||||
void Acia_Accessing(EightBit::EventArgs&);
|
void Acia_Accessing(EightBit::EventArgs&);
|
||||||
void Acia_Accessed(EightBit::EventArgs&);
|
void Acia_Accessed(EightBit::EventArgs&);
|
||||||
|
|
||||||
|
void Acia_Transmitting(EightBit::EventArgs&);
|
||||||
|
void Acia_Transmitted(EightBit::EventArgs&);
|
||||||
|
|
||||||
|
void Acia_Receiving(EightBit::EventArgs&);
|
||||||
|
void Acia_Received(EightBit::EventArgs&);
|
||||||
|
|
||||||
void updateAciaPins(EightBit::Chip::PinLevel rw);
|
void updateAciaPins(EightBit::Chip::PinLevel rw);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user