VGAScreen not works!

Mar 18, 2012 at 3:04 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.

Coordinator
May 14, 2012 at 7:18 AM
Edited May 14, 2012 at 7:35 AM

 

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

 

Try this. Note: The image converter will not support your version of cosmos.