Setting a pixel with VGAScreen

Topics: Using Cosmos (Developing your own OS, projects, etc)
Jul 16, 2012 at 1:47 AM
Edited Jul 16, 2012 at 2:13 AM

EDIT: I DO NOT NEED HELP I FIGURED IT OUT ON MY OWN!!!

 

I want to know how to do this. I found out what color to use, I think. I want to use white, which in 256 color is 15. All my code is this:

 

using System;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;
using Cosmos.Hardware;

namespace Fox_Trot
{
    public class Kernel : Sys.Kernel
    {
        VGAScreen VgaScreen;
        protected override void BeforeRun()
        {
            Console.WriteLine("Welcome to Fox-trot! Type help for help");
            VgaScreen = new VGAScreen();
        }

        protected override void Run()
        {
            VgaScreen.SetPixel320x200x8(30, 30, 15);
        }
    }
}

Did I initialize the VgaScreen variable right, or is there something else I need to do?

Jul 16, 2012 at 11:33 AM

You need to initialize the screen using a method within the VGAScreen class.

add this to before run:

VgaScreen.SetMode320x200x8();