flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > vesa [pm] [rm] ref.... |
Author |
|
dosin 10 Sep 2007, 22:17
Great vga/vesa rm/pm .pdf-
just thought I would share this!! has a lot of good info vga/vesa bios and pm modes http://www.buissoft.com/vga.zip |
|||
10 Sep 2007, 22:17 |
|
Dex4u 11 Sep 2007, 20:46
Thanks dosin
|
|||
11 Sep 2007, 20:46 |
|
Dex4u 12 Sep 2007, 02:13
Right you only need to test for 24 or 32 if the mode is for 32bits per pixel.
Now let say you are using that mode, the color need to be RRGGBB for 24bit or 00RRGGBB for 32bit. Now heres a unoptimised put pixel, note this is direct to screen, you should really write to a buffer, than write it to screen Code: VesaPutPixel: push eax push ebx mov edi,[ModeInfo_PhysBasePtr] ; vesa start address xor ebx,ebx mov ebx,[VesaX] ;pixel X shl ebx,2 cmp [ModeInfo_BitsPerPixel],24 jne @F sub ebx,[VesaX]@@: add edi, ebx mov ebx,[VesaY] ;pixel Y mov eax,[ModeInfo_XResolution] ;vesa X size shl eax,2 cmp [ModeInfo_BitsPerPixel],24 jne @f sub eax,[ModeInfo_XResolution]@@: mul ebx add edi,eax mov eax,dword[color] ;put you color eg 0x00bcbcbc stosd pop ebx pop eax ret Also if you write to a buffer first, you will get no flicker and you can write to the buffer as if it a 32bpp and than test when writing buffer to screen, for 32 or 24 BPP. Can you post what mode your setting vesa to. |
|||
12 Sep 2007, 02:13 |
|
dosin 12 Sep 2007, 03:58
mode:4112h = 32/24bit
|
|||
12 Sep 2007, 03:58 |
|
Dex4u 12 Sep 2007, 04:23
dosin wrote: mode:4112h = 32/24bit So you will need to check for that mode, as its 640*480 32/24bits |
|||
12 Sep 2007, 04:23 |
|
dosin 12 Sep 2007, 05:03
Ya! I did... Thanks....
|
|||
12 Sep 2007, 05:03 |
|
DOS386 14 Sep 2007, 21:34
Quote: Great vga/vesa rm/pm .pdf- Thanks |
|||
14 Sep 2007, 21:34 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.