mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-10 18:21:20 +00:00
This commit is contained in:
parent
c7a3776db5
commit
c0309afb11
1 changed files with 36 additions and 33 deletions
|
|
@ -47,45 +47,48 @@ namespace BreakpointsKernel {
|
|||
}
|
||||
|
||||
protected override void Run() {
|
||||
// This first line causes both Cosmos and VS to lock up
|
||||
//var x = BlockDevice.Devices[0];
|
||||
//var v = BlockDevice.Devices.Count;
|
||||
// Next line barfs. No reflection?
|
||||
//string y = x.GetType().ToString();
|
||||
// Next line cause Run to restart? Inteferes with loop?
|
||||
//var z = (AtaPio)x;
|
||||
// Next line barfs too
|
||||
//var xATA = (AtaPio)BlockDevice.Devices[0];
|
||||
try {
|
||||
//Trace1();
|
||||
|
||||
Trace1();
|
||||
//var x = BlockDevice.Devices[0];
|
||||
//var v = BlockDevice.Devices.Count;
|
||||
// Next line barfs. No reflection?
|
||||
// Next line cause Run to restart? Inteferes with loop?
|
||||
//var z = (AtaPio)x;
|
||||
// Next line barfs too
|
||||
|
||||
Console.WriteLine("Block devices found: " + BlockDevice.Devices.Count);
|
||||
Console.WriteLine("Block devices found: " + BlockDevice.Devices.Count);
|
||||
|
||||
var xATA = new AtaPio(Cosmos.Core.Global.BaseIOGroups.ATA1, Ata.ControllerIdEnum.Primary, Ata.BusPositionEnum.Master);
|
||||
Console.WriteLine("--------------------------");
|
||||
Console.WriteLine("Type: " + (xATA.DriveType == AtaPio.SpecLevel.ATA ? "ATA" : "ATAPI"));
|
||||
Console.WriteLine("Serial No: " + xATA.SerialNo);
|
||||
Console.WriteLine("Firmware Rev: " + xATA.FirmwareRev);
|
||||
Console.WriteLine("Model No: " + xATA.ModelNo);
|
||||
Console.WriteLine("Size: " + xATA.BlockCount * xATA.BlockSize / 1024 / 1024 + " MB");
|
||||
var xATA = (AtaPio)BlockDevice.Devices[0];
|
||||
//var xATA = new AtaPio(Cosmos.Core.Global.BaseIOGroups.ATA1, Ata.ControllerIdEnum.Primary, Ata.BusPositionEnum.Master);
|
||||
Console.WriteLine("--------------------------");
|
||||
Console.WriteLine("Type: " + (xATA.DriveType == AtaPio.SpecLevel.ATA ? "ATA" : "ATAPI"));
|
||||
Console.WriteLine("Serial No: " + xATA.SerialNo);
|
||||
Console.WriteLine("Firmware Rev: " + xATA.FirmwareRev);
|
||||
Console.WriteLine("Model No: " + xATA.ModelNo);
|
||||
Console.WriteLine("Size: " + xATA.BlockCount * xATA.BlockSize / 1024 / 1024 + " MB");
|
||||
|
||||
var xFS = new Cosmos.System.Filesystem.FAT(BlockDevice.Devices[1]);
|
||||
xFS.GetDir();
|
||||
var xFS = new Cosmos.System.Filesystem.FAT(BlockDevice.Devices[1]);
|
||||
xFS.GetDir();
|
||||
|
||||
//var xWrite = new byte[512];
|
||||
//for (int i = 0; i < 512; i++) {
|
||||
// xWrite[i] = (byte)i;
|
||||
//}
|
||||
//xATA.WriteBlock(0, xWrite);
|
||||
//var xWrite = new byte[512];
|
||||
//for (int i = 0; i < 512; i++) {
|
||||
// xWrite[i] = (byte)i;
|
||||
//}
|
||||
//xATA.WriteBlock(0, xWrite);
|
||||
|
||||
//var xRead = new byte[512];
|
||||
//xATA.ReadBlock(0, xRead);
|
||||
//string xDisplay = "";
|
||||
//for (int i = 0; i < 512; i++) {
|
||||
// xDisplay = xDisplay + xRead[i].ToHex();
|
||||
//}
|
||||
//Console.WriteLine(xDisplay);
|
||||
Stop();
|
||||
//var xRead = new byte[512];
|
||||
//xATA.ReadBlock(0, xRead);
|
||||
//string xDisplay = "";
|
||||
//for (int i = 0; i < 512; i++) {
|
||||
// xDisplay = xDisplay + xRead[i].ToHex();
|
||||
//}
|
||||
//Console.WriteLine(xDisplay);
|
||||
Stop();
|
||||
} catch (Exception e) {
|
||||
Console.WriteLine("Exception: " + e.Message);
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void AfterRun() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue