Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/CosmosOS/Cosmos
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbetros committed Oct 17, 2017
2 parents a3c412b + 38d65c4 commit ec41cc0
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 86 deletions.
2 changes: 1 addition & 1 deletion Build.sln
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IL2CPU", "..\IL2CPU\source\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.IL2CPU", "..\IL2CPU\source\Cosmos.IL2CPU\Cosmos.IL2CPU.csproj", "{3C45A898-4AA9-476F-8302-63391D6ED044}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.Symbols", "..\IL2CPU\source\Cosmos.Debug.Symbols\Cosmos.Debug.Symbols.csproj", "{2E740096-911F-47D0-A46D-998DBB76FC5D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IL2CPU.Debug.Symbols", "..\IL2CPU\source\IL2CPU.Debug.Symbols\IL2CPU.Debug.Symbols.csproj", "{2E740096-911F-47D0-A46D-998DBB76FC5D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.DebugConnectors", "source\Cosmos.Debug.DebugConnectors\Cosmos.Debug.DebugConnectors.csproj", "{BC91BCEF-D146-4EB0-BE63-C637880C5800}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion IDE.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Debug.GDB", "source\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.Hosts", "source\Cosmos.Debug.Hosts\Cosmos.Debug.Hosts.csproj", "{C9826909-2E5E-4453-93FA-B6BE4503DF02}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.Symbols", "..\IL2CPU\source\Cosmos.Debug.Symbols\Cosmos.Debug.Symbols.csproj", "{ECC4319F-A844-45B8-BF63-2FD04F05E56A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IL2CPU.Debug.Symbols", "..\IL2CPU\source\IL2CPU.Debug.Symbols\IL2CPU.Debug.Symbols.csproj", "{ECC4319F-A844-45B8-BF63-2FD04F05E56A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Deploy.Pixie", "source\Cosmos.Deploy.Pixie\Cosmos.Deploy.Pixie.csproj", "{D4BA64B3-D7F6-4A3A-AF1D-74E41B49D865}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion Kernel.sln
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.IL2CPU", "..\IL2CPU\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Build.Common", "source\Cosmos.Build.Common\Cosmos.Build.Common.csproj", "{67FD9912-CE63-4EB2-880C-F4F0D9AED7CA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.Symbols", "..\IL2CPU\source\Cosmos.Debug.Symbols\Cosmos.Debug.Symbols.csproj", "{4E9B8F31-AEA0-402D-9B3A-223100F2156D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IL2CPU.Debug.Symbols", "..\IL2CPU\source\IL2CPU.Debug.Symbols\IL2CPU.Debug.Symbols.csproj", "{4E9B8F31-AEA0-402D-9B3A-223100F2156D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Plugs.TapRoot", "source\Kernel-X86\91-Plugs\Cosmos.Plugs.TapRoot\Cosmos.Plugs.TapRoot.csproj", "{BEEDA0BE-0105-40BF-BD8D-7F6A2BC3B05C}"
EndProject
Expand Down
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Cosmos Website
# Cosmos

For instructions on how to install and use Cosmos, please visit [www.goCosmos.org](http://www.goCosmos.org).

Build status for master branch:
[![Build status](https://ci.appveyor.com/api/projects/status/kust7g5dlnykhkaf/branch/master?svg=true)](https://ci.appveyor.com/project/CosmosOS/cosmos/branch/master)

# Urgent Notice

## Updated Sep 29, 2017

The hosting service which hosts our website has a technical issue which has taken our website offline. We are urgently working to resolve this issue.

## Hurricane Harvey
Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!

The issue is being impacted by lasting impacts to a center in Houston affected by Harvey and the impacts of moving resources out of the affected location.
For instructions on how to install and use Cosmos, please visit the [Cosmos website](http://www.gocosmos.org).
7 changes: 0 additions & 7 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
### Common Issues
- When installing the Dev Kit, if .NET Framework 4.6.2 isn't being found, try installing it from: https://www.microsoft.com/en-us/download/details.aspx?id=53321
- (User Kit 20170620) When using Visual Studio 2017 15.3, Cosmos projects fail to build. To fix this, go to "%appdata%\Cosmos User Kit\Build\VSIP\", open Cosmos.targets in a text editor and add these lines to the first PropertyGroup:
```xml
<ImplicitlyExpandNETStandardFacades>False</ImplicitlyExpandNETStandardFacades>
<DesignTimeBuild>True</DesignTimeBuild>
<ProjectAssetsFile>NULL</ProjectAssetsFile>
```
^This issue is fixed in Userkit 20170928 https://github.com/CosmosOS/Cosmos/releases/tag/Userkit_20170928
2 changes: 1 addition & 1 deletion Test.sln
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Core.DebugStub", "so
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.Hosts", "source\Cosmos.Debug.Hosts\Cosmos.Debug.Hosts.csproj", "{C9826909-2E5E-4453-93FA-B6BE4503DF02}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.Symbols", "..\IL2CPU\source\Cosmos.Debug.Symbols\Cosmos.Debug.Symbols.csproj", "{ECC4319F-A844-45B8-BF63-2FD04F05E56A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IL2CPU.Debug.Symbols", "..\IL2CPU\source\IL2CPU.Debug.Symbols\IL2CPU.Debug.Symbols.csproj", "{ECC4319F-A844-45B8-BF63-2FD04F05E56A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.HAL2", "source\Cosmos.HAL2\Cosmos.HAL2.csproj", "{1425715D-1C93-44C7-8BB5-F124F195A41A}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion source/Cosmos.Build.MSBuild/Cosmos.Build.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<ItemGroup>
<ProjectReference Include="..\Cosmos.Build.Common\Cosmos.Build.Common.csproj" />
<ProjectReference Include="..\..\..\IL2CPU\source\Cosmos.Debug.Symbols\Cosmos.Debug.Symbols.csproj" />
<ProjectReference Include="..\..\..\IL2CPU\source\IL2CPU.Debug.Symbols\IL2CPU.Debug.Symbols.csproj" />
</ItemGroup>

<Target Name="ExcludeSystemDataCommon" AfterTargets="ImplicitlyExpandNETStandardFacades">
Expand Down
15 changes: 0 additions & 15 deletions source/Cosmos.Core_Plugs/System/BufferImpl.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
using System;
using Cosmos.IL2CPU.API;
using Cosmos.IL2CPU.API.Attribs;

namespace Cosmos.Core_Plugs.System
{
[Plug(Target = typeof(Buffer))]
public class BufferImpl
{
// __Memcpy doesn't exist in net core
//[PlugMethod(IsOptional = true)]
//public static unsafe void __Memcpy(byte* src, byte* dest, int count)
//{
// Buffer.BlockCopy((Array)(object)*src, 0, (Array)(object)*dest, 0, count);
//}

//[PlugMethod(IsOptional = true)]
//public static unsafe void __Memcpy(byte* src, byte* dest, long count)
//{
// // TODO: Cast could cause a loss of data.
// Buffer.BlockCopy((Array)(object)*src, 0, (Array)(object)*dest, 0, (int) count);
//}

/// <summary>
/// The memmove() function copies n bytes from memory area src to memory area dest.
/// The memory areas may overlap: copying takes place as though the bytes in src
Expand Down
4 changes: 0 additions & 4 deletions source/Cosmos.Debug.Common/Cosmos.Debug.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
<PackageName>Cosmos.Debug.Common</PackageName>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\IL2CPU\source\Cosmos.Debug.Symbols\Cosmos.Debug.Symbols.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.4.0" />
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
Expand Down
2 changes: 0 additions & 2 deletions source/Cosmos.Debug.DebugConnectors/DebugConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ public virtual void Dispose()
}
if (mBackgroundThread != null)
{
// not supported in .net core
//mBackgroundThread.Abort();
mCancellationTokenSource.Cancel();
mBackgroundThread.Join();
mBackgroundThread = null;
Expand Down
6 changes: 3 additions & 3 deletions source/Cosmos.HAL2/Drivers/Video/VGAScreen.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define COSMOSDEBUG
using System;
using System.Drawing;

using Cosmos.Core;
using Cosmos.Debug.Kernel;
Expand Down Expand Up @@ -501,10 +502,10 @@ public void Clear(int color)
}
}

//TODO: .Net Core
// TODO: Enable code that uses Color when we move to .NET Core 2.1 (plug won't be needed)

//private Color[] _Palette = new Color[256];

//TODO: .Net Core
//public Color GetPaletteEntry(int index)
//{
// return _Palette[index];
Expand All @@ -517,7 +518,6 @@ public void SetPalette(int index, byte[] pallete)
mIO.DAC_Data.Byte = (byte)(pallete[i] >> 2);
}

//TODO: .Net Core
//public void SetPaletteEntry(int index, Color color)
//{
// SetPaletteEntry(index, color.R, color.G, color.B);
Expand Down
4 changes: 1 addition & 3 deletions source/Cosmos.System2/FileSystem/FAT/FatFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,7 @@ internal void Write(long aCluster, byte[] aData, long aSize = 0, long aOffset =
byte[] xData;

Read(aCluster, out xData);
//TODO: .Net Core
//Array.Copy(aData, 0, xData, aOffset, aData.Length);
Array.Copy(aData, 0, xData, (int)aOffset, aData.Length);
Array.Copy(aData, 0, xData, aOffset, aData.Length);

if (mFatType == FatTypeEnum.Fat32)
{
Expand Down
6 changes: 2 additions & 4 deletions source/Cosmos.System2/FileSystem/FAT/FatStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ public override int Read(byte[] aBuffer, int aOffset, int aCount)
xReadSize = xCount;
}

//TODO: .Net Core
//Array.Copy(xCluster, xPosInCluster, aBuffer, xOffset, xReadSize);
Array.Copy(xCluster, (int)xPosInCluster, aBuffer, (int)xOffset, (int)xReadSize);
Array.Copy(xCluster, xPosInCluster, aBuffer, xOffset, xReadSize);

xOffset += xReadSize;
xCount -= xReadSize;
Expand Down Expand Up @@ -276,4 +274,4 @@ public override void Write(byte[] aBuffer, int aOffset, int aCount)
mPosition += xOffset;
}
}
}
}
12 changes: 3 additions & 9 deletions source/Cosmos.System2/FileSystem/FAT/Listing/FatDiretoryEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,7 @@ internal void SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata aEntryMet
var xValue = new byte[aEntryMetadata.DataLength];
xValue.SetUInt32(0, aValue);
uint offset = mEntryHeaderDataOffset + aEntryMetadata.DataOffset;
//TODO: .Net Core
//Array.Copy(xValue, 0, xData, offset, aEntryMetadata.DataLength);
Array.Copy(xValue, 0, xData, (int)offset, (int)aEntryMetadata.DataLength);
Array.Copy(xValue, 0, xData, offset, aEntryMetadata.DataLength);
((FatDirectoryEntry)mParent).SetDirectoryEntryData(xData);
}
}
Expand All @@ -652,9 +650,7 @@ internal void SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata aEntryMet
uint offset = mEntryHeaderDataOffset + aEntryMetadata.DataOffset;
Global.mFileSystemDebugger.SendInternal("offset =");
Global.mFileSystemDebugger.SendInternal(offset);
//TODO: .Net Core
//Array.Copy(xValue, 0, xData, offset, aEntryMetadata.DataLength);
Array.Copy(xValue, 0, xData, (int)offset, (int)aEntryMetadata.DataLength);
Array.Copy(xValue, 0, xData, offset, aEntryMetadata.DataLength);
((FatDirectoryEntry)mParent).SetDirectoryEntryData(xData);
}
}
Expand All @@ -678,9 +674,7 @@ internal void SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata aEntryMet
xValue = aValue.GetUtf8Bytes(0, aEntryMetadata.DataLength);

uint offset = mEntryHeaderDataOffset + aEntryMetadata.DataOffset;
//TODO: .Net Core
//Array.Copy(xValue, 0, xData, offset, aEntryMetadata.DataLength);
Array.Copy(xValue, 0, xData, (int)offset, (int)aEntryMetadata.DataLength);
Array.Copy(xValue, 0, xData, offset, aEntryMetadata.DataLength);

((FatDirectoryEntry)mParent).SetDirectoryEntryData(xData);
}
Expand Down
8 changes: 1 addition & 7 deletions source/Cosmos.System2/Graphics/Canvas.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
//#define COSMOSDEBUG
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Collections;
using System.Collections.ObjectModel;

namespace Cosmos.System.Graphics
{
Expand Down Expand Up @@ -343,7 +337,7 @@ public void DrawRectangle(Pen pen, float x_start, float y_start, float width, fl
throw new NotImplementedException();
}

// Image and Font aren't implemented in .NET Core
// Image and Font will be available in .NET Core 2.1
//public void DrawImage(Image image, int x, int y)
//{
// throw new NotImplementedException();
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.System2/Graphics/KnownColor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Modified from https://github.com/dotnet/corefx/blob/master/src/System.Drawing.Primitives/src/System/Drawing/KnownColor.cs
// This won't be needed anymore when .NET Core 2.0 is released
// Modified from https://github.com/dotnet/corefx/blob/34bd99277390609219bd742ca10b9f246fb81a98/src/System.Drawing.Primitives/src/System/Drawing/KnownColor.cs
// This enum is internal in .NET Core 2.0, but will be public in .NET Core 2.1

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
Expand Down
18 changes: 8 additions & 10 deletions source/Cosmos.System2/Keyboard/ConsoleKeyExExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ public static ConsoleKey ToConsoleKey(this ConsoleKeyEx keyEx)
{
switch (keyEx)
{
//TODO: .Net Core
//case ConsoleKeyEx.NoName:
// return ConsoleKey.NoName;
case ConsoleKeyEx.NoName:
return ConsoleKey.NoName;
case ConsoleKeyEx.Escape:
return ConsoleKey.Escape;
case ConsoleKeyEx.F1:
Expand Down Expand Up @@ -199,13 +198,12 @@ public static ConsoleKey ToConsoleKey(this ConsoleKeyEx keyEx)
case ConsoleKeyEx.Semicolon:
case ConsoleKeyEx.Colon:
return ConsoleKey.Oem1;
//TODO: .Net Core
//case ConsoleKeyEx.OEM102:
// return ConsoleKey.Oem102;
//case ConsoleKeyEx.LWin:
// return ConsoleKey.LeftWindows;
//case ConsoleKeyEx.RWin:
// return ConsoleKey.RightWindows;
case ConsoleKeyEx.OEM102:
return ConsoleKey.Oem102;
case ConsoleKeyEx.LWin:
return ConsoleKey.LeftWindows;
case ConsoleKeyEx.RWin:
return ConsoleKey.RightWindows;
default:
throw new Exception("KeyEx not implemented!");
}
Expand Down
2 changes: 1 addition & 1 deletion source/Cosmos.VS.DebugEngine/AD7.Impl/AD7Process.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ private void DbgCmdNullReferenceOccurred(uint lastEIPAddress)
var xSequencePoints = mDebugInfoDb.GetSequencePoints(mDebugInfoDb.GetAssemblyFileById(xMethod.AssemblyFileID).Pathname, xMethod.MethodToken);
var xLine = xSequencePoints.Where(q => q.Offset <= xMethodIlOp).Last().LineStart;

AD7Util.MessageBox($"NullReferenceException occurred in '{xMethod.LabelCall}'{Environment.NewLine}Document: {mDebugInfoDb.GetDocumentById(xMethod.DocumentID)}{Environment.NewLine}Line: {xLine}{Environment.NewLine}Address: 0x{lastEIPAddress.ToString("X8")}");
AD7Util.MessageBox($"NullReferenceException occurred in '{xMethod.LabelCall}'{Environment.NewLine}Document: {mDebugInfoDb.GetDocumentById(xMethod.DocumentID).Pathname}{Environment.NewLine}Line: {xLine}{Environment.NewLine}Address: 0x{lastEIPAddress.ToString("X8")}");
return;
}
catch (InvalidOperationException)
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.VS.DebugEngine/Cosmos.VS.DebugEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
</ProjectReference>
<ProjectReference Include="..\..\..\IL2CPU\source\Cosmos.Debug.Symbols\Cosmos.Debug.Symbols.csproj">
<ProjectReference Include="..\..\..\IL2CPU\source\IL2CPU.Debug.Symbols\IL2CPU.Debug.Symbols.csproj">
<Project>{ecc4319f-a844-45b8-bf63-2fd04f05e56a}</Project>
<Name>Cosmos.Debug.Symbols</Name>
<Name>IL2CPU.Debug.Symbols</Name>
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
</ProjectReference>
Expand Down

0 comments on commit ec41cc0

Please sign in to comment.