diff --git a/src/DiskImage.h b/src/DiskImage.h index 3fc384a..7f5c209 100644 --- a/src/DiskImage.h +++ b/src/DiskImage.h @@ -115,22 +115,10 @@ public: inline unsigned TrackLength(unsigned track) const { return trackLengths[track]; } inline bool IsD81() const { return diskType == D81; } + inline bool IsD71() const { return diskType == D71; } inline unsigned char GetD81Byte(unsigned track, unsigned headIndex, unsigned headPos) const { return tracksD81[track][headIndex][headPos]; } inline void SetD81Byte(unsigned track, unsigned headIndex, unsigned headPos, unsigned char data) { - //unsigned headDataOffset; - //if (headPos > 0) - // headDataOffset = headPos - 1; - //else - // headDataOffset = trackLengths[track] - 1; - //if (tracksD81[track][headIndex][headDataOffset] != data) - //{ - // tracksD81[track][headIndex][headDataOffset] = data; - // trackDirty[track] = true; - // trackUsed[track] = true; - // dirty = true; - //} - if (tracksD81[track][headIndex][headPos] != data) { tracksD81[track][headIndex][headPos] = data; @@ -138,20 +126,6 @@ public: trackUsed[track] = true; dirty = true; } - - //unsigned headDataOffset; - //if (headPos < trackLengths[track]) - // headDataOffset = headPos + 1; - //else - // headDataOffset = 0; - //if (tracksD81[track][headIndex][headDataOffset] != data) - //{ - // tracksD81[track][headIndex][headDataOffset] = data; - // trackDirty[track] = true; - // trackUsed[track] = true; - // dirty = true; - //} - } inline bool IsD81ByteASync(unsigned track, unsigned headIndex, unsigned headPos) const diff --git a/src/FileBrowser.h b/src/FileBrowser.h index 97f44e6..c5875fc 100644 --- a/src/FileBrowser.h +++ b/src/FileBrowser.h @@ -212,7 +212,7 @@ private: void RefreshFolderEntries(); void UpdateInputFolders(); - void UpdateInputDiskCaddy(); + //void UpdateInputDiskCaddy(); void UpdateCurrentHighlight(); diff --git a/src/interrupt.c b/src/interrupt.c index 0b33802..31694e7 100644 --- a/src/interrupt.c +++ b/src/interrupt.c @@ -1,6 +1,5 @@ #include "interrupt.h" #include "rpiHardware.h" -#include "bcm2835int.h" #define ARM_IC_IRQ_PENDING(irq) ( (irq) < ARM_IRQ2_BASE \ ? ARM_IC_IRQ_PENDING_1 \ diff --git a/src/interrupt.h b/src/interrupt.h index 8703e40..0dcfb93 100644 --- a/src/interrupt.h +++ b/src/interrupt.h @@ -6,6 +6,7 @@ extern "C" { #endif #include "rpi-interrupts.h" +#include "bcm2835int.h" #define EnableInterrupts() __asm volatile ("cpsie i") #define DisableInterrupts() __asm volatile ("cpsid i") diff --git a/src/m6502.h b/src/m6502.h index 5005d07..d217b9c 100644 --- a/src/m6502.h +++ b/src/m6502.h @@ -206,7 +206,7 @@ private: void BRK(void) {} void CLC(void) { ClearC(); } void CLD(void) { ClearD(); } - void CLI(void) { ClearI(); CLIMaskingInterrupt = true; } // Like the real hardware the flag will be cleared here (incase it is read by the next instruction) but needs to dely one more cycle (and let another instruction execute) before the IRQ handling will possibly trigger (CLIMaskingInterrupt is used to track and emulate this). + void CLI(void) { ClearI(); CLIMaskingInterrupt = true; } // Like the real hardware the flag will be cleared here (incase it is read by the next instruction) but needs to delay one more cycle (and let another instruction execute) before the IRQ handling will possibly trigger (CLIMaskingInterrupt is used to track and emulate this). void CLV(void) { ClearV(); } void CMP(void) { u16 result = a - value; SetC(a >= (u8)value); SetZ(a == (u8)value); EstablishN(result); } void CPX(void) { u16 result = x - value; SetC(x >= (u8)value); SetZ(x == (u8)value); EstablishN(result); } diff --git a/src/wd177x.cpp b/src/wd177x.cpp index 73cf62e..85c0d23 100644 --- a/src/wd177x.cpp +++ b/src/wd177x.cpp @@ -36,25 +36,11 @@ #include "Pi1581.h" -extern Pi1581 pi1581; - // Clocks // Master 16Mhz // into 74ls93 // QB - 16Mhz / 2 = 8MHz (177x) // QD - 16Mhz / 8 = 2MHz (6502) -// CS -// 8520 -// $4000 -// -// 1770 -// $6000 -// -// ROM -// $8000 -// -// RAM -// 0-$1fff // Disk spins at 300rpm = 5rps so to calculate how many 8Mhz cycles one rotation takes;- // 8000000 / 5 = 1600000;