| 1041 | } |
| 1042 | |
| 1043 | HardDiskDrive* HarddiskInterfaceCard::GetUnit(void) |
| 1044 | { |
| 1045 | const bool isSmartPortCmd = m_command & SP_Cmd_base; |
| 1046 | |
| 1047 | if (!isSmartPortCmd) |
| 1048 | return &m_hardDiskDrive[GetProDOSBlockDeviceUnit()]; |
| 1049 | |
| 1050 | if (m_unitNum > kMaxSmartPortUnits) |
| 1051 | return NULL; |
| 1052 | |
| 1053 | if (m_unitNum > GetNumConnectedDevices()) |
| 1054 | return NULL; |
| 1055 | |
| 1056 | if (m_unitNum == 0) |
| 1057 | return &m_smartPortController; |
| 1058 | |
| 1059 | return &m_hardDiskDrive[m_unitNum - 1]; |
| 1060 | } |
| 1061 | |
| 1062 | void HarddiskInterfaceCard::SetIdString(std::vector<BYTE>& status, const std::string& idStr) |
| 1063 | { |