TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: FRANOIS DE MEY
from: SOEREN HILDEBRANDT
date: 1997-12-16 18:09:00
subject: VESA

Hi!
[...]
BM>> The first would defy the purpose of VESA, since you'd need a different
BM>> set of port ins & outs, but if you want to do that, look for VGAKit.
BM>> I'm not sure about the second, but doesn't Watcom allow 32-bit memory
BM>> addressing?
FoDM>  Yes, but I don't know how to say to VESA that I want a linear buffer!
FoDM>  Perhaps can U help me?
huhu, it's my turn ;)
To get a linear buffer you just have to Set Bit 14 in Bx.
For Example:
   mov ax,4f02h
   mov bx, 10Eh           {320x200x64k }
   add bx,100000000000000b {set Bit 14}
   int 10h
Now, the offset of the screen isn't at A000h! You have to get the physical
address of it.
 mov ax,4f01h
 mov cx,10eh   {320x200x64k}
 xor di,di
 int 10h   {write ModeInfoTable to es:di}
At offset 28h of this table there will be a dword with the physical address
Other infos you can get from it:
  Offset    Size
    00H       W   ModeAttributes
    02H       B   WinAAttributes
    03H       B   WinBAttributes
    04H       W   WinGranularity
    06H       W   WinSize
    08H       W   WinASegment
    0aH       W   WinBSegment
    0cH       D   WinFuncPtr
    10H       W   BytesPerScanLine
    12H       W   XResolution
    14H       W   YResolution
    16H       B   XCharSize
    17H       B   YCharSize
    18H       B   NumberOfPlanes
    19H       B   BitsPerPixel
    1aH       B   NumberOfBanks
    1bH       B   MemoryModel
    1cH       B   BankSize
    1dH       B   NumberOfImagePages
    1eH       B   Reserved
    1fH       B   RedMaskSize
    20H       B   RedFieldPosition
    21H       B   GreenMaskSize
    22H       B   GreenFieldPosition
    23H       B   BlueMaskSize
    24H       B   BlueFieldPosition
    25H       B   RsvdMaskSize
    26H       B   RsvdFieldPosition
    27H       B   DirectColorModeInfo
    28H       D   PhysBasePtr
    2cH       D   OffScreenMemOffset
    30H       W   OffScreenMemSize
    32H   206 B   Reserved
BTW. This is VBE2.0 !!!
BTWý. I cannot speak english. ;)
HTH.
Ciao, Soeren aka apeiron
-[ *apeiron@jademedia.org* ]-
 XXX-MAIL!  v5.12 R
---------------
* Origin: Windows *A-version*... Jetzt bei: (2:241/333.37)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.