flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3, 4 Next |
Author |
|
Teehee
but then i will can't use linear framebuffer.
a lil question: what are VGA hardware registers? |
|||
![]() |
|
cod3b453
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).
|
|||||||||||
![]() |
|
edfed
|
|||
![]() |
|
DJ Mauretto
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 ![]() |
|||
![]() |
|
baldr
DJ Mauretto,
Dancing with 64 KiB windows around 3¾ MiB video memory for 1280×1024×24bpp is simple? I doubt it. |
|||
![]() |
|
cod3b453
baldr wrote: ... |
|||
![]() |
|
Teehee
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? ![]() |
|||
![]() |
|
cod3b453
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. |
|||
![]() |
|
Tyler
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.
|
|||
![]() |
|
Teehee
Hey guys, how do i use this: http://www.osdever.net./documents/vga_ports.txt ?
|
|||
![]() |
|
baldr
|
|||
![]() |
|
bitshifter
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. |
|||||||||||
![]() |
|
Teehee
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. |
||||||||||
![]() |
|
baldr
Teehee,
mov ebx, VbeInfoBlock.VideoModePtr is wrong (as you might expect). It moves offset of VbeInfoBlock.VideoModePtr into ebx, not contents. |
|||
![]() |
|
Teehee
i'm always confusing that!
![]() should i use mov ebx, [VbeInfoBlock.VideoModePtr] or lea ebx,[VbeInfo..] ? (in any case i get no values ![]() |
|||
![]() |
|
edfed
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. |
|||
![]() |
|
bitshifter
Please attach the 2 other files so i can play with it...
I am too lazy to make them from scratch... |
|||
![]() |
|
Teehee
![]()
_________________ Sorry if bad english. |
|||||||||||||||||||||
![]() |
|
bitshifter
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... |
|||
![]() |
|
Goto page Previous 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.