I tried to boot cosmos OS in my real computer, not virtual computer. I used USB and ISO, but there was error that "PS/2 controller is not supported." I didn't build ISO in debugging.
source code is
using System;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;
namespace CosmosKernel2
{
public class Kernel : Sys.Kernel
{
uint x;
uint y;
Sys.MouseState ms;
bool menuopened;
Canvas can;
protected override void BeforeRun()
{
can = FullScreenCanvas.GetFullScreenCanvas();
can.Clear(System.Drawing.Color.White);
Sys.MouseManager.ScreenHeight = Convert.ToUInt32(can.Mode.Rows);
Sys.MouseManager.ScreenWidth = Convert.ToUInt32(can.Mode.Columns);
Sys.MouseManager.X = 0;
Sys.MouseManager.Y = 0;
menuopened = false;
ms = Sys.MouseState.None;
}
protected override void Run()
{
if ((ms == Sys.MouseState.None) && (Sys.MouseManager.MouseState == Sys.MouseState.Left))
{
uint xx = Sys.MouseManager.X;
uint yy = Sys.MouseManager.Y;
if ((xx < 100) && (yy > (can.Mode.Rows - 40)))
{
if (menuopened)
{
menuopened = false;
}
else
{
menuopened = true;
}
}
}
Point[] pn = { new Point(Convert.ToInt32(Sys.MouseManager.X), Convert.ToInt32(Sys.MouseManager.Y)), new Point(Convert.ToInt32(Sys.MouseManager.X), Convert.ToInt32(Sys.MouseManager.Y + 30)), new Point(Convert.ToInt32(Sys.MouseManager.X + 7), Convert.ToInt32(Sys.MouseManager.Y + 12)), new Point(Convert.ToInt32(Sys.MouseManager.X + 21), Convert.ToInt32(Sys.MouseManager.Y + 15)) };
if (Sys.MouseManager.MouseState == Sys.MouseState.None)
{
can.DrawPolygon(new Pen(System.Drawing.Color.Blue, 4), pn);
}
else
{
can.DrawPolygon(new Pen(System.Drawing.Color.Red, 4), pn);
}
if ((x != Sys.MouseManager.X) || (y != Sys.MouseManager.Y))
{
can.Clear(System.Drawing.Color.White);
if (menuopened)
{
can.DrawFilledRectangle(new Pen(System.Drawing.Color.Black), 0, can.Mode.Rows - 40, 100, 300);
}
can.DrawFilledRectangle(new Pen(System.Drawing.Color.Magenta), 0, can.Mode.Rows - 40, 100, 40);
Point[] p = { new Point(Convert.ToInt32(Sys.MouseManager.X), Convert.ToInt32(Sys.MouseManager.Y)), new Point(Convert.ToInt32(Sys.MouseManager.X), Convert.ToInt32(Sys.MouseManager.Y + 30)), new Point(Convert.ToInt32(Sys.MouseManager.X + 7), Convert.ToInt32(Sys.MouseManager.Y + 12)), new Point(Convert.ToInt32(Sys.MouseManager.X + 21), Convert.ToInt32(Sys.MouseManager.Y + 15)) };
Point[] po = { new Point(Convert.ToInt32(x), Convert.ToInt32(y)), new Point(Convert.ToInt32(x), Convert.ToInt32(y + 30)), new Point(Convert.ToInt32(x + 7), Convert.ToInt32(y + 12)), new Point(Convert.ToInt32(x + 21), Convert.ToInt32(y + 15)) };
if (Sys.MouseManager.MouseState == Sys.MouseState.None)
{
can.DrawPolygon(new Pen(System.Drawing.Color.Blue, 4), p);
}
else
{
can.DrawPolygon(new Pen(System.Drawing.Color.Red, 4), p);
}
}
x = Sys.MouseManager.X;
y = Sys.MouseManager.Y;
ms = Sys.MouseManager.MouseState;
}
}
}
Also, in virtualbox, There's not error and it's not working properly. What should i do? I'm sorry for my poor English. I'm Korean.