From dcb810cde2191c611e8785ec8873cd60b02b2cf9 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Sat, 23 May 2015 20:52:26 -0400 Subject: [PATCH 01/20] Update index.md Grammer fixes, added to Syslinux explanation. --- Docs/Articles/MS5/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Docs/Articles/MS5/index.md b/Docs/Articles/MS5/index.md index e7b29f27d..58dbf57fc 100644 --- a/Docs/Articles/MS5/index.md +++ b/Docs/Articles/MS5/index.md @@ -126,10 +126,10 @@ and it will appear in the Visual Studio output window. ### What's the catch? -There really is no catch. Everything I've shown here is functioning as seen. +There really is no catch. Everything We've shown here is functioning as seen. No mockups were used. However we still have a lot of work to go. Items of interest that are on our current task list include interfaces (necessary for -foreach), file systems (partial support exists), threads, networking, and +foreach loops), file systems (partial support exists), threads, networking, and graphics. We have prototypes and experimentation for each, but none have been rolled into the mainline Cosmos development as of yet. @@ -137,7 +137,7 @@ rolled into the mainline Cosmos development as of yet. Cosmos does not run on Linux. A boot loader called Syslinux is used to boot Cosmos. After booting, Syslinux is not used. Syslinux is a bootloader and is -not a Linux distro. +not a Linux distro. Syslinux simplifies the booting process by doing tasks such as enabline the A20 gate, initializing hardware, and switching to real mode (all of which are required by modern operating systems). ### Obtaining Cosmos From 5714c899decf8fa151b93b06f2003627a523f7a9 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Sat, 23 May 2015 20:55:02 -0400 Subject: [PATCH 02/20] Update index.md --- Docs/Articles/MS5/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Articles/MS5/index.md b/Docs/Articles/MS5/index.md index 58dbf57fc..3f9f5bc37 100644 --- a/Docs/Articles/MS5/index.md +++ b/Docs/Articles/MS5/index.md @@ -43,7 +43,7 @@ console window, you will see the following: ![](CosmosMS5/SNAG-0003.png) This is your operating system running in VMWare Player! Cosmos can of course -also be booted in VMWare Workstation, Hyper-V, Virtual PC, or on real +also be booted in VMWare Workstation, Hyper-V, Virtual PC, Bochs, or on real hardware. But by default Cosmos uses VMWare Player because it is both free, and reliable. Cosmos can even debug in Visual Studio, even when running on another machine. From 25ea72c4b5e36f12b6efa1059b31292abeeba680 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Sat, 23 May 2015 21:06:16 -0400 Subject: [PATCH 03/20] Update il2cpu.md Grammar fixes, fixed explanations. --- Docs/Compiler/il2cpu.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Docs/Compiler/il2cpu.md b/Docs/Compiler/il2cpu.md index 45e0739fc..0e2f91ae4 100644 --- a/Docs/Compiler/il2cpu.md +++ b/Docs/Compiler/il2cpu.md @@ -2,24 +2,22 @@ ### IL2CPU -This is one of the most important piece of code of Cosmos. It is an AOT +This is one of the most important pieces of code of Cosmos. It is an AOT (Ahead-Of-Time) compiler. -When you compile your C# program, it is compiled into the IL (intermediate +When you compile your C# (or any .NET language) program, it is compiled into the IL (intermediate language). The IL is then interpreted and executed by a Virtual Machine when -you open your exe +you open your exe. Cosmos is written in C# and Visual Studio compiles it into IL as always. But a -PC does not came with an interpreter for the IL code. And writing a virtual +PC does not come with an interpreter for the IL code. And writing a virtual machine for running an operating system is not always ideal. -IL2CPU takes the IL code and translates it to processor opcodes. Actually it +This is where IL2CPU comes in. IL2CPU takes the IL code and translates it to processor opcodes. Actually it only supports the x86 architecture. So it translates from IL to x86 opcodes, but it can be ported to any architecture. -As you might think, the develop of IL2CPU is a fundamental step for the grow -of Cosmos. IL2CPU is responsible for the final output of code and should -optimize it as much as possible. - -**TODO: explain this better.** Before finally creating the binary, IL2CPU does some more magic with files created in "C#/ASM". They are executed and from their execution an assembly file is get and integrated into the output. +At this point, IL2CPU performs some more magic before finally converting the entire file into a bootable binary file, which can be loaded by a bootloader on any system (Cosmos uses Syslinux). +As you might think, IL2CPU is a fundamental part of the development +of Cosmos. IL2CPU is responsible for the final output, which is why most optimizations added are for IL2CPU. From cbbed3f0c7b6d5e2614410158f275f41663252e7 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Wed, 27 May 2015 18:04:44 -0400 Subject: [PATCH 04/20] Delete Compile.md --- Docs/Express/Compile.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 Docs/Express/Compile.md diff --git a/Docs/Express/Compile.md b/Docs/Express/Compile.md deleted file mode 100644 index 5f23c9027..000000000 --- a/Docs/Express/Compile.md +++ /dev/null @@ -1,14 +0,0 @@ - For creating your own Cosmos in Express 2010 you need the following: - - * Visual Studio Express for C# or VB.NET - * installed Cosmos Kit(User Kit or compiled from checkout (Dev Kit)) - * Visual Studio 2010 Shell (Isolated Shell) - -In Visual Studio Express you create a library project, that contain your OS -code, and a project for compiling your OS. - - 1. Start Visual Studio Express 2010 and create a project named "Cosmos C# Library". This is the part of your OS for adding Code. Compile this project now for creating the DLL for later use. After that save it. - 2. (UNTESTED) Start your Microsoft Visual Studio 2010 Shell and create a Project "Cosmos Project (Empty)". It contains a custom Project that use MSBuild with many tasks to create your OS. Save the project. - 3. Copy now the created library with name of your project in the folder of the build project under bin/Debug/ Thats needed else would the added reference in next step not found. - 4. Add now the reference to the build project and try to build. When you get a warning that the added assembly is not found, you get "No Kernel Found!". - From 027b837fdfb3a25edcd00bff9bedbc78a9956285 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Wed, 27 May 2015 18:08:45 -0400 Subject: [PATCH 05/20] Update DevKit.md --- Docs/Installation/DevKit.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Docs/Installation/DevKit.md b/Docs/Installation/DevKit.md index d0445c521..79e44edac 100644 --- a/Docs/Installation/DevKit.md +++ b/Docs/Installation/DevKit.md @@ -1,21 +1,18 @@ ### Prerequisites -* (Free) source code of Devkit from [Cosmos on CodePlex](https://github.com/CosmosOS/Cosmos) -* (Optional) [Visual Studio 2013 Community](http://go.microsoft.com/fwlink/?LinkId=517284) -If you do not wish to use the integrated source control, you can use the SVN -bridge instead. +* (Free) source code of Devkit from [Cosmos on GitHub](https://github.com/CosmosOS/Cosmos) +* (Free) [Visual Studio 2013 Community](http://go.microsoft.com/fwlink/?LinkId=517284) -* If using Visual Studio 2010 Express, you can use the [SVN bridge](http://cosmos.codeplex.com/SourceControl/list/changesets) i.e. direct download current changeset in a zip file, or one of the many TFS standalone clients available at CodePlex. +* If using Visual Studio 2010 Express, you will need to download the [GitHub for Windows](#) tool. * (Free) [InnoSetup QuickStart Kit](http://www.jrsoftware.org/isdl.php#qsp) * This is required to build the setup kit which is used to build and install the Visual Studio integration libaries for Cosmos. * During install it will ask you about optional components to install. Be sure you check "Install Inno Setup Preprocessor". - * (Free) [ Visual Studio 2010 SDK](http://www.microsoft.com/downloads/en/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5) ### Installation -* Look in the downloaded sources and **run install.bat** with admin privileges (Vista and upper will ask you for it), needed for install in system directories -* On end it will start retail versions of Visual Studio and you can begin with OS development. +* Look in the downloaded sources and run **install.bat** with admin privileges (UAC will ask for permission), needed for install in system directories. +* After installation is complete, Visual Studio will automatically open and you may begin programming with your new, modified copy of Cosmos. ## Parameters to the install.bat The `install.bat` accepts following parameters From 4e2ebbfe40f048537c1d4c251c03f12fbeae53d7 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Wed, 27 May 2015 18:13:17 -0400 Subject: [PATCH 06/20] Update Running.md --- Docs/Installation/Running.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Docs/Installation/Running.md b/Docs/Installation/Running.md index a819b42f3..71432063a 100644 --- a/Docs/Installation/Running.md +++ b/Docs/Installation/Running.md @@ -6,15 +6,14 @@ can simply fall back to ISO which should work with any environment. ### ISO The ISO option creates an ISO image of the Cosmos output. This ISO file can be -mounted and booted by most virtualization technologies. In addition a physical +mounted and booted by most virtualization technologies. In addition, a physical optical disk can be burned and used to boot physical hardware. -### VMWare Workstation +### VMWare Workstation/Player WMWare Workstation and VMWare Player are the preferred testing environments for Cosmos. This is because they are stable, reliable, and easily controlled -by the Cosmos Visual Studio integration package. This second point provides -for a seemless development and debugging process. +by the Cosmos Visual Studio integration package. This allows for easy debugging and code execution control. VMWare Workstation is not free, however VMWare Player is. VMWare Player for the typical Cosmos developer provides more than enough functionality. @@ -29,19 +28,20 @@ VMWare Player can be downloaded [ here](http://vmware.com/download/player/). ### QEMU - _place_holder; +Not officially supported at this time, but can be done. Just use the ISO option above with debugging turned off. Bochs - _place_holder; +Support is underway. PXE - _place_holder; +For PXE, no special software is required. Only an ethernet connection to your router. However, if you have a computer that does not support network booting, or if you must perform the action over WiFi, you may need to look at a PXE chainloader such as [gPXE](#). Virtual PC - _place_holder; +Not officially supported at this time, but can be done. Just use the ISO option above with debugging turned off. Hyper-V +Not supported at this time. From e5bac83dda0109ca6e5c89f83e948e791c42cf03 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Thu, 28 May 2015 20:50:54 -0400 Subject: [PATCH 07/20] Update Startup.md --- Docs/Kernel/Startup.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Docs/Kernel/Startup.md b/Docs/Kernel/Startup.md index 21350b569..d3b7c28d8 100644 --- a/Docs/Kernel/Startup.md +++ b/Docs/Kernel/Startup.md @@ -1,8 +1,3 @@ - - -There is some basic hand coded assembly which is the first entry point of -Cosmos. From there the first C# entry point is Cosmos.System.Kernel.Start(). - -Cosmos.System.Kernel is an abstract class that each project creates one -descendant of to create the operating system. +On startup, there is some hand-coded assembly that runs before the Cosmos layer kicks in. From there, the C# entry point Cosmos.System.Kernel.Start() is called. +Cosmos.System.Kernel is an abstract class that forms the Cosmos framework upon which your OS is built upon. From 796318b933d6d0bc5fe8120528954e763c5af5fb Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Thu, 28 May 2015 20:55:32 -0400 Subject: [PATCH 08/20] Update Plugs.md --- Docs/Kernel/Plugs.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Docs/Kernel/Plugs.md b/Docs/Kernel/Plugs.md index 39b2e97a2..3fdf9e08f 100644 --- a/Docs/Kernel/Plugs.md +++ b/Docs/Kernel/Plugs.md @@ -1,8 +1,8 @@ Plugs are used to fill "holes" in .NET libraries and replace them with different code. Holes exist for example when a method in .NET library uses a Windows API call. That API call will not be available on Cosmos. One method would be to - emulate the Windows API as WINE does, but the API is a low level C style API - relying on memory structures. Emulating it would be highly inefficient. Instead, + emulate the Windows API as WINE does, but the WINE API is a low level C style API + relying on pre-existing memory structures. Emulating it would be highly inefficient. Instead, Cosmos replaces specific methods and property implementations that rely on Windows API calls. Plugs can also be used to provide an alternate implementation for a method, even if it does not rely on the Windows API. @@ -10,27 +10,28 @@ Plugs are used to fill "holes" in .NET libraries and replace them with different Plugs can be implemented in the following manners: * Code Plug - Standard C# (or any .NET language) is used to provide the alternate implementation. -* Assembly Languge - In a few low level cases assembly language is used. This is reserved for a few few cases and only allowed in the Cosmos.Core ring. +* Assembly Languge - In a few low level cases assembly language is used. This is reserved for a few cases and only allowed in the Cosmos.Core ring. +* X# - Not supported as of yet. Used in place of Assembly language. When a Cosmos project is compiled, IL2CPU creates a list of plugs. When it encounters a method or property for which a plug exists, instead of using the IL - contained in the existing implementation, it substitutes the plug version + contained in the existing implementation, it substitutes it with the plug version instead. ### Plug Targets -* Source Plugs - Used to target a class library without modifiable or available source. For example the Console class in the .NET Framework. The Console class uses the Windows API, so plugs can be used to redefine the methods in the Console class to use code which interacts with Cosmos instead. For these types of plug targets, the attributes are specified on the plug implemenation since the source cannot be modified of the target. If we coud modify the source, we wouldn't need plugs. :)Sou +* Source Plugs - Used to target a class library without modifiable or available source. For example the Console class in the .NET Framework. The Console class uses the Windows API, so plugs can be used to redefine the methods in the Console class to use code which interacts with Cosmos instead. For these types of plug targets, the attributes are specified on the plug implemenation since the source cannot be modified of the target. If we coud modify the source, we wouldn't need plugs. :) * Assembly Plug - Empty methods which create a sort of "abstract" class are used to define an interface to an assembly language plug. This type of plug is rare and only for the core ring. For these types of plugs, the attributes are specified on the target, rather than the implementation. - Non source targets should never need to use assembly language, but if they do + Non-source targets should never need to use assembly language, but if they do the plugs must be cascaded since assembly language plugs can only be applied to classes with modifiable source. ### Implementing a Plug - Plugs can be applied at the class, or to an individual method or property. Plug + Plugs can be applied to a class, or to an individual method or property. Plug implementations are defined by applying attributes to the class which provides the plug implementation. @@ -61,4 +62,4 @@ Plugs are used to fill "holes" in .NET libraries and replace them with different **Plug Target** Please specify the PlugTarget using the fully qualified name, like: - global::System.Console. To avoid later name colisions. \ No newline at end of file + global::System.Console. To avoid later name colisions. From 345ce3139efcc33f4aff70bd8a68ada05114d00d Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Thu, 28 May 2015 20:59:05 -0400 Subject: [PATCH 09/20] Update MemoryManager.md --- Docs/Kernel/MemoryManager.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Docs/Kernel/MemoryManager.md b/Docs/Kernel/MemoryManager.md index dfc8e389f..1cbfb0ef4 100644 --- a/Docs/Kernel/MemoryManager.md +++ b/Docs/Kernel/MemoryManager.md @@ -1,11 +1,11 @@ # The Memory Manager -The manager will init it self if there is no blocks, the manager is model after a double LinkedList and not a List. +The manager will init itself if there are no blocks. The manager is modeled after a double LinkedList and is not a List. # Memory Layout -The layout has not preset list or table but rather every item has meta data linking the next and previous item this allows for a robust system. +The layout does not have a preset list or table but rather every item has meta data linking the next and previous item. This allows for a robust system. -The data layout looks as follow : +The data layout is as follows: ```` Block|Block|Block etc. @@ -33,10 +33,10 @@ the final layout looks like this: Note: this means the smallest size an Block can occupy is 17 bytes, 16 bytes for the header and 1 for the smallest data type a byte. -# How this system is used. +# Usage ### Allocation - Adding an Block is easy, you simply find the first free block using compare exchange and split it. + Adding an Block is easy, you simply find the first free block using compare/exchange(x86 opcode-CMPXCHG) and split it. -## Deallocation (free) - Freeing a block is easy set its flag(in meta data) to Free +## Deallocation + Freeing a block is easy set its flag(in the metadata) to free. From 08f6e35717019b4672a0f100042ab4c5fccf32cd Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Thu, 28 May 2015 21:19:06 -0400 Subject: [PATCH 10/20] Update il2cpu.md --- Docs/Compiler/il2cpu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Compiler/il2cpu.md b/Docs/Compiler/il2cpu.md index 0e2f91ae4..57ab2d5b7 100644 --- a/Docs/Compiler/il2cpu.md +++ b/Docs/Compiler/il2cpu.md @@ -2,7 +2,7 @@ ### IL2CPU -This is one of the most important pieces of code of Cosmos. It is an AOT +This is one of the most important pieces of code in Cosmos. It's an AOT (Ahead-Of-Time) compiler. When you compile your C# (or any .NET language) program, it is compiled into the IL (intermediate From ef139014918c32e6d381d91beee5be6fb71d6e83 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 09:21:36 -0400 Subject: [PATCH 11/20] Update il2cpu.md --- Docs/Compiler/il2cpu.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Docs/Compiler/il2cpu.md b/Docs/Compiler/il2cpu.md index 57ab2d5b7..2d6f0c280 100644 --- a/Docs/Compiler/il2cpu.md +++ b/Docs/Compiler/il2cpu.md @@ -13,9 +13,7 @@ Cosmos is written in C# and Visual Studio compiles it into IL as always. But a PC does not come with an interpreter for the IL code. And writing a virtual machine for running an operating system is not always ideal. -This is where IL2CPU comes in. IL2CPU takes the IL code and translates it to processor opcodes. Actually it -only supports the x86 architecture. So it translates from IL to x86 opcodes, -but it can be ported to any architecture. +This is where IL2CPU comes in. IL2CPU takes the IL code and translates it to processor opcodes. Currently, only x86 opcodes are available at the moment. However, more architectures are planned for the future. At this point, IL2CPU performs some more magic before finally converting the entire file into a bootable binary file, which can be loaded by a bootloader on any system (Cosmos uses Syslinux). From 3315d3017b873e63c1d1952e4e91925223384aa5 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 09:22:01 -0400 Subject: [PATCH 12/20] Update il2cpu.md --- Docs/Compiler/il2cpu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Compiler/il2cpu.md b/Docs/Compiler/il2cpu.md index 2d6f0c280..4f988133c 100644 --- a/Docs/Compiler/il2cpu.md +++ b/Docs/Compiler/il2cpu.md @@ -13,7 +13,7 @@ Cosmos is written in C# and Visual Studio compiles it into IL as always. But a PC does not come with an interpreter for the IL code. And writing a virtual machine for running an operating system is not always ideal. -This is where IL2CPU comes in. IL2CPU takes the IL code and translates it to processor opcodes. Currently, only x86 opcodes are available at the moment. However, more architectures are planned for the future. +This is where IL2CPU comes in. IL2CPU takes the IL code and translates it to processor opcodes. Currently, only x86 opcodes are available at the moment. However, more architectures are planned for the future (ARM, PowerPC, x86-64). At this point, IL2CPU performs some more magic before finally converting the entire file into a bootable binary file, which can be loaded by a bootloader on any system (Cosmos uses Syslinux). From fcde128547fc5efb32adca2220d44a96c19dd3a0 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 09:56:13 -0400 Subject: [PATCH 13/20] Update DevKit.md --- Docs/Installation/DevKit.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Docs/Installation/DevKit.md b/Docs/Installation/DevKit.md index 79e44edac..7cc728936 100644 --- a/Docs/Installation/DevKit.md +++ b/Docs/Installation/DevKit.md @@ -1,13 +1,16 @@ ### Prerequisites -* (Free) source code of Devkit from [Cosmos on GitHub](https://github.com/CosmosOS/Cosmos) +* (Free) source code of Devkit from [Cosmos on GitHub](https://github.com/CosmosOS/Cosmos) + * You must clone the repository using Git. For a detailed walkthrough, [see here](https://help.github.com/articles/fork-a-repo/). + * When following the tutorial, replace *OctoCat* with *CosmosOS* and *Spoon-Knife* with *Cosmos*. * (Free) [Visual Studio 2013 Community](http://go.microsoft.com/fwlink/?LinkId=517284) -* If using Visual Studio 2010 Express, you will need to download the [GitHub for Windows](#) tool. - * (Free) [InnoSetup QuickStart Kit](http://www.jrsoftware.org/isdl.php#qsp) - * This is required to build the setup kit which is used to build and install the Visual Studio integration libaries for Cosmos. +* If using Visual Studio 2010, you will need to download the [GitHub for Windows](#) tool. +* (Free) [InnoSetup QuickStart Kit](http://www.jrsoftware.org/isdl.php#qsp) + * This is required to build the setup kit which is used to build and install the Visual Studio integration libaries for Cosmos. * During install it will ask you about optional components to install. Be sure you check "Install Inno Setup Preprocessor". +* Visual Studio SDK: [download here](https://www.microsoft.com/en-us/download/details.aspx?id=40758). ### Installation From 63aa31fe0da1cece8b1969be110bc5206132a278 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 09:57:10 -0400 Subject: [PATCH 14/20] Update DevKit.md --- Docs/Installation/DevKit.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Docs/Installation/DevKit.md b/Docs/Installation/DevKit.md index 7cc728936..f7812178e 100644 --- a/Docs/Installation/DevKit.md +++ b/Docs/Installation/DevKit.md @@ -5,8 +5,6 @@ * You must clone the repository using Git. For a detailed walkthrough, [see here](https://help.github.com/articles/fork-a-repo/). * When following the tutorial, replace *OctoCat* with *CosmosOS* and *Spoon-Knife* with *Cosmos*. * (Free) [Visual Studio 2013 Community](http://go.microsoft.com/fwlink/?LinkId=517284) - -* If using Visual Studio 2010, you will need to download the [GitHub for Windows](#) tool. * (Free) [InnoSetup QuickStart Kit](http://www.jrsoftware.org/isdl.php#qsp) * This is required to build the setup kit which is used to build and install the Visual Studio integration libaries for Cosmos. * During install it will ask you about optional components to install. Be sure you check "Install Inno Setup Preprocessor". From 63520ae85fdfeda8b2b90a086af7b34c454d59d0 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 09:58:31 -0400 Subject: [PATCH 15/20] Update MemoryManager.md --- Docs/Kernel/MemoryManager.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/Kernel/MemoryManager.md b/Docs/Kernel/MemoryManager.md index 1cbfb0ef4..5b3a485df 100644 --- a/Docs/Kernel/MemoryManager.md +++ b/Docs/Kernel/MemoryManager.md @@ -36,7 +36,7 @@ this means the smallest size an Block can occupy is 17 bytes, 16 bytes for the h # Usage ### Allocation - Adding an Block is easy, you simply find the first free block using compare/exchange(x86 opcode-CMPXCHG) and split it. + Adding an Block is easy, just use the System.Threading.Interlocked class. ## Deallocation - Freeing a block is easy set its flag(in the metadata) to free. + Freeing a block is easy set its flag (in the metadata) to free. From 0b8aacb737dff13eae36bdc43ef3924c0be7806a Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 10:00:02 -0400 Subject: [PATCH 16/20] Update Plugs.md --- Docs/Kernel/Plugs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/Kernel/Plugs.md b/Docs/Kernel/Plugs.md index 3fdf9e08f..3378dd719 100644 --- a/Docs/Kernel/Plugs.md +++ b/Docs/Kernel/Plugs.md @@ -2,9 +2,9 @@ Plugs are used to fill "holes" in .NET libraries and replace them with different code. Holes exist for example when a method in .NET library uses a Windows API call. That API call will not be available on Cosmos. One method would be to emulate the Windows API as WINE does, but the WINE API is a low level C style API - relying on pre-existing memory structures. Emulating it would be highly inefficient. Instead, + relying on pre-existing memory structures. Emulating the win32 API would be highly inefficient. Instead, Cosmos replaces specific methods and property implementations that rely on - Windows API calls. Plugs can also be used to provide an alternate implementation + win32 API calls. Plugs can also be used to provide an alternate implementation for a method, even if it does not rely on the Windows API. Plugs can be implemented in the following manners: From 6d432a43a7df4590e0115db28e3e2610878ae487 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 10:01:44 -0400 Subject: [PATCH 17/20] Create Compile.md --- Docs/Express/Compile.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Docs/Express/Compile.md diff --git a/Docs/Express/Compile.md b/Docs/Express/Compile.md new file mode 100644 index 000000000..32a4c37d8 --- /dev/null +++ b/Docs/Express/Compile.md @@ -0,0 +1,13 @@ +For creating your own Cosmos in Express 2010 you need the following: + + * Visual Studio Express for C# or VB.NET + * installed Cosmos Kit(User Kit or compiled from checkout (Dev Kit)) + * Visual Studio 2010 Shell (Isolated Shell) + +In Visual Studio Express you create a library project, that contain your OS +code, and a project for compiling your OS. + + 1. Start Visual Studio Express 2010 and create a project named "Cosmos C# Library". This is the part of your OS for adding Code. Compile this project now for creating the DLL for later use. After that save it. + 2. (UNTESTED) Start your Microsoft Visual Studio 2010 Shell and create a Project "Cosmos Project (Empty)". It contains a custom Project that use MSBuild with many tasks to create your OS. Save the project. + 3. Copy now the created library with name of your project in the folder of the build project under bin/Debug/ Thats needed else would the added reference in next step not found. + 4. Add now the reference to the build project and try to build. When you get a warning that the added assembly is not found, you get "No Kernel Found!". From 20be63e3f47b378608e3626e5997bd2aaf06fb9c Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 18:19:58 -0400 Subject: [PATCH 18/20] Update Compile.md --- Docs/Express/Compile.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Docs/Express/Compile.md b/Docs/Express/Compile.md index 32a4c37d8..8601993b6 100644 --- a/Docs/Express/Compile.md +++ b/Docs/Express/Compile.md @@ -1,13 +1,13 @@ -For creating your own Cosmos in Express 2010 you need the following: +For creating your own Cosmos in Express 2013 you need the following: * Visual Studio Express for C# or VB.NET * installed Cosmos Kit(User Kit or compiled from checkout (Dev Kit)) - * Visual Studio 2010 Shell (Isolated Shell) + * Visual Studio 2013 Shell (Isolated Shell) In Visual Studio Express you create a library project, that contain your OS code, and a project for compiling your OS. - 1. Start Visual Studio Express 2010 and create a project named "Cosmos C# Library". This is the part of your OS for adding Code. Compile this project now for creating the DLL for later use. After that save it. - 2. (UNTESTED) Start your Microsoft Visual Studio 2010 Shell and create a Project "Cosmos Project (Empty)". It contains a custom Project that use MSBuild with many tasks to create your OS. Save the project. + 1. Start Visual Studio Express 2013 and create a project named "Cosmos C# Library". This is the part of your OS for adding Code. Compile this project now for creating the DLL for later use. After that save it. + 2. (UNTESTED) Start your Microsoft Visual Studio 2013 Shell and create a Project "Cosmos Project (Empty)". It contains a custom Project that use MSBuild with many tasks to create your OS. Save the project. 3. Copy now the created library with name of your project in the folder of the build project under bin/Debug/ Thats needed else would the added reference in next step not found. 4. Add now the reference to the build project and try to build. When you get a warning that the added assembly is not found, you get "No Kernel Found!". From dda514715dd7b85f2dd4ba0cfdc828e2c1dffb8c Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 18:20:48 -0400 Subject: [PATCH 19/20] Update MemoryManager.md --- Docs/Kernel/MemoryManager.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Kernel/MemoryManager.md b/Docs/Kernel/MemoryManager.md index 5b3a485df..e42bca00b 100644 --- a/Docs/Kernel/MemoryManager.md +++ b/Docs/Kernel/MemoryManager.md @@ -36,7 +36,7 @@ this means the smallest size an Block can occupy is 17 bytes, 16 bytes for the h # Usage ### Allocation - Adding an Block is easy, just use the System.Threading.Interlocked class. + Allocating a block happens by finding the first free block and split it (if necessary). ## Deallocation Freeing a block is easy set its flag (in the metadata) to free. From 05b752da4fb7c00b1890e094d40c2b6fc5985f40 Mon Sep 17 00:00:00 2001 From: Joshua Zenn Date: Fri, 29 May 2015 18:21:32 -0400 Subject: [PATCH 20/20] Update Plugs.md --- Docs/Kernel/Plugs.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Docs/Kernel/Plugs.md b/Docs/Kernel/Plugs.md index 3378dd719..520a6ec87 100644 --- a/Docs/Kernel/Plugs.md +++ b/Docs/Kernel/Plugs.md @@ -1,8 +1,6 @@ Plugs are used to fill "holes" in .NET libraries and replace them with different code. Holes exist for example when a method in .NET library uses a Windows API - call. That API call will not be available on Cosmos. One method would be to - emulate the Windows API as WINE does, but the WINE API is a low level C style API - relying on pre-existing memory structures. Emulating the win32 API would be highly inefficient. Instead, + call. That API call will not be available on Cosmos. Emulating the win32 API would be highly inefficient. Instead, Cosmos replaces specific methods and property implementations that rely on win32 API calls. Plugs can also be used to provide an alternate implementation for a method, even if it does not rely on the Windows API.