diff --git a/Emulator/Components/C64.cpp b/Emulator/Components/C64.cpp index 26848c390..46b52eb70 100644 --- a/Emulator/Components/C64.cpp +++ b/Emulator/Components/C64.cpp @@ -819,6 +819,9 @@ alwaysinline void C64::executeCycle() cpu.execute(); if constexpr (enable8) { if (drive8.needsEmulation) drive8.execute(durationOfOneCycle); } if constexpr (enable9) { if (drive9.needsEmulation) drive9.execute(durationOfOneCycle); } + + // Experimental (REU) + if (isDue(cycle)) { expansionport.processEvent(eventid[SLOT_EXP]); } } template void @@ -1145,7 +1148,7 @@ C64::processEvents(Cycle cycle) // Check tertiary slots // if (isDue(cycle)) { - expansionport.processEvent(eventid[SLOT_EXP]); + // expansionport.processEvent(eventid[SLOT_EXP]); } if (isDue(cycle)) { userPort.rs232.processTxdEvent(); diff --git a/Emulator/Media/Cartridges/CustomCartridges/Reu.cpp b/Emulator/Media/Cartridges/CustomCartridges/Reu.cpp index b92653b42..1c4290b70 100644 --- a/Emulator/Media/Cartridges/CustomCartridges/Reu.cpp +++ b/Emulator/Media/Cartridges/CustomCartridges/Reu.cpp @@ -36,7 +36,7 @@ Reu::_didReset(bool hard) cr = 0x10; // Initialize the length register - tlengthLatched = 0xFFFF; + tlength = tlengthLatched = 0xFFFF; // Experimental bus = 0x00; // 0xFF; @@ -421,6 +421,9 @@ Reu::prepareDma() // Schedule the first event c64.scheduleRel(1, EXP_REU_PREPARE); + + // Freeze the CPU + cpu.pullDownRdyLine(INTSRC_EXP); } bool @@ -518,8 +521,9 @@ Reu::processEvent(EventID id) cpu.pullDownRdyLine(INTSRC_EXP); - c64.scheduleRel(1, EXP_REU_PREPARE2); - return; + id = EXP_REU_PREPARE2; + // c64.scheduleRel(1, EXP_REU_PREPARE2); + // return; } if (id == EXP_REU_PREPARE2) { @@ -537,7 +541,7 @@ Reu::processEvent(EventID id) } // Only proceed if the bus is available - if (vic.baLine.delayed()) { + if (vic.baLine.readWithDelay(1)) { c64.scheduleRel(1, id); return; diff --git a/Emulator/config.cpp b/Emulator/config.cpp index f98e3a9d6..d4a401731 100644 --- a/Emulator/config.cpp +++ b/Emulator/config.cpp @@ -80,7 +80,7 @@ debugflag USR_DEBUG = 0; // Other components debugflag REC_DEBUG = 0; -debugflag REU_DEBUG = 1; +debugflag REU_DEBUG = 0; debugflag SCK_DEBUG = 0; debugflag SRV_DEBUG = 0;