Video console programming
Posted: Thu Sep 02, 2004 3:08 pm
How are ANSI codes processed? E.g. those things that zap the cursor around and so forth, usually looking like ESC]"n' or whatever... does the video card recognise and process them, or does the tty driver handle them and arrange for action to happen?
When putting the video card into a higher resolution text mode, are the fonts inside the video card's ROM? Or must they be loaded from elsewhere? My video card supports a rather nice text mode that is 130x60 or somesuch, with nice, bright colours. It can also draw a high resolution graphic on the screen, say at the top, and scroll text beneath it, as if the screen were split into two different modes. Linux can do this when it boots. The logo is displayed at the top of the screen while text is drawn beneath it in character cell boxes as normal.
Is VESA VBE stuff good for this (i.e. better than 80x25 text mode)? When in protected mode the processor must normally be dropped into a virtual 8086 task for this (VBE) mustn't it? I have read through Tim's VM86 tutorial, but I didn't really understand it. What must I do to support VM86 so I can use VESA functions in protected mode?
Is there any good information on programming VGA or better video cards while in protected mode without using the friggen' BIOS? E.g a modern AGP video card? Is the AGP bus accessed like the PCI bus, by scanning for a BIOS in memory mapped I/O somewhere high up in the address space?
How can an OS detect PCI devices? So does the OS scan for the PCI 32-bit BIOS blocks (is there one per device?) Then use them?
What about ISA devices? Is the ISA bus used through the "old" I/O space in the first 1MB of memory, or is it mapped high in memory like PCI stuff?
Is there any good information on programming COM i.e. serial ports, somewhere? When hooking up a modem, how are network packets sent out over the modem? Are the IP packets encapsulated inside PPP packets, the raw bytes of which are sent to the modem's input buffer? How are modem control codes/strings sent to the modem?
Ah, wandered off topic a bit... ;D
Back to video. Um, yes. How to? Maybe it's worth a look in the XFree86 code for the registers, then try to rip out the relevant parts to write drivers... of course I could also get register info from the Linux colour framebuffer console code... what is a DAC by the way? And what is a palette? What is a clockline? What about RAMDAC? When there are 24 bits per pixel, what format are the pixels in? Are they just drawn into video memory one by one? What is a plane? Like a colour plane or whatever? Is video memory just one huge contigous space memory mapped somewhere? Is it possible to change video modes programming the card in protected mode, fiddling with memory mapped I/O ports instead of doing I/O in the first MB in VM86 or real mode?
Thanks for your help!
When putting the video card into a higher resolution text mode, are the fonts inside the video card's ROM? Or must they be loaded from elsewhere? My video card supports a rather nice text mode that is 130x60 or somesuch, with nice, bright colours. It can also draw a high resolution graphic on the screen, say at the top, and scroll text beneath it, as if the screen were split into two different modes. Linux can do this when it boots. The logo is displayed at the top of the screen while text is drawn beneath it in character cell boxes as normal.
Is VESA VBE stuff good for this (i.e. better than 80x25 text mode)? When in protected mode the processor must normally be dropped into a virtual 8086 task for this (VBE) mustn't it? I have read through Tim's VM86 tutorial, but I didn't really understand it. What must I do to support VM86 so I can use VESA functions in protected mode?
Is there any good information on programming VGA or better video cards while in protected mode without using the friggen' BIOS? E.g a modern AGP video card? Is the AGP bus accessed like the PCI bus, by scanning for a BIOS in memory mapped I/O somewhere high up in the address space?
How can an OS detect PCI devices? So does the OS scan for the PCI 32-bit BIOS blocks (is there one per device?) Then use them?
What about ISA devices? Is the ISA bus used through the "old" I/O space in the first 1MB of memory, or is it mapped high in memory like PCI stuff?
Is there any good information on programming COM i.e. serial ports, somewhere? When hooking up a modem, how are network packets sent out over the modem? Are the IP packets encapsulated inside PPP packets, the raw bytes of which are sent to the modem's input buffer? How are modem control codes/strings sent to the modem?
Ah, wandered off topic a bit... ;D
Back to video. Um, yes. How to? Maybe it's worth a look in the XFree86 code for the registers, then try to rip out the relevant parts to write drivers... of course I could also get register info from the Linux colour framebuffer console code... what is a DAC by the way? And what is a palette? What is a clockline? What about RAMDAC? When there are 24 bits per pixel, what format are the pixels in? Are they just drawn into video memory one by one? What is a plane? Like a colour plane or whatever? Is video memory just one huge contigous space memory mapped somewhere? Is it possible to change video modes programming the card in protected mode, fiddling with memory mapped I/O ports instead of doing I/O in the first MB in VM86 or real mode?
Thanks for your help!