What happens
Both Disk ][ drives share one head position. Seek drive 1 to track 20, select drive 2, and drive 2's head is dragged to track 20 regardless of where it actually was.
Why
Disk2Controller::m_quarterTrack is a single member for the whole card. UpdateEngineSelection() runs on every drive select and pushes it into the newly selected engine, never pulling the outgoing drive's position back:
void Disk2Controller::UpdateEngineSelection()
{
int other = m_activeDrive ^ 1;
m_engine[other].SetMotorOn (false);
m_engine[m_activeDrive].SetMotorOn (m_motorOn);
m_engine[m_activeDrive].SetCurrentTrack (m_quarterTrack); // push, no pull
...
}
Each Disk2NibbleEngine already has its own m_currentTrack, so the storage for per-drive position exists. It is overwritten on every select.
Hardware
The stepper coils and the head carriage are in the drive, not on the card. The card has the four phase latches at $C0E0-$C0E7, and drive select decides which drive's magnets they reach. A deselected drive keeps its head where it was left.
Why it is not louder
DOS 3.3 recalibrates to track 0 when it switches drives, so the wrong starting position is corrected before it is read from. Software that seeks, switches, switches back and expects the head to still be there sees the fault.
Fix
Short term: pull the outgoing drive's position back into m_quarterTrack on select, or read the incoming drive's position instead of pushing. Wants a regression test that seeks drive 1, selects drive 2 and back, and asserts drive 1's position survived.
Longer term this dissolves into the Disk2Drive decomposition (separate issue): once the drive owns its own detent and position there is nothing to push.
Related
The same shape applies to m_phase, m_motorSpinupRemaining and m_motorSpindownCycles, all single members on the card for per-drive mechanical facts.
What happens
Both Disk ][ drives share one head position. Seek drive 1 to track 20, select drive 2, and drive 2's head is dragged to track 20 regardless of where it actually was.
Why
Disk2Controller::m_quarterTrackis a single member for the whole card.UpdateEngineSelection()runs on every drive select and pushes it into the newly selected engine, never pulling the outgoing drive's position back:Each
Disk2NibbleEnginealready has its ownm_currentTrack, so the storage for per-drive position exists. It is overwritten on every select.Hardware
The stepper coils and the head carriage are in the drive, not on the card. The card has the four phase latches at
$C0E0-$C0E7, and drive select decides which drive's magnets they reach. A deselected drive keeps its head where it was left.Why it is not louder
DOS 3.3 recalibrates to track 0 when it switches drives, so the wrong starting position is corrected before it is read from. Software that seeks, switches, switches back and expects the head to still be there sees the fault.
Fix
Short term: pull the outgoing drive's position back into
m_quarterTrackon select, or read the incoming drive's position instead of pushing. Wants a regression test that seeks drive 1, selects drive 2 and back, and asserts drive 1's position survived.Longer term this dissolves into the
Disk2Drivedecomposition (separate issue): once the drive owns its own detent and position there is nothing to push.Related
The same shape applies to
m_phase,m_motorSpinupRemainingandm_motorSpindownCycles, all single members on the card for per-drive mechanical facts.