COSMOS C# Mouse help
Posted: Sat Feb 20, 2016 6:04 pm
Not sure if anybody here really uses COSMOS ( ), but I have been working to find a solution to make a mouse for weeks and have gotten nothing. Graphics boot fine, but I absolutely CAN NOT make a mouse that functions. I'll give my display driver code, which is where the mouse boot is included.
HAALLPPP
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cosmos.Common;
using Cosmos.System;
using Cosmos.HAL;
using Cosmos.Core.Plugs.System.Assemblers;
using Cosmos.Core;
using Cosmos.Core.Plugs;
using Cosmos.Core.Plugs.Assemblers;
namespace Graphics
{
public class XODD
{
public static Cosmos.System.VGAScreen mainscreen = new Cosmos.System.VGAScreen();
public static XODD screen = new XODD();
public static byte[] SBuffer = new byte[64000];
public static Mouse m = new Mouse();
public static void loadvga()
{
Cosmos.System.VGAScreen.SetGraphicsMode(Cosmos.System.VGAScreen.ScreenSize.Size320x200, Cosmos.System.VGAScreen.ColorDepth.BitDepth8);
Cosmos.System.VGAScreen.Clear(255);
bm();
}
public static void sp(int x, int y, int color)
{
uint ux = (uint)(int)x;
uint uy = (uint)(int)y;
uint uc = (uint)(int)color;
Cosmos.System.VGAScreen.SetPixel(ux, uy, uc);
}
public static void usp(uint x, uint y, uint c)
{
Cosmos.System.VGAScreen.SetPixel(x, y, c);
}
public static void bm()
{
m.Initialize(320, 200);
XODD.sp(m.X, m.Y, 40);
XODD.sp(m.X + 1, m.Y, 40);
XODD.sp(m.X + 2, m.Y, 40);
XODD.sp(m.X, m.Y + 1, 40);
XODD.sp(m.X, m.Y + 2, 40);
XODD.sp(m.X + 1, m.Y + 1, 40);
XODD.sp(m.X + 2, m.Y + 2, 40);
XODD.sp(m.X + 3, m.Y + 3, 40);
}
}
}