MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / Enable

Method Enable

source/Disk.cpp:716–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714//===========================================================================
715
716bool __stdcall Disk2InterfaceCard::Enable(WORD, WORD address, BYTE, BYTE, ULONG uExecutedCycles)
717{
718 WORD newDrive = address & 1;
719 bool stateChanged = (newDrive != m_currDrive);
720
721 m_currDrive = newDrive;
722#if LOG_DISK_ENABLE_DRIVE
723 LOG_DISK("%08X: enable drive: %d\r\n", (UINT32)g_nCumulativeCycles, m_currDrive);
724#endif
725 m_floppyDrive[!m_currDrive].m_spinning = 0;
726 m_floppyDrive[!m_currDrive].m_writelight = 0;
727 CheckSpinning(stateChanged, uExecutedCycles);
728
729 return ImageIsWOZ(m_floppyDrive[m_currDrive].m_disk.m_imagehandle); // Drive may've changed, so image-type may've changed
730}
731
732//===========================================================================
733

Callers 2

IOReadMethod · 0.80
IOWriteMethod · 0.80

Calls 1

ImageIsWOZFunction · 0.85

Tested by

no test coverage detected