-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demos: Merge HelloWorld into CoolWorld (#1239)
* Demos: Merge HelloWorld into CoolWorld Signed-off-by: AnErrupTion <[email protected]> * Remove HelloWorld in Mosa.sln Signed-off-by: AnErrupTion <[email protected]> * Resolve conflicts Signed-off-by: AnErrupTion <[email protected]> * Rename VirtualBox & VMware Workstation demo scripts Signed-off-by: AnErrupTion <[email protected]> * Fix demo tests not working for console CoolWorld Signed-off-by: AnErrupTion <[email protected]> * Fix mistake Signed-off-by: AnErrupTion <[email protected]> * Forgot to update documentation Signed-off-by: AnErrupTion <[email protected]> * Fix bug in BootOptions + scripts Signed-off-by: AnErrupTion <[email protected]> --------- Signed-off-by: AnErrupTion <[email protected]>
- Loading branch information
1 parent
2130e8d
commit bff4054
Showing
79 changed files
with
574 additions
and
930 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
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,3 @@ | ||
cd %~dp0 | ||
cd ..\bin | ||
Mosa.Tool.Launcher.Console -autostart -oMax -output-asm -output-debug -output-hash -bootoptions coolworldui=consolemode Mosa.BareMetal.CoolWorld.x86.dll |
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,3 @@ | ||
#!/bin/bash | ||
cd ../bin | ||
./Mosa.Tool.Launcher.Console -autostart -oMax -output-asm -output-debug -output-hash -bootoptions coolworldui=consolemode Mosa.BareMetal.CoolWorld.x86.dll |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
Demos/Run-BareMetal.HelloWorld.x86.bat → ...s/Run-BareMetal.Console.CoolWorld.x86.bat
100644 → 100755
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
cd %~dp0 | ||
cd ..\bin | ||
Mosa.Tool.Launcher -autostart -oMax -output-asm -output-debug -output-hash Mosa.BareMetal.HelloWorld.x86.dll | ||
Mosa.Tool.Launcher -autostart -oMax -output-asm -output-debug -output-hash -bootoptions coolworldui=consolemode Mosa.BareMetal.CoolWorld.x86.dll |
2 changes: 1 addition & 1 deletion
2
Demos/Run-BareMetal.HelloWorld.x86.sh → Demos/Run-BareMetal.Console.CoolWorld.x86.sh
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
cd ../bin | ||
./Mosa.Tool.Launcher -autostart -oMax -output-asm -output-debug -output-hash Mosa.BareMetal.HelloWorld.x86.dll | ||
./Mosa.Tool.Launcher -autostart -oMax -output-asm -output-debug -output-hash -bootoptions coolworldui=consolemode Mosa.BareMetal.CoolWorld.x86.dll |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...e/Mosa.BareMetal.HelloWorld/AppManager.cs → ...BareMetal.CoolWorld/Console/AppManager.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright (c) MOSA Project. Licensed under the New BSD License. | ||
|
||
using System.Text; | ||
using Mosa.Kernel.BareMetal; | ||
using Mosa.Runtime; | ||
|
||
namespace Mosa.BareMetal.CoolWorld.Console.Apps; | ||
|
||
public class BootInfo : IApp | ||
{ | ||
public string Name => "BootInfo"; | ||
|
||
public string Description => "Shows Multiboot v2 information."; | ||
|
||
public void Execute() | ||
{ | ||
System.Console.WriteLine("Command line : " + NullTermString(Multiboot.V2.CommandLine)); | ||
System.Console.WriteLine("Bootloader name : " + NullTermString(Multiboot.V2.BootloaderName)); | ||
System.Console.WriteLine("Memory lower : " + Multiboot.V2.MemoryLower / 1024 + " MiB"); | ||
System.Console.WriteLine("Memory upper : " + Multiboot.V2.MemoryUpper / 1024 + " MiB"); | ||
System.Console.WriteLine("Memory map entries : " + Multiboot.V2.MemoryMapEntries); | ||
System.Console.WriteLine("Framebuffer available : " + !Multiboot.V2.FrameBuffer.IsNull); | ||
|
||
if (!Multiboot.V2.FrameBuffer.IsNull) | ||
{ | ||
System.Console.WriteLine("Framebuffer resolution : " + Multiboot.V2.FrameBufferWidth + "x" + Multiboot.V2.FrameBufferHeight); | ||
} | ||
|
||
System.Console.WriteLine("RSDPv1 version : " + !Multiboot.V2.RSDPv1.IsNull); | ||
System.Console.WriteLine("RSDPv2 version : " + !Multiboot.V2.RSDPv2.IsNull); | ||
} | ||
|
||
private readonly StringBuilder Builder = new(); | ||
|
||
private string NullTermString(Pointer pointer) | ||
{ | ||
Builder.Clear(); | ||
|
||
var i = 0; | ||
byte b; | ||
|
||
do | ||
{ | ||
b = pointer.Load8(i++); | ||
Builder.Append((char)b); | ||
} while (b != 0); | ||
|
||
return Builder.ToString(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) MOSA Project. Licensed under the New BSD License. | ||
|
||
namespace Mosa.BareMetal.CoolWorld.Console.Apps; | ||
|
||
public class Credits : IApp | ||
{ | ||
public string Name => "Credits"; | ||
|
||
public string Description => "Shows everyone who contributed to the project."; | ||
|
||
public void Execute() | ||
{ | ||
System.Console.WriteLine("*** MOSA Credits ****"); | ||
System.Console.WriteLine(" Phil Garcia"); | ||
System.Console.WriteLine(" Simon Wollwage"); | ||
System.Console.WriteLine(" Michael Frohlich"); | ||
System.Console.WriteLine(" Stefan Andres Charsley"); | ||
System.Console.WriteLine(" Chin Ki Yuen"); | ||
System.Console.WriteLine(" Patrick Reisert"); | ||
System.Console.WriteLine(" Phillip Webster"); | ||
System.Console.WriteLine(" Kevin Thompson"); | ||
System.Console.WriteLine(" Kai P.Reisert"); | ||
System.Console.WriteLine(" M.de Bruijn"); | ||
System.Console.WriteLine(" Royce Mitchell III"); | ||
System.Console.WriteLine(" Sebastian Loncar"); | ||
System.Console.WriteLine(" AnErrupTion"); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) MOSA Project. Licensed under the New BSD License. | ||
|
||
using Mosa.Kernel.BareMetal; | ||
|
||
namespace Mosa.BareMetal.CoolWorld.Console.Apps; | ||
|
||
public class Mem : IApp | ||
{ | ||
public string Name => "Mem"; | ||
|
||
public string Description => "Shows memory information."; | ||
|
||
public void Execute() | ||
{ | ||
System.Console.WriteLine("**** Memory ****"); | ||
System.Console.WriteLine(" Total Pages : " + PageFrameAllocator.TotalPages); | ||
System.Console.WriteLine(" Used Pages : " + PageFrameAllocator.UsedPages); | ||
System.Console.WriteLine(" Page Size : " + Page.Size); | ||
System.Console.WriteLine(" Free Memory : " + (PageFrameAllocator.TotalPages - PageFrameAllocator.UsedPages) * Page.Size / (1024 * 1024) + " MB"); | ||
} | ||
} |
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.