Skip to content

Commit

Permalink
Merge branch 'master'.
Browse files Browse the repository at this point in the history
  • Loading branch information
jp2masa committed May 4, 2017
2 parents 846e192 + dda88d4 commit 5096e3c
Show file tree
Hide file tree
Showing 40 changed files with 2,989 additions and 290 deletions.
36 changes: 36 additions & 0 deletions Demos/Cosmos Graphic Subsytem/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Package Name")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Company")]
[assembly: AssemblyProduct("Package Name")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: NeutralResourcesLanguage("en-US")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]



62 changes: 62 additions & 0 deletions Demos/Cosmos Graphic Subsytem/Cosmos Graphic Subsytem.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{49F2C01D-D2C5-4564-810B-1AE92236C5C1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cosmos_Graphic_Subsytem</RootNamespace>
<AssemblyName>Cosmos Graphic Subsytem</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Kernel.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\source\Cosmos.Debug.Kernel\Cosmos.Debug.Kernel.csproj">
<Project>{61607f1e-58f9-41cf-972f-128384f3e115}</Project>
<Name>Cosmos.Debug.Kernel</Name>
</ProjectReference>
<ProjectReference Include="..\..\source\Cosmos.System\Cosmos.System.csproj">
<Project>{3def0461-08ab-471a-8f03-a9c556652a0f}</Project>
<Name>Cosmos.System</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
70 changes: 70 additions & 0 deletions Demos/Cosmos Graphic Subsytem/Cosmos Graphic SubsytemBoot.Cosmos
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1bc71853-22f3-415d-a068-8e1fa8e8f05b}</ProjectGuid>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<Name>Cosmos Graphic SubsytemBoot</Name>
<BinFormat>elf</BinFormat>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Profile>Bochs</Profile>
<DebugEnabled>true</DebugEnabled>
<DebugMode>Source</DebugMode>
<TraceMode>User</TraceMode>
<EnableGDB>False</EnableGDB>
<StartCosmosGDB>false</StartCosmosGDB>
<VMWareEdition>Player</VMWareEdition>
<OutputPath>bin\Debug\</OutputPath>
<Name>Cosmos Graphic SubsytemBoot</Name>
<Description>Use Bochs emulator to deploy and debug.</Description>
<Deployment>ISO</Deployment>
<Launch>Bochs</Launch>
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
<PxeInterface>192.168.0.3</PxeInterface>
<VMware_Name>Cosmos Graphic SubsytemBoot</VMware_Name>
<VMware_Description>Use VMware Player or Workstation to deploy and debug.</VMware_Description>
<VMware_Deployment>ISO</VMware_Deployment>
<VMware_Launch>VMware</VMware_Launch>
<VMware_DebugEnabled>true</VMware_DebugEnabled>
<VMware_DebugMode>Source</VMware_DebugMode>
<VMware_VisualStudioDebugPort>Pipe: Cosmos\Serial</VMware_VisualStudioDebugPort>
<VMware_PxeInterface>192.168.0.3</VMware_PxeInterface>
<VMware_VMwareEdition>Player</VMware_VMwareEdition>
<VMware_OutputPath>bin\Debug\</VMware_OutputPath>
<VMware_EnableGDB>False</VMware_EnableGDB>
<VMware_StartCosmosGDB>false</VMware_StartCosmosGDB>
<Bochs_Name>Cosmos Graphic SubsytemBoot</Bochs_Name>
<Bochs_Description>Use Bochs emulator to deploy and debug.</Bochs_Description>
<Bochs_Deployment>ISO</Bochs_Deployment>
<Bochs_Launch>Bochs</Bochs_Launch>
<Bochs_DebugEnabled>true</Bochs_DebugEnabled>
<Bochs_DebugMode>Source</Bochs_DebugMode>
<Bochs_VisualStudioDebugPort>Pipe: Cosmos\Serial</Bochs_VisualStudioDebugPort>
<Bochs_PxeInterface>192.168.0.3</Bochs_PxeInterface>
<Bochs_VMwareEdition>Player</Bochs_VMwareEdition>
<Bochs_OutputPath>bin\Debug\</Bochs_OutputPath>
<Bochs_EnableGDB>False</Bochs_EnableGDB>
<Bochs_StartCosmosGDB>false</Bochs_StartCosmosGDB>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include=".\Cosmos Graphic Subsytem.csproj">
<Name>Cosmos Graphic Subsytem</Name>
<Project>{49f2c01d-d2c5-4564-810b-1ae92236c5c1}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
<Reference Include="Cosmos.System.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
</ItemGroup>
<!--<ItemGroup>
<Content Include="Cosmos.bxrc">
<SubType>Content</SubType>
</Content>
</ItemGroup>-->
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
</Project>
77 changes: 77 additions & 0 deletions Demos/Cosmos Graphic Subsytem/Kernel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
using System;
using Cosmos.System.Graphics;
using Sys = Cosmos.System;

