mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-16 06:29:33 +00:00
Initialize last track/sector, update on drive eject
This commit is contained in:
parent
5a89948172
commit
c8b7af6828
|
@ -1050,7 +1050,10 @@ void __stdcall Disk2InterfaceCard::ReadWrite(WORD pc, WORD addr, BYTE bWrite, BY
|
||||||
ReadTrack(m_currDrive, uExecutedCycles);
|
ReadTrack(m_currDrive, uExecutedCycles);
|
||||||
|
|
||||||
if (!pFloppy->m_trackimagedata)
|
if (!pFloppy->m_trackimagedata)
|
||||||
|
{
|
||||||
|
pDrive->SetLastReadTrackSector(0);
|
||||||
return UpdateLatchForEmptyDrive(pDrive);
|
return UpdateLatchForEmptyDrive(pDrive);
|
||||||
|
}
|
||||||
|
|
||||||
// Improve precision of "authentic" drive mode - GH#125
|
// Improve precision of "authentic" drive mode - GH#125
|
||||||
UINT uSpinNibbleCount = 0;
|
UINT uSpinNibbleCount = 0;
|
||||||
|
|
|
@ -115,14 +115,25 @@ public:
|
||||||
m_headWindow = 0;
|
m_headWindow = 0;
|
||||||
m_spinning = 0;
|
m_spinning = 0;
|
||||||
m_writelight = 0;
|
m_writelight = 0;
|
||||||
|
m_LastReadTrackSector[0] = -1;
|
||||||
|
m_LastReadTrackSector[1] = -1;
|
||||||
m_disk.clear();
|
m_disk.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Managed by Disk2InterfaceCard::ReadWrite()
|
// NOTE: Managed by Disk2InterfaceCard::ReadWrite()
|
||||||
void SetLastReadTrackSector(BYTE* pVolumeTrackSectorChecksum)
|
void SetLastReadTrackSector(BYTE* pVolumeTrackSectorChecksum)
|
||||||
{
|
{
|
||||||
m_LastReadTrackSector[0] = pVolumeTrackSectorChecksum[1];
|
if (pVolumeTrackSectorChecksum)
|
||||||
m_LastReadTrackSector[1] = pVolumeTrackSectorChecksum[2];
|
{
|
||||||
|
m_LastReadTrackSector[0] = pVolumeTrackSectorChecksum[1];
|
||||||
|
m_LastReadTrackSector[1] = pVolumeTrackSectorChecksum[2];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_LastReadTrackSector[0] = -1;
|
||||||
|
m_LastReadTrackSector[1] = -1;
|
||||||
|
}
|
||||||
|
assert(m_LastReadTrackSector[0] <= 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user