예제 #1
0
파일: Disk.cpp 프로젝트: AppleWin/AppleWin
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);
}
예제 #2
0
파일: Disk.cpp 프로젝트: AppleWin/AppleWin
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);
}
예제 #3
0
파일: Disk.cpp 프로젝트: underjack/AppleWin
static BYTE __stdcall DiskControlMotor(WORD, WORD address, BYTE, BYTE, ULONG)
{
	floppymotoron = address & 1;
	CheckSpinning();
	return MemReturnRandomData(1);
}
예제 #4
0
파일: Disk.cpp 프로젝트: UIKit0/AppleWin
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
}