flat assembler
Message board for the users of flat assembler.
Index
> Main > VBE study Goto page Previous 1, 2, 3, 4 Next |
Author |
|
Teehee 20 Jun 2010, 10:56
but then i will can't use linear framebuffer.
a lil question: what are VGA hardware registers? |
|||
20 Jun 2010, 10:56 |
|
cod3b453 20 Jun 2010, 11:54
This is a very old development snapshot of my OS, with unrelated stuff removed. I'm afraid there's not many comments and it's not particularly clean but it at least shows you how to get the list of available modes (VESA.asm - finds all LFB modes >=1024x768x32) and draw in protected mode (display.asm).
|
|||||||||||
20 Jun 2010, 11:54 |
|
edfed 20 Jun 2010, 12:04
|
|||
20 Jun 2010, 12:04 |
|
DJ Mauretto 20 Jun 2010, 13:54
Quote: Teehee explicitly stated that he wants to use linear frame buffer. How does your comment apply? Teeheeè a beginner, my advice is to start with something simple _________________ Nil Volentibus Arduum |
|||
20 Jun 2010, 13:54 |
|
baldr 20 Jun 2010, 19:00
DJ Mauretto,
Dancing with 64 KiB windows around 3¾ MiB video memory for 1280×1024×24bpp is simple? I doubt it. |
|||
20 Jun 2010, 19:00 |
|
cod3b453 20 Jun 2010, 20:36
baldr wrote: ... |
|||
20 Jun 2010, 20:36 |
|
Teehee 21 Jun 2010, 17:44
When the manual says i need to set ES:DI to pointer a structure i must to do, for instance:
Code: mov ax, ModeInfoBlock mov es, ax mov di, ax ? or: Code: push ds
pop es
mov di, ModeInfoBlock ? or neither one? |
|||
21 Jun 2010, 17:44 |
|
cod3b453 21 Jun 2010, 18:10
If the structure is below linear address 0x10000, use es = 0, di = <address> otherwise you have to use a suitable es such that (es*16)+di = <address> (real mode segmented addressing).
Code: ; if the_struct is below 0x10000 xor ax,ax mov es,ax mov di,the_struct ; for address 0x12345, you can do: mov ax,0x1234 mov es,ax mov di,0x0005 ; or mov ax,0x1000 mov es,ax mov di,0x2345 You can use push ds, pop es if ds is a correct value. |
|||
21 Jun 2010, 18:10 |
|
Tyler 22 Jun 2010, 21:38
An interesting piece of info about Windows XP version of NTVDM: You can set the video mode with the VBE functions, I did it and the screen went black. The only way I got back to the desktop was to ctrl+alt+del to bring up the task manager and killed my prog. I haven't tried on any other versions.
|
|||
22 Jun 2010, 21:38 |
|
Teehee 22 Jun 2010, 23:05
Hey guys, how do i use this: http://www.osdever.net./documents/vga_ports.txt ?
|
|||
22 Jun 2010, 23:05 |
|
baldr 23 Jun 2010, 01:34
|
|||
23 Jun 2010, 01:34 |
|
bitshifter 23 Jun 2010, 03:07
FreeVGA is one of the better ones
Also i liked this masters manual...
_________________ Coding a 3D game engine with fasm is like trying to eat an elephant, you just have to keep focused and take it one 'byte' at a time. |
|||||||||||
23 Jun 2010, 03:07 |
|
Teehee 23 Jun 2010, 23:17
I'll read them all. (it will take a long time )
*** i'm trying to get the supported VBE mode list but im getting these values: (see img). is there something wrong? my code to get that values: Code: org 100h push ds pop es mov di, VbeInfoBlock mov ax, VBE_GET_CONTROLLER_INFO int 10h mov ax, 03h int 10h xor ecx, ecx mov ebx, VbeInfoBlock.VideoModePtr @@: mov bx, word[ebx+ecx*2] pusha lea esi, [buf+4+ecx*8] movzx eax,bx mov ebx, String.FORMAT_HEX call String.eax2str popa inc ecx cmp bx, -1 jne @b print: mov dx, buf mov ah, 09h int 21h wait_key: mov ah, 01h int 21h exit: int 20h buf db 254 dup 0 db '$' include '\FASM\mylibs\string.asm' include '\FASM\mylibs\VBE.inc'
_________________ Sorry if bad english. |
||||||||||
23 Jun 2010, 23:17 |
|
baldr 24 Jun 2010, 06:33
Teehee,
mov ebx, VbeInfoBlock.VideoModePtr is wrong (as you might expect). It moves offset of VbeInfoBlock.VideoModePtr into ebx, not contents. |
|||
24 Jun 2010, 06:33 |
|
Teehee 24 Jun 2010, 18:40
i'm always confusing that!
should i use mov ebx, [VbeInfoBlock.VideoModePtr] or lea ebx,[VbeInfo..] ? (in any case i get no values ) |
|||
24 Jun 2010, 18:40 |
|
edfed 24 Jun 2010, 22:21
lea means load effective adress, then, you will load the effective adress of vbeinfo if you use lea
mov means move datas then, you will obtin the data at vbeinfo with mov. |
|||
24 Jun 2010, 22:21 |
|
bitshifter 24 Jun 2010, 22:37
Please attach the 2 other files so i can play with it...
I am too lazy to make them from scratch... |
|||
24 Jun 2010, 22:37 |
|
Teehee 24 Jun 2010, 23:36
_________________ Sorry if bad english. |
|||||||||||||||||||||
24 Jun 2010, 23:36 |
|
bitshifter 25 Jun 2010, 00:40
Step 1:
Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; VESA SuperVGA BIOS (VBE) - Get SuperVGA information ; AX = 4f00h ; ES:DI -> buffer for SuperVGA information (see #00077) ; Return:AL = 4fh if function supported ; AH = status ; 00h successful ; ES:DI buffer filled ; 01h failed ; ---VBE v2.0--- ; 02h function not supported by current hardware configuration ; 03h function invalid in current video mode ; ; Desc: Determine whether VESA BIOS extensions are present and the ; capabilities supported by the display adapter ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Assume cs=ds=es mov di,VbeInfoBlock mov ax,4f00h ; Get SuperVGA information int 10h cmp al,4fh ; Is function supported? jne vbe_not_supported cmp ah,00h ; Is status successful? jne vbe_not_supported ; ... vbe_not_supported: ; ... Of course you can combine the AH,AL tests... |
|||
25 Jun 2010, 00:40 |
|
Goto page Previous 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.