VGA Screen not works...

Mar 19, 2012 at 5:10 PM

Hi all.

I have problem with my VGAScreen program. Look on code:

 

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

namespace CNT
{
    public class Kernel : Sys.Kernel
    {
        protected override void BeforeRun()
        {
            Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");
        }

        protected override void Run()
        {
            VGAScreen screen = new VGAScreen();
            VGAScreen.SetMode320x200x8();
            for (uint x = 1; x <= 100;x++ )
            {
                for (uint y = 1; y <= 100;y++ )
                    VGAScreen.SetPixel320x200x8(x, y, 5);
            }
        }
    }
}

Does anybody know how to solve this problem? I have no problem in Visual Studio, no problem with compilation, but in VMWarePlayer it's displaying only text but no colorized pixels. Please help.

 

Mar 19, 2012 at 5:23 PM
grrJava wrote:

Hi all.

I have problem with my VGAScreen program. Look on code:

 

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

namespace CNT
{
    public class Kernel : Sys.Kernel
    {
        protected override void BeforeRun()
        {
            Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");
        }

        protected override void Run()
        {
            VGAScreen screen = new VGAScreen();
            VGAScreen.SetMode320x200x8();
            for (uint x = 1; x <= 100;x++ )
            {
                for (uint y = 1; y <= 100;y++ )
                    VGAScreen.SetPixel320x200x8(x, y, 5);
            }
        }
    }
}

Does anybody know how to solve this problem? I have no problem in Visual Studio, no problem with compilation, but in VMWarePlayer it's displaying only text but no colorized pixels. Please help.

 

You need to set palette entries, and clear the screen.