git-svn-id: https://spexeah.com:8443/svn/Asuro@675 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
aaron
2018-05-08 09:04:19 +00:00
parent 35528c3b5c
commit 10b0fc8c40
3 changed files with 72 additions and 75 deletions

View File

@ -224,8 +224,7 @@ begin
storageDevice.controllerId0:= 0;
storageDevice.maxSectorCount:= (IDEDevices[0].info[60] or (IDEDevices[0].info[61] shl 16) ); //LBA28 SATA
console.writeintln(storageDevice.maxSectorCount);
redrawWindows();
storageDevice.hpc:= uint32(IDEDevices[0].info[3] DIV IDEDevices[0].info[1]);
storageDevice.sectorSize:= 512;
if storageDevice.maxSectorCount <> 0 then begin
@ -290,7 +289,6 @@ begin
outw($1F5, 0);
outw($1F7, ATA_CMD_IDENTIFY); //send identify command
console.writeint(1);
while true do begin
if (inw($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
@ -397,16 +395,8 @@ begin
for i:=0 to sectorCount do begin
console.writeintln(11);
redrawWindows();
//poll status
while true do if (inw($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
console.writeintln(12);
redrawWindows();
while true do begin
if (inw($1f7) and (1 shl 3)) <> 0 then break;
if (inw($1f7) and (1 shl 5)) <> 0 then begin
@ -426,10 +416,6 @@ begin
end; //drive error
end;
console.writeintln(13);
redrawWindows();
for ii:=0 to 127 do begin //read data
Puint32(buffer + ((i * 512) + (ii * 32) DIV 32))^ := uint32(inw($1F0));
while true do if (inw($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy