mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-10 10:11:31 +00:00
Check for floating bus
Fixes #1056: Does not boot if there is no IDE Secondary Master (VirtualBox)
This commit is contained in:
parent
2ca4b2adb8
commit
87a233ab3f
1 changed files with 8 additions and 0 deletions
|
|
@ -163,6 +163,14 @@ namespace Cosmos.HAL.BlockDevice
|
|||
public SpecLevel DiscoverDrive()
|
||||
{
|
||||
SelectDrive(0);
|
||||
|
||||
// Read status before sending command. If 0xFF, it's a floating
|
||||
// bus (nothing connected)
|
||||
if (IO.Status.Byte == 0xFF)
|
||||
{
|
||||
return SpecLevel.Null;
|
||||
}
|
||||
|
||||
var xIdentifyStatus = SendCmd(Cmd.Identify, false);
|
||||
// No drive found, go to next
|
||||
if (xIdentifyStatus == Status.None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue