IDT and VESA???

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Graanco

IDT and VESA???

Post by Graanco »

I am left blank on somethings. I am sure that it is something I am not doing. I don't have a IDT built. I believe this by the knowledge of my machine hanging when trying to access the vesa video data. I run int 10 as it descibes in all the docs I have read. Is there any good examples on how to make a proper IDT with the use of DJGPP and NASM???  Any help would be the best.

Benjamin
DS

RE:IDT and VESA???

Post by DS »

Hmmm...you're not in protected mode are you ?
In real mode i haven't had any problems...ever
in protected mode however it wont work because the interrupts you call arent the
same of what you were using in real mode, you should build them
yourself... and the int 10 will mean something totally different, the dummy values in them can point to a series of commands that will hang your system.
Khumba

RE:IDT and VESA???

Post by Khumba »

Hmmm...you're not in protected mode are you ?
In real mode i haven't had any problems...ever
- DS

VESA works in real mode?
Graanco

RE:IDT and VESA???

Post by Graanco »

From my understanding I can only run DJGPP (C++) in pMode. Now, what or how should I go about doing this then???? Does Vesa only work in real mode?? Or is there any examples of call in PMode???

Thnak you,

Benajmin
carbonBased

RE:IDT and VESA???

Post by carbonBased »

Vesa _only_ works in real mode (vesa 1.0 - 2.0, at least... I don't know the 3.0 specs).  The Vesa interface, is a real mode interface, available through int 10h.

Vesa will, however, provide pmode code for banking and other essential video functions (so called, the vesa pmode interface), but that interface is still accessable only from real mode.

In order to access the vesa interface, you must either switch to real mode, or call the int 10h handler withen a vm86 task.

For more information on the Vesa 1 and 2 implementations, see http://www.neuraldk.org/cgi-bin/documen ... ppGraphics

I wrote the above many years ago, but contains useful information for accessing the Vesa interface, from pmode, using DGJPP, and should be easily ported to your own OS's design.

Jeff
Graanco

RE:IDT and VESA???

Post by Graanco »

So if I understand it rightly... A good VBE_set mode would be...

int VBE_setmode(unsigned short mode) {
  __dpmi_regs regs;

  regs.x.ax = 0x4F02;
  regs.x.cx = mode;
  __dpmi_int(0x10, &regs);
  return regs.x.ax;
}
anton

RE:IDT and VESA???

Post by anton »

Vesa 3.0 supports pmode for all functions.
You'l need to find a sertain "PMInfoBlock" struct in the first 32kb of BIOS image. There you will find entry pmode points to some data, like InProtectedMode flags.
Read Vesa 3.0 specs for more info.
Anton
Post Reply