void __stdcall Disk2InterfaceCard::Enable(WORD, WORD address, BYTE, BYTE, ULONG uExecutedCycles) { m_currDrive = address & 1; #if LOG_DISK_ENABLE_DRIVE LOG_DISK("enable drive: %d\r\n", m_currDrive); #endif m_floppyDrive[!m_currDrive].m_spinning = 0; m_floppyDrive[!m_currDrive].m_writelight = 0; CheckSpinning(uExecutedCycles); }
void __stdcall Disk2InterfaceCard::ControlMotor(WORD, WORD address, BYTE, BYTE, ULONG uExecutedCycles) { BOOL newState = address & 1; if (newState != m_floppyMotorOn) // motor changed state m_formatTrack.DriveNotWritingTrack(); m_floppyMotorOn = newState; // NB. Motor off doesn't reset the Command Decoder like reset. (UTAIIe figures 9.7 & 9.8 chip C2) // - so it doesn't reset this state: m_floppyLoadMode, m_floppyWriteMode, m_phases #if LOG_DISK_MOTOR LOG_DISK("motor %s\r\n", (m_floppyMotorOn) ? "on" : "off"); #endif CheckSpinning(uExecutedCycles); }
static BYTE __stdcall DiskControlMotor(WORD, WORD address, BYTE, BYTE, ULONG) { floppymotoron = address & 1; CheckSpinning(); return MemReturnRandomData(1); }
static BYTE __stdcall DiskControlMotor(WORD, WORD address, BYTE, BYTE, ULONG uExecutedCycles) { floppymotoron = address & 1; CheckSpinning(); return MemReadFloatingBus(1, uExecutedCycles); // TC-TODO: Check b7 always set }