flat assembler
Message board for the users of flat assembler.

Index > OS Construction > CODE VESA IN REAL

Author
Thread Post new topic Reply to topic
TUAN_CD



Joined: 26 Sep 2009
Posts: 14
TUAN_CD 27 Sep 2010, 10:19
I have problem with code vesa
I try vesa codes but result screen is dark,not display.
I try:
void check_vesa(){
union REGS r;
r.h.ah=4F;
r.h.al=02;
r.h.bh=01;
r.h.bl=01;
int86(10,&r,&r);
if(r.h.ah==4f) exit(0);//have vesa
else
asm{
mov ah,0
mov al,13
int 10h
}
cout<<"not support vesa!";
}
Result is not support vesa! Crying or Very sad
I remember in forum who say to me: 845G onboard(main:asus P4BP-400MX) is vesa.you run it,good.can you send me your vesa code ?
thanks Very Happy Very Happy Very Happy Very Happy
long time,found screen >256 color.
If 845G & my main not support vesa then i wish virtual vesa in real mode Crying or Very sad
please,code vesa set & draw line Standard for me
Vietnam college 8

_________________
I like make OS
Post 27 Sep 2010, 10:19
View user's profile Send private message Yahoo Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20335
Location: In your JS exploiting you and your system
revolution 27 Sep 2010, 10:55
Return:
AL = 4Fh if function supported
AH = status
00h successful
01h failed
Code:
;...
if(r.h.al==4f) exit(0);//have vesa
;...    
Post 27 Sep 2010, 10:55
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 27 Sep 2010, 10:59
AL=4fh if supported, AH=0 if successful, AH=1 if failed

edit: hmmm, can I see previews? Your whole post wasn't there rev.
Post 27 Sep 2010, 10:59
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4039
Location: vpcmpistri
bitRAKE 27 Sep 2010, 15:10
Code:
cmp ax,$004F
jnz VESA_Error    
...standard says that all non-zero results in AH are failure.
Post 27 Sep 2010, 15:10
View user's profile Send private message Visit poster's website Reply with quote
TUAN_CD



Joined: 26 Sep 2009
Posts: 14
TUAN_CD 08 Oct 2010, 10:29
Thank for friends:D.I test bottom code.Result is good.not display text ‘not support vesa on screen’.But I don’t know this code is true
Code:
//in borland 3
void check_vesa(){
    union REGS r; 
    r.h.ah=0x00;// ah=00 this right ?when al=4f then display text
    r.h.al=0x4f; ;// al=4f
    int86(0x10,&r,&r);
    if(r.h.al==0x4f && r.h.ah==0x00){ exit(0);
         }else{
         asm{
         mov ah,0
         mov al,13
         int 10h
         }
         cout<<"not support vesa!";
    }
}
void main(){
  check_vesa();
       getch();
}    

I try:
Code:
        [bits 16];nasm
        mov AX, 0x4F02
        mov BX,101 ;256 color
        INT 10h
        mov bx,0xA000
        mov es,bx
        mov AX,0x4F05
        mov BX,00 
        mov DX,01 
        INT 10h 
        mov AX,0x4F05 
        mov BX,01 
        mov DX,01 
        INT 10h 
        mov ah,0
        int 16h
        ret    

result,screen is dark and display point blink.How to set position color ?
win.dex of dexos is vesa Confused:It run on my PC is good.I feel it >256 color
Web have code in a86.I don’t know a86
End,I thanks for god friends:D.
College 8,Vietnam
.’1000 year Thanglong’ is big festival in Hanoi:D-10/2010.Do you know about this ?
Post 08 Oct 2010, 10:29
View user's profile Send private message Yahoo Messenger Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto 08 Oct 2010, 13:53
Try This.... Wink
Code:
org 100h

    mov     di,Vesa_Signature
   mov     ax,4F00h
    int     10h

     cmp     ax,004Fh
    jnz     @Error_1
    cmp     Dword [Vesa_Signature],'VESA'         ; VESA ?
    jnz     @Error_1


    mov     ax,4F02h
    mov     bx,0x101        ; 640*480 256 color
 int     10h

     cmp     ax,004Fh
    jnz     @Error_2

        mov     bx,0a000h
   mov     es,bx

;---------------
; Fill Screen
;---------------

      xor     dx,dx
       mov     bp,4

@@:
 mov     cx,8000h
    mov     ax,0909h
    xor     di,di
       rep     stosw

   mov     ax,4f05h
    xor     bx,bx
       add     dx,1
        int     10h

     cmp     ax,004Fh
    jnz     @Error_3

        sub     bp,1
        jnz     @b

      mov     cx,0b000h
   mov     ax,0909h
    shr     cx,1
        xor     di,di
       rep     stosw

;------------
; Wait Key
;-------------
  
    xor     ax,ax
       int     16h     

;-------------
; Bye Bye
;-------------

   mov     ax,0003h
    int     10h

     ret 

;-----------
; Error
;-----------

@Error_1:

        mov     ax,0003h
    int     10h

     mov     si,Vesa_Ko
  call    @Bios_tty

       xor     ax,ax
       int     16h
 ret

@Error_2:

        mov     ax,0003h
    int     10h

     mov     si,Vesa_Mode_Ko
     call    @Bios_tty

       xor     ax,ax
       int     16h

     ret

@Error_3:

        mov     ax,0003h
    int     10h

     mov     si,Bank_ko
  call    @Bios_tty

       xor     ax,ax
       int     16h

     ret

