Page 1 of 1

COSMOS C# Mouse help

Posted: Sat Feb 20, 2016 6:04 pm
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 :?

Re: COSMOS C# Mouse help

Posted: Thu Feb 25, 2016 4:41 pm
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?

Re: COSMOS C# Mouse help

Posted: Mon Jul 11, 2016 12:20 pm
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.