www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/29/09:32:54

From: "Matt Barker" <matt DOT b AT clear DOT net DOT nz>
Newsgroups: comp.os.msdos.djgpp
Subject: Help with VESA linear frame buffer!!!
Date: 29 Jun 1998 13:17:16 GMT
Organization: CLEAR Net, http://www.clear.net.nz/
Lines: 42
Message-ID: <01bda35f$816a7460$LocalHost@SPOCK>
NNTP-Posting-Host: d1-u21.nels.clear.net.nz
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi there

I have a VESA 1.2 compliant card and I'm running UniVBE which gives it VESA
3.0 support.  I'm trying to get into 640 x 480 x 32K mode, and have run
into some problems.  Everything SEEMS to initialize OK, I can stick some
pixels on the screen so I know I'm somewhere in the right ball park.  But
every time the program exits it "performs an illegal operation".  At the
moment I (sorry about the big speel 8-)):

1. Get VESA info with function 00 (Seems alright)
2. Check that the mode is supported (It is)
3. Get the MODE info with function with call 01 (OK too)

Now's where I'm out of my familiarity range.  At the moment I:

1. Check that LFB supported (It is)
2.

__dpmi_meminfo MemInfo;
MemInfo.size = SCREENWIDTH * SCREENHEIGHT * 2;
MemInfo.address = MODEInfo.PhysBasePtr;
if (__dpmi_physical_address_mapping(&MemInfo) == -1)
   return FALSE;

word * Screen = (word *)(MemInfo.address + __djgpp_conventional_base);

__dpmi_regs Regs;
Regs.x.ax = 0x4F02;
Regs.x.bx = (0x4000 | SCREENMODE);
__dpmi_int(0x10,&Regs);
return (Regs.x.ax == 0x4F) ? TRUE : FALSE;

And when I exit the program:

__dpmi_regs Regs;
Regs.x.ax = 0x0003
__dpmi_int(0x10,&Regs);

Can anyone see anything obvious I'm doing wrong??  Any help _much_
appreciated!!
Cheers,
Matt

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019