COSMOS C# Mouse help

Programming, for all ages and all languages.
Post Reply
xenaOS
Posts: 2
Joined: Sat Feb 20, 2016 5:52 pm
Libera.chat IRC: xenaosdev

COSMOS C# Mouse help

Post by xenaOS »

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.

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);
         
        }
       
        
    }


}
HAALLPPP :?
User avatar
Nutterts
Member
Member
Posts: 159
Joined: Wed Aug 05, 2015 5:33 pm
Libera.chat IRC: Nutterts
Location: Drenthe, Netherlands

Re: COSMOS C# Mouse help

Post by Nutterts »

Your using an "OS construction toolkit" called Cosmos. This isn't the best place to get help specifically for using Cosmos. Have you tried following the tutorials at https://github.com/CosmosOS/Cosmos?
"Always code as if the guy who ends up maintaining it will be a violent psychopath who knows where you live." - John F. Woods

Failed project: GoOS - https://github.com/nutterts/GoOS
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

Re: COSMOS C# Mouse help

Post by Ycep »

Note that, when using Cosmos, you aren't creating OS. :wink:
You are actually creating Cosmos Operating System kernel-mode application which has premission for controlling drivers.
Post Reply