/*
* Beware Demo Kernels are not recompiled when its dependencies changes!
* To force recompilation right click on on the Cosmos icon of the demo solution and do "Build".
*/
namespace Cosmos_Graphic_Subsytem
{
public class Kernel : Sys.Kernel
{
Canvas canvas;
protected override void BeforeRun()
{
Console.WriteLine("Cosmos booted successfully. Let's go in Graphic Mode");

/* Get on istance of the Canvas that is all the Screen */
canvas = FullScreenCanvas.GetFullScreenCanvas();

/* Clear the Screen with the color 'Blue' */
canvas.Clear(Color.Blue);
}

protected override void Run()
{
try
{
mDebugger.Send("Run");

/* A red Point */
Pen pen = new Pen(Color.Red);
canvas.DrawPoint(pen, 69, 69);

/* A GreenYellow horizontal line */
pen.Color = Color.GreenYellow;
canvas.DrawLine(pen, 250, 100, 400, 100);

/* An IndianRed vertical line */
pen.Color = Color.IndianRed;
canvas.DrawLine(pen, 350, 150, 350, 250);

/* A MintCream diagonal line */
pen.Color = Color.MintCream;
canvas.DrawLine(pen, 250, 150, 400, 250);

/* A PaleVioletRed rectangle */
pen.Color = Color.PaleVioletRed;
canvas.DrawRectangle(pen, 350, 350, 80, 60);

/*
* It will be really beautiful to do here:
* canvas.DrawString(pen, "Please press any key to continue the Demo...");
*/
Console.ReadKey();

/* Let's try to change mode...*/
canvas.Mode = new Mode(800, 600, ColorDepth.ColorDepth32);

/* A LimeGreen rectangle */
pen.Color = Color.LimeGreen;
canvas.DrawRectangle(pen, 450, 450, 80, 60);

/*
* It will be really beautiful to do here:
* canvas.DrawString(pen, "Please press any key to end the Demo...");
*/
Console.ReadKey();
Stop();
}
catch (Exception e)
{
Console.WriteLine($"Got fatal exception {e.Message}");
}
}
}
}
7 changes: 6 additions & 1 deletion Demos/Guess/Kernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
using Cosmos.Debug.Kernel;
using Sys = Cosmos.System;

/*
* Beware Demo Kernels are not recompiled when its dependencies changes!
* To force recompilation right click on on the Cosmos icon of the demo solution and do "Build".
*/
namespace Guess
{
public class GuessOS : Sys.Kernel
Expand All @@ -15,7 +19,6 @@ public class GuessOS : Sys.Kernel

public GuessOS()
{

// Didnt check if tickcount is working yet.. can change this later
//var xRandom = new Random(234243534);
//mMagicNo = xRandom.Next(1, 100);
Expand Down Expand Up @@ -55,6 +58,8 @@ protected override void Run()
else
{
Console.WriteLine("You guessed it!");
Console.WriteLine("Press any key to end Guess Demo. Thanks for playing!");
Console.ReadKey();
Stop();
}
}
Expand Down
6 changes: 3 additions & 3 deletions Docs/Directories.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This directory contains the basic Cosmos demo project, it's a simple guess-the-n

### \Docs

This direcotry contains the Cosmos documentation that you're currently reading.
This directory contains the Cosmos documentation that you're currently reading.

### \QA

Expand All @@ -38,15 +38,15 @@ This directory contains all the scripts and languages to build the Cosmos User K

### \Source

This directory contains all the code of the Cosmos project. You will spend most of your time here, including the Compiler, Installer, Debugger and the main features of Cosmos. It's contains unused code, the solution file of Cosmos and some support libraries.
This directory contains all the code of the Cosmos project. You will spend most of your time here, including the Compiler, Installer, Debugger and the main features of Cosmos. It contains unused code, the solution file of Cosmos and some support libraries.

#### \Source\Cosmos.Assembler

This directory contains the Cosmos assembler, the thing that writes generated assembly code in the kernel file.

#### \Source\Cosmos.Build

This directory contains any code related to the building process of Cosmos with the exception of
This directory contains code related to the building process of Cosmos with the exception of
IL2CPU which is however executed from here, it's contains code for executing ld,
nasm, makeiso, MSBuild, and others.

Expand Down
2 changes: 1 addition & 1 deletion Tests/BoxingTests/BoxingTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
<ProjectReference Include="..\Cosmos.TestRunner.TestController\Cosmos.TestRunner.TestController.csproj" />
</ItemGroup>

</Project>
</Project>
Loading

0 comments on commit 5096e3c

Please sign in to comment.