Page 1 of 1

Pixel Plotting

Posted: Wed Feb 10, 2010 10:41 pm
by TheGuy
I need a little bit of help, it deals with pixel plotting.

1. Why are there gaps? Do I need to make the colour attribute different? (I notice there are no gaps in some areas).
2. How can I draw to the full 640 by 480 pixels? I can't get past 1000-2000.

Image

Re: Pixel Plotting

Posted: Thu Feb 11, 2010 12:11 am
by neon
Hello,

Is this 640x480x4 VGA mode or are you using VBE? If VBE, whats your exact mode? Also, how are you plotting the pixels to video memory? I suspect its VBE do to comment 2. If it is, look into changing bank switching (in the VBE manual) or using a LFB mode to solve the issue. Cant solve problem 1 without knowing your video mode and how you are writing to it.

Re: Pixel Plotting

Posted: Thu Feb 11, 2010 6:15 pm
by TheGuy
Sorry.

I'm calling interrupt ten with
AX: 0x4F02
BX: 0x112

which sets to 640x480x24 (Direct Pixel), this has changed from the image above. I still crash if I go above 1000.

Here is my TEST code.

Code: Select all

unsigned int *vid = (unsigned int*)0XA0000;
for(; vid < 0XA1000; ++vid)
{
		*(vid) = vid;
}

Re: Pixel Plotting

Posted: Thu Feb 11, 2010 6:49 pm
by neon
Hello,

Your mode number - 0x4F02 has bit 14 set which enables the mode for an LFB. You need to use int 0x10 VBE function 1 (return VBE mode info) and use PhysBasePtr member of the returned ModeInfoBlock structure. Use this pointer as video display - it may not be 0xa0000 do to it being a large LFB video mode. Information on this interrupt can be found online and in the VBE documentation.