Mail Archives: djgpp/1998/06/29/09:32:54
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 -