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 committed 2019-09-15 12:49:32 +01:00
1 parent 1ba238bfc7
commit ee3ecc682d
6 files changed
+72 -52

No files matched your search

+5
View File
@@ -10,6 +10,7 @@ EightBit::MOS6502::MOS6502(Bus& bus)
P() = RF;
S() = Mask8;
lowerSYNC();
lowerRW();
});
}
@@ -17,6 +18,7 @@ DEFINE_PIN_LEVEL_CHANGERS(NMI, MOS6502);
DEFINE_PIN_LEVEL_CHANGERS(SO, MOS6502);
DEFINE_PIN_LEVEL_CHANGERS(SYNC, MOS6502);
DEFINE_PIN_LEVEL_CHANGERS(RDY, MOS6502);
DEFINE_PIN_LEVEL_CHANGERS(RW, MOS6502);
int EightBit::MOS6502::step() {
resetCycles();
@@ -27,6 +29,7 @@ int EightBit::MOS6502::step() {
handleSO();
if (LIKELY(raised(RDY()))) {
lowerSYNC(); // Instruction fetch beginning
raiseRW();
opcode() = BUS().read(PC()++); // can't use fetchByte
if (UNLIKELY(lowered(RESET())))
handleRESET();
@@ -91,11 +94,13 @@ void EightBit::MOS6502::interrupt() {
void EightBit::MOS6502::busWrite() {
tick();
lowerRW();
Processor::busWrite();
}
uint8_t EightBit::MOS6502::busRead() {
tick();
raiseRW();
return Processor::busRead();
}