mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-22 05:48:37 +00:00
This commit is contained in:
parent
546ad829db
commit
10f917cf34
11 changed files with 176 additions and 194 deletions
|
|
@ -92,7 +92,6 @@
|
|||
<Compile Include="PC\Processor.cs" />
|
||||
<Compile Include="TempDictionary.cs" />
|
||||
<Compile Include="Global.cs" />
|
||||
<Compile Include="Old\CPU.cs" />
|
||||
<Compile Include="Old\DebugUtil.cs" />
|
||||
<Compile Include="Old\Hardware.cs" />
|
||||
<Compile Include="Old\Keyboard.cs" />
|
||||
|
|
@ -108,10 +107,17 @@
|
|||
<Compile Include="Old\Storage\Storage.cs" />
|
||||
<Compile Include="Bus\USBBus.cs" />
|
||||
<Compile Include="SerialDevice.cs" />
|
||||
<Compile Include="TextScreen-Old.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Cosmos.snk" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Cosmos.Kernel\Cosmos.Kernel.csproj">
|
||||
<Project>{A1F83D9F-2D44-4264-A08B-416797123018}</Project>
|
||||
<Name>Cosmos.Kernel</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Network\TCPIPModel\DataLinkLayer\" />
|
||||
<Folder Include="Network\TCPIPModel\NetworkLayer\IPv6\" />
|
||||
|
|
|
|||
|
|
@ -10,16 +10,5 @@ namespace Cosmos.Hardware {
|
|||
protected static byte IOReadByte(ushort aPort) { return 0; }
|
||||
protected static void IOWriteWord(ushort aPort, ushort aData) { }
|
||||
protected static ushort IOReadWord(ushort aPort) { return 0; }
|
||||
/// <summary>
|
||||
/// Gets the amount of RAM in MB's.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected static uint GetAmountOfRAM() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected static uint GetEndOfKernel() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace Cosmos.Hardware.PC {
|
|||
HW.Storage.ATAOld.Initialize(Sleep);
|
||||
}
|
||||
|
||||
HW.CPU.CreateIDT();
|
||||
Cosmos.Kernel.CPU.CreateIDT();
|
||||
// end old -----------------
|
||||
|
||||
// MTW new
|
||||
|
|
|
|||
|
|
@ -5,13 +5,23 @@ using Indy.IL2CPU.Plugs;
|
|||
using HW = Cosmos.Hardware;
|
||||
|
||||
namespace Cosmos.Kernel.Plugs {
|
||||
[Plug(Target = typeof(HW.CPU))]
|
||||
[Plug(Target = typeof(Kernel.CPU))]
|
||||
public static class CPU {
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.CreateIDT))]
|
||||
public static void CreateIDT() {
|
||||
}
|
||||
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.ZeroFill))]
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.GetAmountOfRAM))]
|
||||
public static uint GetAmountOfRAM() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.GetEndOfKernel))]
|
||||
public static uint GetEndOfKernel() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.ZeroFill))]
|
||||
// TODO: implement this using REP STOSB and REPO STOSD
|
||||
public static unsafe void ZeroFill(uint aStartAddress, uint aLength) {
|
||||
Console.Write("Clearing ");
|
||||
|
|
|
|||
|
|
@ -5,31 +5,22 @@ using Indy.IL2CPU.Plugs;
|
|||
using HW = Cosmos.Hardware;
|
||||
|
||||
namespace Cosmos.Kernel.Plugs.Other {
|
||||
[Plug(Target = typeof(HW.Hardware))]
|
||||
public static class Hardware {
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.IOWrite8))]
|
||||
public static void IOWriteByte(ushort aPort, byte aData) {
|
||||
}
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.IORead8))]
|
||||
public static byte IOReadByte(ushort aPort) {
|
||||
return 0;
|
||||
}
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.IOWrite16))]
|
||||
public static void IOWriteWord(ushort aPort, ushort aData) {
|
||||
}
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.IORead16))]
|
||||
public static ushort IOReadWord(ushort aPort) {
|
||||
return 0;
|
||||
}
|
||||
[Plug(Target = typeof(HW.Hardware))]
|
||||
public static class Hardware {
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.IOWrite8))]
|
||||
public static void IOWriteByte(ushort aPort, byte aData) {
|
||||
}
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.IORead8))]
|
||||
public static byte IOReadByte(ushort aPort) {
|
||||
return 0;
|
||||
}
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.IOWrite16))]
|
||||
public static void IOWriteWord(ushort aPort, ushort aData) {
|
||||
}
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.IORead16))]
|
||||
public static ushort IOReadWord(ushort aPort) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.GetAmountOfRAM))]
|
||||
public static uint GetAmountOfRAM() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
[PlugMethod(MethodAssembler = typeof(Assemblers.GetEndOfKernel))]
|
||||
public static uint GetEndOfKernel() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,24 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Cosmos.Hardware {
|
||||
public class CPU: Hardware {
|
||||
namespace Cosmos.Kernel {
|
||||
public class CPU {
|
||||
// Plugged
|
||||
public static void CreateIDT() { }
|
||||
|
||||
public static uint AmountOfMemory {
|
||||
/// <summary>
|
||||
/// Gets the amount of RAM in MB's.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected static uint GetAmountOfRAM() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected static uint GetEndOfKernel() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static uint AmountOfMemory {
|
||||
get {
|
||||
return GetAmountOfRAM();
|
||||
}
|
||||
|
|
@ -48,19 +48,15 @@
|
|||
<Compile Include="Debug.cs" />
|
||||
<Compile Include="Heap.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TextScreen-Old.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Indy.IL2CPU.Plugs\Indy.IL2CPU.Plugs.csproj">
|
||||
<Project>{E9B2E8CC-E264-42F9-9113-16B0A0431198}</Project>
|
||||
<Name>Indy.IL2CPU.Plugs</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Cosmos.Hardware\Cosmos.Hardware.csproj">
|
||||
<Project>{CE50FE98-9AC4-4B4D-ADC7-31F6DCD28755}</Project>
|
||||
<Name>Cosmos.Hardware</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CPU.cs" />
|
||||
<Compile Include="Global.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -2,150 +2,150 @@
|
|||
namespace Cosmos.Kernel {
|
||||
public static class DebugUtil {
|
||||
public static void Initialize() {
|
||||
Hardware.DebugUtil.Initialize();
|
||||
//Hardware.DebugUtil.Initialize();
|
||||
}
|
||||
|
||||
private static void StartLogging() {
|
||||
Hardware.DebugUtil.StartLogging();
|
||||
//Hardware.DebugUtil.StartLogging();
|
||||
}
|
||||
|
||||
private static void EndLogging() {
|
||||
Hardware.DebugUtil.EndLogging();
|
||||
//Hardware.DebugUtil.EndLogging();
|
||||
}
|
||||
|
||||
public static void SendNumber(string aModule, string aDescription, uint aNumber, byte aBits) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<Number Module=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Description=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Number=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aNumber, aBits);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<Number Module=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Description=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Number=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aNumber, aBits);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendTestCase(string testcase) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<TestCase_Started Name=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(testcase);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<TestCase_Started Name=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(testcase);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendTestAssert(bool condition, string message) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<TestCase Message=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(message);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Success=\"");
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<TestCase Message=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(message);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Success=\"");
|
||||
|
||||
if (condition)
|
||||
Hardware.DebugUtil.WriteSerialString("yes");
|
||||
else
|
||||
Hardware.DebugUtil.WriteSerialString("no");
|
||||
//if (condition)
|
||||
// Hardware.DebugUtil.WriteSerialString("yes");
|
||||
//else
|
||||
// Hardware.DebugUtil.WriteSerialString("no");
|
||||
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendDoubleNumber(string aModule, string aDescription, uint aNumber, byte aBits, uint aNumber2, byte aBits2) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<Number Module=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Description=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Number1=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aNumber, aBits);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Number2=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aNumber2, aBits2);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<Number Module=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Description=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Number1=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aNumber, aBits);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Number2=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aNumber2, aBits2);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendMessage(string aModule, string aData) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<Message Type=\"Info\" Module=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
Hardware.DebugUtil.WriteSerialString("\" String=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aData);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<Message Type=\"Info\" Module=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" String=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aData);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendKeyboardEvent(uint aScanCode, bool aReleased) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<KeyboardEvent ScanCode=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aScanCode, 32);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Released=\"");
|
||||
if (aReleased) {
|
||||
Hardware.DebugUtil.WriteSerialString("true");
|
||||
} else {
|
||||
Hardware.DebugUtil.WriteSerialString("false");
|
||||
}
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<KeyboardEvent ScanCode=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aScanCode, 32);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Released=\"");
|
||||
//if (aReleased) {
|
||||
// Hardware.DebugUtil.WriteSerialString("true");
|
||||
//} else {
|
||||
// Hardware.DebugUtil.WriteSerialString("false");
|
||||
//}
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendError(string aModule, string aData) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<Error Module=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
Hardware.DebugUtil.WriteSerialString("\" String=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aData);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<Error Module=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" String=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aData);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendError(string aModule, string aDescription, uint aData, byte aBits) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<Error Module=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
Hardware.DebugUtil.WriteSerialString("\" String=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Data=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aData, aBits);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<Error Module=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" String=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Data=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aData, aBits);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendWarning(string aModule, string aData) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<Warning Module=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
Hardware.DebugUtil.WriteSerialString("\" String=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aData);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<Warning Module=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" String=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aData);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendMM_Alloc(uint aStartAddr, uint aLength) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<MM_Alloc StartAddr=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aStartAddr, 32);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Length=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aLength, 32);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<MM_Alloc StartAddr=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aStartAddr, 32);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Length=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aLength, 32);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendMM_Init(uint aStartAddr, uint aLength) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<MM_Init StartAddr=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aStartAddr, 32);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Length=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aLength, 32);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<MM_Init StartAddr=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aStartAddr, 32);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Length=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aLength, 32);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
public static void SendMM_Free(uint aStartAddr, uint aLength) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<MM_Free StartAddr=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aStartAddr, 32);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Length=\"");
|
||||
Hardware.DebugUtil.WriteNumber(aLength, 32);
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
EndLogging();
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<MM_Free StartAddr=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aStartAddr, 32);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Length=\"");
|
||||
//Hardware.DebugUtil.WriteNumber(aLength, 32);
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//EndLogging();
|
||||
}
|
||||
|
||||
//internal static void SendExt2_GroupDescriptor(string aDescription, uint aBlock, int aIndex, uint aAddresss, FileSystem.Ext2.GroupDescriptor aDescriptor) {
|
||||
|
|
@ -743,29 +743,29 @@ namespace Cosmos.Kernel {
|
|||
//}
|
||||
|
||||
internal static void SendByteStream(string aModule, string aDescription, byte[] aContents) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<ByteStream Module=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Description=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Contents=\"0x");
|
||||
for (int i = 0; i < aContents.Length; i++) {
|
||||
Hardware.DebugUtil.WriteNumber(aContents[i], 8, false);
|
||||
}
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<ByteStream Module=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Description=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Contents=\"0x");
|
||||
//for (int i = 0; i < aContents.Length; i++) {
|
||||
// Hardware.DebugUtil.WriteNumber(aContents[i], 8, false);
|
||||
//}
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
}
|
||||
|
||||
internal static unsafe void SendBytes(string aModule, string aDescription, byte* aContents, uint aIndex, uint aCount) {
|
||||
StartLogging();
|
||||
Hardware.DebugUtil.WriteSerialString("<ByteStream Module=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Description=\"");
|
||||
Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
Hardware.DebugUtil.WriteSerialString("\" Contents=\"0x");
|
||||
for (uint i = aIndex; i < aCount; i++) {
|
||||
Hardware.DebugUtil.WriteNumber(aContents[i], 8, false);
|
||||
}
|
||||
Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
//StartLogging();
|
||||
//Hardware.DebugUtil.WriteSerialString("<ByteStream Module=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aModule);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Description=\"");
|
||||
//Hardware.DebugUtil.WriteSerialString(aDescription);
|
||||
//Hardware.DebugUtil.WriteSerialString("\" Contents=\"0x");
|
||||
//for (uint i = aIndex; i < aCount; i++) {
|
||||
// Hardware.DebugUtil.WriteNumber(aContents[i], 8, false);
|
||||
//}
|
||||
//Hardware.DebugUtil.WriteSerialString("\"/>\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Cosmos.Hardware;
|
||||
using Indy.IL2CPU.Plugs;
|
||||
|
||||
namespace Cosmos.Kernel {
|
||||
|
|
@ -26,7 +25,7 @@ namespace Cosmos.Kernel {
|
|||
|
||||
private static void ClearMemory(uint aStartAddress, uint aLength) {
|
||||
//int xStart = (RTC.GetMinutes() * 60) + RTC.GetSeconds();
|
||||
Hardware.CPU.ZeroFill(aStartAddress, aLength);
|
||||
CPU.ZeroFill(aStartAddress, aLength);
|
||||
//int xEnd = (RTC.GetMinutes() * 60) + RTC.GetSeconds();
|
||||
//int xDiff = xEnd - xStart;
|
||||
//Console.Write("Time to clear ");
|
||||
|
|
@ -63,7 +62,7 @@ namespace Cosmos.Kernel {
|
|||
public static void CheckInit() {
|
||||
if (!mInited) {
|
||||
mInited = true;
|
||||
Initialize(Hardware.CPU.EndOfKernel, (Hardware.CPU.AmountOfMemory * 1024 * 1024) - 1024);
|
||||
Initialize(CPU.EndOfKernel, (CPU.AmountOfMemory * 1024 * 1024) - 1024);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +72,7 @@ namespace Cosmos.Kernel {
|
|||
if ((xTemp + aLength) > (mStart + mLength)) {
|
||||
Console.WriteLine("Too large memory block allocated!");
|
||||
Console.Write(" BlockSize = ");
|
||||
Hardware.Storage.ATAOld.WriteNumber(aLength, 32);
|
||||
//Hardware.Storage.ATAOld.WriteNumber(aLength, 32);
|
||||
Console.WriteLine("");
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,31 +24,10 @@ namespace Cosmos.Shell.Console.Commands
|
|||
{
|
||||
DisplayVersion();
|
||||
}
|
||||
else if (param.CompareTo("dev") == 0)
|
||||
{
|
||||
DisplayDevelopers();
|
||||
}
|
||||
else
|
||||
Help();
|
||||
}
|
||||
|
||||
private void DisplayDevelopers()
|
||||
{
|
||||
Hardware.DebugUtil.SendMessage("Version", "Starting Developers list");
|
||||
Hardware.DebugUtil.SendNumber("Version.Developers", "StackPointer", Hardware.CPU.GetCurrentESP(), 32);
|
||||
System.Console.ForegroundColor = ConsoleColor.Red;
|
||||
System.Console.WriteLine("Cosmos Developers");
|
||||
System.Console.WriteLine("~~~~~~~~~~~~~~~~~");
|
||||
System.Console.ForegroundColor = ConsoleColor.White;
|
||||
|
||||
System.Console.WriteLine("Chad Z. Hower");
|
||||
System.Console.WriteLine("Matthijs ter Woord");
|
||||
System.Console.WriteLine("Jonathan Dickinson");
|
||||
System.Console.WriteLine("Scott Balmos");
|
||||
System.Console.WriteLine("");
|
||||
Hardware.DebugUtil.SendMessage("Version", "End of Developers list");
|
||||
}
|
||||
|
||||
private void DisplayVersion()
|
||||
{
|
||||
System.Console.ForegroundColor = ConsoleColor.Red;
|
||||
|
|
|
|||
Loading…
Reference in a new issue