forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
2,989 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
62
Demos/Cosmos Graphic Subsytem/Cosmos Graphic Subsytem.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
70
Demos/Cosmos Graphic Subsytem/Cosmos Graphic SubsytemBoot.Cosmos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.