mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 00:17:16 +00:00
DiskII: Allow stepper motor to change phase when motor is off, but during the ~1s when it's still spinning (#525)
This commit is contained in:
+11
-3
@@ -376,15 +376,23 @@ static void __stdcall DiskControlMotor(WORD, WORD address, BYTE, BYTE, ULONG uEx
|
||||
|
||||
static void __stdcall DiskControlStepper(WORD, WORD address, BYTE, BYTE, ULONG uExecutedCycles)
|
||||
{
|
||||
Disk_t * fptr = &g_aFloppyDisk[currdrive];
|
||||
|
||||
if (!floppymotoron) // GH#525
|
||||
{
|
||||
if (!fptr->spinning)
|
||||
{
|
||||
#if LOG_DISK_PHASES
|
||||
LOG_DISK("stepper accessed whilst motor is off\r\n");
|
||||
LOG_DISK("stepper accessed whilst motor is off and not spinning\r\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
#if LOG_DISK_PHASES
|
||||
LOG_DISK("stepper accessed whilst motor is off, but still spinning\r\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
Disk_t * fptr = &g_aFloppyDisk[currdrive];
|
||||
int phase = (address >> 1) & 3;
|
||||
int phase_bit = (1 << phase);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user