I'm using Turbo C (3.0 to be exact) and I was wondering how do I call the video to a SVGA mode. Any help? Thanks ;-)
I'm using Turbo C (3.0 to be exact) and I was wondering how do I call the video to a SVGA mode. Any help? Thanks ;-)
First consult the RBIL and look up the VESA VBE functions on int 10h.
To set the video mode:
asm
{
mov ax,4F02
mov bx,mode
les di,CRTCbufferblock
int 10h
}
note that you do not have to load ESI with anything if bit 11 in the mode is not set.
To enable the LFB, set bit 13 in the mode - only valid for protected mode and for video modes that support the LFB.
Again, get RBIL and look up the functions.
http://www-2.cs.cmu.edu/~ralf/files.html
What's the exact mode of it? For example, mode 12h is 640x480 VGA (16 colors), 13h is 340x200 VGA (256 colors), mode blah blah blah.
There was a bit of board processing up there. He meant ES: DI, the memory address register [if i'm not mistaken] of the 8086. Oh and the modes vary from card to card, as do their capabilities, so it's not as straight forward [or compatible] as 13h would be. Not to mention using VESA is [unfortunately] looked upon as outdated by much of the newer community. Here are the general steps for getting you started. [read up on RBIL and the VBE 3.x specs to implement it...]
1.) get the controller information and modes list
2.) get the pointer to the video display [and any backbuffers if you use them]
3.) enjoy...
hasafraggin shizigishin oppashigger...
Thanks for the input ;-)
By using te video interrupt 10h and the C interrupt function, I was able to set it in SVGA:
Only problem is, it's showing double images at the top of the screen. I think I can figure that out, though. Thanks ;-)void set_mode_svga(void)
{
union REGS inregs,outregs;
inregs.h.ah = 0;
inregs.h.al = 0x005f; // video mode to change to
int86(0x10, &inregs, &outregs);
}
Last edited by WHurricane16; 04-09-2002 at 06:27 PM.