-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Mosa.Tools.Package.Qemu, tidy up NuGet packages descriptions (#1056)
* Squashed commit of the following: commit 4444ed4 Author: Phil <phil@thinkedge.com> Date: Thu May 25 17:12:59 2023 -0700 - Qemu tools commit c03c37c Merge: d758893 b60fb06 Author: Phil <phil@thinkedge.com> Date: Thu May 25 17:10:04 2023 -0700 Merge commit 'b60fb0671d4d99fe490200634a1d50c5b547f8f2' into 343-WIP commit b60fb06 Author: AnErrupTion <anerruption@disroot.org> Date: Thu May 11 10:05:44 2023 +0200 Add Mosa.Tools.Package.Qemu, re-arrange Tools/qemu folder, tidy up NuGet packages descriptions * - Fixes * - Fixes * - Fixes * - Fixes * - Fixes
- Loading branch information
Showing
26 changed files
with
459 additions
and
774 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
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,24 @@ | ||
// Copyright (c) MOSA Project. Licensed under the New BSD License. | ||
|
||
using Mosa.Demo.AppSystem; | ||
|
||
namespace Mosa.Demo.Application; | ||
|
||
/// <summary> | ||
/// Credits | ||
/// </summary> | ||
public class Test : BaseApplication, IConsoleApp | ||
{ | ||
public override int Start(string parameters) | ||
{ | ||
if (string.IsNullOrEmpty(parameters)) | ||
{ | ||
Console.WriteLine("missing paramter"); | ||
return 1; | ||
} | ||
|
||
Console.WriteLine(parameters); | ||
|
||
return 0; | ||
} | ||
} |
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,93 @@ | ||
// Copyright (c) MOSA Project. Licensed under the New BSD License. | ||
|
||
using System; | ||
using Mosa.DeviceSystem; | ||
|
||
namespace Mosa.DeviceDriver.ISA; | ||
|
||
/// <summary> | ||
/// CMOS Device Driver | ||
/// </summary> | ||
//[ISADeviceDriver(AutoLoad = true, BasePort = 0x0070, PortRange = 2, Platforms = PlatformArchitecture.X86)] | ||
public class CMOS : BaseDeviceDriver, IDateTime | ||
{ | ||
/// <summary> | ||
/// The command port | ||
/// </summary> | ||
protected BaseIOPortReadWrite commandPort; | ||
|
||
/// <summary> | ||
/// The data port | ||
/// </summary> | ||
protected BaseIOPortReadWrite dataPort; | ||
|
||
public override void Initialize() | ||
{ | ||
Device.Name = "CMOS"; | ||
|
||
commandPort = Device.Resources.GetIOPortReadWrite(0, 0); | ||
dataPort = Device.Resources.GetIOPortReadWrite(0, 4); | ||
} | ||
|
||
public override void Probe() => Device.Status = DeviceStatus.Available; | ||
|
||
public override void Start() | ||
{ | ||
Device.Status = DeviceStatus.Online; | ||
} | ||
|
||
/// <summary> | ||
/// Called when an interrupt is received. | ||
/// </summary> | ||
/// <returns></returns> | ||
public override bool OnInterrupt() => true; | ||
|
||
public DateTime GetDateTime() | ||
{ | ||
var bcd = (Read(0x0B) & 0x04) == 0x00; | ||
|
||
var century = BCDToBinary(bcd, Read(0x32)); | ||
var second = BCDToBinary(bcd, Read(0)); | ||
var minute = BCDToBinary(bcd, Read(2)); | ||
var hour = BCDToBinary(bcd, Read(4)); | ||
var year = BCDToBinary(bcd, Read(9)); | ||
var month = BCDToBinary(bcd, Read(8)); | ||
var day = BCDToBinary(bcd, Read(7)); | ||
|
||
if (century is 19 or 21) | ||
{ | ||
return new DateTime(century * 100 + year, month, day, hour, minute, second); | ||
} | ||
else | ||
{ | ||
return new DateTime(2000 + year, month, day, hour, minute, second); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Reads the specified address. | ||
/// </summary> | ||
/// <param name="address">The address.</param> | ||
/// <returns></returns> | ||
protected byte Read(byte address) | ||
{ | ||
lock (_lock) | ||
{ | ||
commandPort.Write8(address); | ||
return dataPort.Read8(); | ||
} | ||
} | ||
|
||
private static byte BCDToBinary(bool bcd, byte value) | ||
{ | ||
if (bcd) | ||
return BCDToBinary(value); | ||
else | ||
return value; | ||
} | ||
|
||
private static byte BCDToBinary(byte bcd) | ||
{ | ||
return (byte)(bcd / 16 * 10 + (bcd & 0xF)); | ||
} | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0"?> | ||
<package> | ||
<metadata> | ||
<id>Mosa.Tools.Package.Qemu</id> | ||
<version>$version$</version> | ||
<title>Mosa.Tools.Package.Qemu</title> | ||
<authors>MOSA Project</authors> | ||
<owners>MOSA Project</owners> | ||
<license type="expression">BSD-3-Clause-Clear</license> | ||
<projectUrl>https://www.mosa-project.org</projectUrl> | ||
<icon>images/Mosa Icon.png</icon> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<summary>MOSA tools with QEMU (Windows/Linux)</summary> | ||
<description>This package contains all the tools for MOSA along with QEMU binaries for Windows.</description> | ||
<copyright>Copyright © MOSA Project 2023</copyright> | ||
<tags>MOSA Compiler</tags> | ||
<contentFiles> | ||
<files include="**/*.*" buildAction="None" copyToOutput="true" /> | ||
</contentFiles> | ||
</metadata> | ||
<files> | ||
<file src="..\Art\Mosa Icon.png" target="images" /> | ||
<file src="..\..\Tools\qemu\**\*.*" target="contentFiles/any/net7.0/Tools/qemu" /> | ||
<file src="..\..\bin\runtimes\**\*.*" target="contentFiles/any/net7.0/Tools/runtimes" /> | ||
<file src="..\..\bin\Avalonia*.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Compiler.Common.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Compiler.Framework.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Compiler.MosaTypeSystem.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Compiler.MosaTypeSystem.CLR.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Platform.ARMv8A32.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Platform.x86.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Platform.x64.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Tool.Explorer.*" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Tool.Debugger.*" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Tool.Launcher.*" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Tool.Compiler.*" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Utility.BootImage.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Utility.Configuration.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Utility.DebugEngine.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Utility.FileSystem.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Utility.Launcher.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Utility.RSP.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Mosa.Utility.Disassembler.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\dnlib.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Reko.Arch.Arm.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Reko.Arch.X86.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Reko.Core.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Reko.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\PriorityQueue.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\WinFormsUI.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\System.Reactive.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\SkiaSharp.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\HarfBuzzSharp.dll" target="contentFiles/any/net7.0/Tools" /> | ||
<file src="..\..\bin\Tmds.DBus.dll" target="contentFiles/any/net7.0/Tools" /> | ||
</files> | ||
</package> |
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.