OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 24, 2024 12:38 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: COSMOS C# Mouse help
PostPosted: Sat Feb 20, 2016 6:04 pm 
Offline

Joined: Sat Feb 20, 2016 5:52 pm
Posts: 2
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:
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 :?


Top
 Profile  
 
 Post subject: Re: COSMOS C# Mouse help
PostPosted: Thu Feb 25, 2016 4:41 pm 
Offline
Member
Member
User avatar

Joined: Wed Aug 05, 2015 5:33 pm
Posts: 159
Location: Drenthe, Netherlands
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


Top
 Profile  
 
 Post subject: Re: COSMOS C# Mouse help
PostPosted: Mon Jul 11, 2016 12:20 pm 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 401
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 67 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group