mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-04-21 01:16:50 +00:00
Switch to a memory read/write event driven model. All tests passing.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
@@ -113,7 +113,7 @@ void Board::Memory_ReadByte_Input(const EightBit::AddressEventArgs& e) {
|
||||
auto cell = e.getCell();
|
||||
if (cell != 0) {
|
||||
assert(address == m_memory.ADDRESS().word);
|
||||
m_memory.reference() = 0;
|
||||
m_memory.write(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,8 +132,6 @@ void Board::Cpu_ExecutedInstruction_Poll(const EightBit::MOS6502& cpu) {
|
||||
}
|
||||
|
||||
void Board::pollKeyboard() {
|
||||
if (_kbhit()) {
|
||||
m_memory.ADDRESS().word = m_configuration.getInputAddress();
|
||||
m_memory.reference() = _getch();
|
||||
}
|
||||
if (_kbhit())
|
||||
m_memory.write(m_configuration.getInputAddress(), _getch());
|
||||
}
|
||||
Reference in New Issue
Block a user