mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-10-22 07:02:37 +00:00
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:
1 parent
1ba238bfc7
commit
ee3ecc682d
6 files changed
+72
-52
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user