git-svn-id: https://spexeah.com:8443/svn/Asuro@973 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
717a642370
commit
fd564f56b7
6 files changed
+54
-1460
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -303,6 +303,16 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
// buffer:= puint8(kalloc(512));
|
||||
// buffer[0] := 1;
|
||||
// buffer[1] := 2;
|
||||
// buffer[2] := 3;
|
||||
// buffer[3] := 4;
|
||||
// buffer[4] := 5;
|
||||
// buffer[5] := 6;
|
||||
// writePIO28(0, 3, buffer);
|
||||
// kfree(puint32(buffer));
|
||||
|
||||
console.writestringln('[IDE] (LOAD) END');
|
||||
pop_trace();
|
||||
end;
|
||||
@@ -397,7 +407,7 @@ begin
|
||||
//send write command
|
||||
port_write(ATA_REG_COMMAND, ATA_CMD_WRITE_PIO);
|
||||
|
||||
console.writestringln('ide write sttart');
|
||||
console.writestringlnWND('ide write start', getTerminalHWND());
|
||||
console.redrawWindows();
|
||||
|
||||
//write data
|
||||
@@ -407,7 +417,7 @@ begin
|
||||
i:= i + 2;
|
||||
end;
|
||||
|
||||
console.writestringln('ise write stop');
|
||||
console.writestringlnWND('ide write end', getTerminalHWND());
|
||||
console.redrawWindows();
|
||||
|
||||
//flush drive cache
|
||||
|
||||
@@ -110,7 +110,7 @@ end;
|
||||
|
||||
function load(ptr : void) : boolean;
|
||||
begin
|
||||
console.outputln('DUMMY DRIVER', 'LOADED.')
|
||||
console.outputln('FAT32', 'LOADED.')
|
||||
end;
|
||||
|
||||
function cleanString(str : pchar; status : puint32) : byteArray8;
|
||||
@@ -754,6 +754,7 @@ end;
|
||||
procedure create_volume(disk : PStorage_Device; sectors : uint32; start : uint32; config : puint32);
|
||||
var
|
||||
buffer : puint32;
|
||||
bt: puint32;
|
||||
zeroBuffer : puint32;
|
||||
bootRecord : PBootRecord;
|
||||
dataStart : uint32;
|
||||
@@ -800,7 +801,7 @@ begin //maybe increase buffer size by one?
|
||||
// memset(uint32(buffer), 0, sizeof(TBootRecord));
|
||||
// bootRecord:= PBootRecord(buffer);
|
||||
|
||||
buffer:= puint32(kalloc(disk^.sectorSize));
|
||||
buffer:= puint32(kalloc(disk^.sectorSize+512));
|
||||
memset(uint32(buffer), 0, disk^.sectorSize);
|
||||
|
||||
bootRecord:= PBootRecord(buffer);
|
||||
@@ -824,9 +825,41 @@ begin //maybe increase buffer size by one?
|
||||
bootRecord^.bsignature := $29;
|
||||
bootRecord^.identString := fatArray;
|
||||
|
||||
puint32(buffer)[127]:= $55AA;
|
||||
|
||||
disk^.writecallback(disk, start + 1, 1, buffer);
|
||||
console.writestringWND('spc', getTerminalHWND());
|
||||
console.writeintlnWND(config^, getTerminalHWND());
|
||||
console.writestringWND('sectors', getTerminalHWND());
|
||||
console.writeintlnWND(sectors, getTerminalHWND());
|
||||
console.writestringWND('sectorsize', getTerminalHWND());
|
||||
console.writeintlnWND(disk^.sectorsize, getTerminalHWND());
|
||||
|
||||
console.redrawWindows();
|
||||
|
||||
bt:= puint32(kalloc(512));
|
||||
|
||||
bt[1] := 1;
|
||||
bt[2] := 1;
|
||||
bt[3] := 1;
|
||||
bt[4] := 1;
|
||||
bt[5] := 1;
|
||||
bt[6] := 1;
|
||||
bt[7] := 11;
|
||||
bt[8] := 33;
|
||||
bt[9] := 22;
|
||||
disk^.writecallback(disk, 3, 1, puint32(bt));
|
||||
|
||||
|
||||
// puint32(buffer)[127]:= $55AA;
|
||||
|
||||
console.writestringlnWND('writting to bootrecord', getTerminalHWND());
|
||||
console.writeintlnWND(start + 1, getTerminalHWND());
|
||||
console.redrawWindows;
|
||||
|
||||
disk^.writecallback(disk, start + 1, 1, puint32(buffer));
|
||||
|
||||
console.writestringlnWND('finished writting to bootrecord', getTerminalHWND());
|
||||
|
||||
console.redrawWindows;
|
||||
|
||||
fatStart:= start + 1 + bootRecord^.rsvSectors;
|
||||
dataStart:= fatStart + bootRecord^.FATSize;
|
||||
@@ -843,10 +876,14 @@ begin //maybe increase buffer size by one?
|
||||
kfree(buffer);
|
||||
kfree(zeroBuffer);
|
||||
writestring('Frees');
|
||||
console.redrawWindows;
|
||||
console.writestringlnWND('writting 1', getTerminalHWND());
|
||||
console.redrawWindows;
|
||||
|
||||
buffer:= puint32(kalloc(disk^.sectorSize));
|
||||
memset(uint32(buffer), 0, disk^.sectorSize);
|
||||
console.writestringlnWND('writting 1', getTerminalHWND());
|
||||
console.redrawWindows;
|
||||
|
||||
puint32(buffer)[0]:= $FFFFFFF8; //fsinfo
|
||||
puint32(buffer)[1]:= $FFFFFFF8; //root cluster
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -138,7 +138,7 @@ begin
|
||||
drive := stringToInt(getParam(1, params));
|
||||
console.writeintln(drive); // works
|
||||
if stringEquals(getParam(2, params), 'fat32') then begin
|
||||
PFilesystem(LL_Get(filesystems, 0))^.createCallback((PStorage_Device(LL_Get(storageDevices, drive))), 10000, 1, spc); //todo check fs
|
||||
PFilesystem(LL_Get(filesystems, 0))^.createCallback((PStorage_Device(LL_Get(storageDevices, drive))), 1000, 1, spc); //todo check fs
|
||||
console.writestring('Drive ');
|
||||
//console.writeint(drive); // page faults
|
||||
console.writestringln(' formatted.');
|
||||
|
||||
Reference in new issue
Block a user