;------------------
;     PROC
;------------------
@Bios_tty:

   lodsb
       test    al,al
       jz      @Bios_tty_Done

@@:
       mov     ah,0eh
      mov     bx,0x0007
   int     10h
 
    lodsb
       test    al,al
       jnz     @b
  
    

@Bios_tty_Done:

     ret

;------------------
;     DATA
;------------------


Vesa_Signature                   db 'VBE2'             ; VBE Signature 'VBE2'
Vesa_Version                        dw ?                    ; VBE Version
Vesa_OemStringPtr              dd ?                    ; Pointer to OEM String
Vesa_Capabilities            dd ?                    ; Capabilities of graphics controller
Vesa_VideoModePtr              dd ?                    ; Pointer to VideoModeList
Vesa_TotalMemory          dw ?                    ; Number of 64kb memory blocks

; Added for VBE 2.0

Vesa_OemSoftwareRev            dw ?                    ; VBE implementation Software revision
Vesa_OemVendorNamePtr                 dd ?                    ; Pointer to Vendor Name String
Vesa_OemProductNamePtr               dd ?                    ; Pointer to Product Name String
Vesa_OemProductRevPtr               dd ?                    ; Pointer to Product Revision String
Vesa_Reserved                   db 222 dup (?)          ; Reserved for VBE implementation scratch area
Vesa_OemData                  db 256 dup (?)          ; Data Area for OEM Strings

;----------------
; Error Message
;----------------

Vesa_Ko                             db "VBE Unsupported",0
Vesa_Mode_Ko                        db "VBE Mode 0x101 Unsupported",0
Bank_ko                          db "Bank Switch Error",0
    

Copy and paste this code in a file called vbe.asm
Compile with fasm in this way:
fasm vbe.asm

_________________
Nil Volentibus Arduum Razz
Post 08 Oct 2010, 13:53
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 08 Oct 2010, 15:09
TUAN_CS: please use [code] tags around your code to make it more readable.
Post 08 Oct 2010, 15:09
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 08 Oct 2010, 15:49
Quote:
win.dex of dexos is vesa :It run on my PC is good.I feel it >256 color


yes - dexos win.dex is vesa.. and runs greater than 256 color..

I see others have responded .. but if you still need help with vesa..
I can send you an example/demo.. just let me know Wink
Post 08 Oct 2010, 15:49
View user's profile Send private message Reply with quote
TUAN_CD



Joined: 26 Sep 2009
Posts: 14
TUAN_CD 22 Oct 2010, 10:09
First,thank to DJ Mauretto,vid and dosin Very Happy
This code is good.Result is not error,not text:’VBE Unsupporte’,’VBE Mode 0x101 Unsupported’,’Bank Switch Error’.
I print information by other code:
Currentmode=3h
VesaStatus=4fh
VesaSignature=vesa
VesaVersion=300
OEMStringPtr= char.can not read
Capabilities:DAC width ,with 6-bit per primary color
totalMemory=125x64K
mode=101h
modeAttributes=155
modeAAttributes=7
modeBAttributes=6
modeGranularity=64
WinSize=64
WinASegment=-24576
winBSegment=0
winFuncPtr= char.can not read
BytePerScanLine=640
Xresolution=640
Yresolution=480
XcharSize=8
YcharSize=16
NameOfImagePage=24
Reserved1=1
RedMaskSize=0
Cotinued
RedFieldPosition=0
GreenMaskSize=0
GreenFieldPosition=0
BlueMaskSize=0
bluefieldFieldPosition=0
DirectColorInfo=0
It not action Part code not 004f
Maybe my screen is Vesa.but It not display,I don’t know. I view code info vesa of dexos It not other your code.But win.dex can display.What is problem ?I read on web:vesa1.2 other vesa 2.0,vesa3.0
Or can DOS against vesa.Win.dex is magic Question
Can I use palette vesa ?because: Capabilities:DAC width ,with 6-bit per primary color
can DOS against vesa Question
Who send code for vesa1.2,vesa 2.0 ,vesa 3.0 to me!
Post 22 Oct 2010, 10:09
View user's profile Send private message Yahoo Messenger Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 23 Oct 2010, 04:15
The vesa code for dexos - is for vesa 2 +

and also is written for protected mode..

if you want a protected mode example. I will post.
I dont have any real mode examples anymore..
Post 23 Oct 2010, 04:15
View user's profile Send private message Reply with quote
TUAN_CD



Joined: 26 Sep 2009
Posts: 14
TUAN_CD 29 Oct 2010, 10:24
can you send it to me ? thanks
Post 29 Oct 2010, 10:24
View user's profile Send private message Yahoo Messenger Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 30 Oct 2010, 02:03
I sent it to you!
Post 30 Oct 2010, 02:03
View user's profile Send private message Reply with quote
TUAN_CD



Joined: 26 Sep 2009
Posts: 14
TUAN_CD 08 Nov 2010, 09:51
Thank to good friends.I test your code vesa in real is nice.It display background with blue color. Can Dos against Vesa.
Your vesa is vesa 2+?
Can you help me draw line(putpixel) by code?
Can I putpixel 16bpp in real ?How ?
mail:bach_ho_cry@yahoo.com You can send Pm vesa for me.
Very HappyVery HappyVery Happy
Post 08 Nov 2010, 09:51
View user's profile Send private message Yahoo Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.