git-svn-id: https://spexeah.com:8443/svn/Asuro@675 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
35528c3b5c
commit
10b0fc8c40
3 files changed
+72
-75
No files matched your search
@@ -224,8 +224,7 @@ begin
|
|||||||
storageDevice.controllerId0:= 0;
|
storageDevice.controllerId0:= 0;
|
||||||
storageDevice.maxSectorCount:= (IDEDevices[0].info[60] or (IDEDevices[0].info[61] shl 16) ); //LBA28 SATA
|
storageDevice.maxSectorCount:= (IDEDevices[0].info[60] or (IDEDevices[0].info[61] shl 16) ); //LBA28 SATA
|
||||||
|
|
||||||
console.writeintln(storageDevice.maxSectorCount);
|
storageDevice.hpc:= uint32(IDEDevices[0].info[3] DIV IDEDevices[0].info[1]);
|
||||||
redrawWindows();
|
|
||||||
|
|
||||||
storageDevice.sectorSize:= 512;
|
storageDevice.sectorSize:= 512;
|
||||||
if storageDevice.maxSectorCount <> 0 then begin
|
if storageDevice.maxSectorCount <> 0 then begin
|
||||||
@@ -290,7 +289,6 @@ begin
|
|||||||
outw($1F5, 0);
|
outw($1F5, 0);
|
||||||
|
|
||||||
outw($1F7, ATA_CMD_IDENTIFY); //send identify command
|
outw($1F7, ATA_CMD_IDENTIFY); //send identify command
|
||||||
console.writeint(1);
|
|
||||||
|
|
||||||
while true do begin
|
while true do begin
|
||||||
if (inw($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
|
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
|
for i:=0 to sectorCount do begin
|
||||||
|
|
||||||
console.writeintln(11);
|
|
||||||
redrawWindows();
|
|
||||||
|
|
||||||
//poll status
|
//poll status
|
||||||
while true do if (inw($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
|
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
|
while true do begin
|
||||||
if (inw($1f7) and (1 shl 3)) <> 0 then break;
|
if (inw($1f7) and (1 shl 3)) <> 0 then break;
|
||||||
if (inw($1f7) and (1 shl 5)) <> 0 then begin
|
if (inw($1f7) and (1 shl 5)) <> 0 then begin
|
||||||
@@ -426,10 +416,6 @@ begin
|
|||||||
end; //drive error
|
end; //drive error
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
console.writeintln(13);
|
|
||||||
redrawWindows();
|
|
||||||
|
|
||||||
for ii:=0 to 127 do begin //read data
|
for ii:=0 to 127 do begin //read data
|
||||||
Puint32(buffer + ((i * 512) + (ii * 32) DIV 32))^ := uint32(inw($1F0));
|
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
|
while true do if (inw($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -36,7 +36,7 @@ type
|
|||||||
PPHIOHook = procedure(volume : PStorage_device; addr : uint32; sectors : uint32; buffer : puint32);
|
PPHIOHook = procedure(volume : PStorage_device; addr : uint32; sectors : uint32; buffer : puint32);
|
||||||
PPCreateHook = procedure(disk : PStorage_Device; sectors : uint32; start : uint32; config : puint32);
|
PPCreateHook = procedure(disk : PStorage_Device; sectors : uint32; start : uint32; config : puint32);
|
||||||
PPDetectHook = procedure(disk : PStorage_Device);
|
PPDetectHook = procedure(disk : PStorage_Device);
|
||||||
PPCreateDirHook = procedure(volume : PStorage_volume; directory : pchar; dirname : pchar; attributes : uint32; status : puint32);
|
PPCreateDirHook = procedure(volume : PStorage_volume; directory : pchar; dirname : pchar; attributes : uint32; var status : puint32);
|
||||||
PPReadDirHook = function(volume : PStorage_volume; directory : pchar; status : puint32) : PLinkedListBase; //returns: 0 = success, 1 = dir not exsist, 2 = not directory, 3 = error //returns: 0 = success, 1 = dir not exsist, 2 = not directory, 3 = error
|
PPReadDirHook = function(volume : PStorage_volume; directory : pchar; status : puint32) : PLinkedListBase; //returns: 0 = success, 1 = dir not exsist, 2 = not directory, 3 = error //returns: 0 = success, 1 = dir not exsist, 2 = not directory, 3 = error
|
||||||
|
|
||||||
PPHIOHook_ = procedure;
|
PPHIOHook_ = procedure;
|
||||||
@@ -72,6 +72,8 @@ type
|
|||||||
volumes : PLinkedListBase;
|
volumes : PLinkedListBase;
|
||||||
writeCallback : PPHIOHook;
|
writeCallback : PPHIOHook;
|
||||||
readCallback : PPHIOHook;
|
readCallback : PPHIOHook;
|
||||||
|
hpc : uint16;
|
||||||
|
spt : uint16;
|
||||||
end;
|
end;
|
||||||
APStorage_Device = array[0..255] of PStorage_device;
|
APStorage_Device = array[0..255] of PStorage_device;
|
||||||
|
|
||||||
@@ -170,10 +172,12 @@ var
|
|||||||
dirName : pbyteArray8;
|
dirName : pbyteArray8;
|
||||||
device : PStorage_Device;
|
device : PStorage_Device;
|
||||||
volume : PStorage_Volume;
|
volume : PStorage_Volume;
|
||||||
error : uint32;
|
error : puint32;
|
||||||
i : uint32;
|
i : uint32;
|
||||||
begin
|
begin
|
||||||
push_trace('mkdir');
|
push_trace('mkdir');
|
||||||
|
error := puint32(kalloc(8));
|
||||||
|
error^ := 0;
|
||||||
if paramCount(params) > 0 then begin
|
if paramCount(params) > 0 then begin
|
||||||
dir := getParam(0, params);
|
dir := getParam(0, params);
|
||||||
temp:= getParam(1, params);
|
temp:= getParam(1, params);
|
||||||
@@ -187,9 +191,10 @@ begin
|
|||||||
device:= PStorage_Device(LL_Get(storageDevices, 0));
|
device:= PStorage_Device(LL_Get(storageDevices, 0));
|
||||||
volume:= PStorage_Volume(LL_Get(device^.volumes, 0));
|
volume:= PStorage_Volume(LL_Get(device^.volumes, 0));
|
||||||
|
|
||||||
volume^.filesystem^.createDirCallback(volume, dir, temp, $10, @error);
|
volume^.filesystem^.createDirCallback(volume, dir, temp, $10, error);
|
||||||
//if error <> 1 then console.writestringln('ERROR');
|
//if error <> 1 then console.writestringln('ERROR');
|
||||||
end;
|
end;
|
||||||
|
kfree(error);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ls_command(params : PParamList);
|
procedure ls_command(params : PParamList);
|
||||||
|
|||||||
Reference in new issue
Block a user