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!
Video console programming
Re:Video console programming
When Linux starts up and you see text and the penguin graphic image, you are really in vesa graphic mode, not text .
There's a lot of rubbish about it using split screen mode.
As for pmode vesa do not use v86, for mode swiching, just swich back to realmode swich modes and go back to pmode.
You can try my Vesa demo (with full fasm code)to see how easy it is, its called "DemoVesa.zip" and available from here: http://www.falconrybells.co.uk/
\\\\||////
(@@)
ASHLEY4.
There's a lot of rubbish about it using split screen mode.
As for pmode vesa do not use v86, for mode swiching, just swich back to realmode swich modes and go back to pmode.
You can try my Vesa demo (with full fasm code)to see how easy it is, its called "DemoVesa.zip" and available from here: http://www.falconrybells.co.uk/
\\\\||////
(@@)
ASHLEY4.
Re:Video console programming
Do you want all 20 something questions you asked answered in this one topic?
Sounds like you could do with something more like a tutorial to me.
If you want to do text mode programming, then it's simple. You just write your text to video memory. Doing things like scrolling the text, moving the hardware cursor, changing the text mode, switching to your own fonts etc isn't much harder. You just need to know which VESA registers to write to and which values to write to them. There are plenty of resources about that already (http://osdev.neopages.net/FreeVGA/home.htm?the_id=25 for example?).
Graphics mode, I haven't touched yet, and don't plan to for a good long while.
Sounds like you could do with something more like a tutorial to me.
If you want to do text mode programming, then it's simple. You just write your text to video memory. Doing things like scrolling the text, moving the hardware cursor, changing the text mode, switching to your own fonts etc isn't much harder. You just need to know which VESA registers to write to and which values to write to them. There are plenty of resources about that already (http://osdev.neopages.net/FreeVGA/home.htm?the_id=25 for example?).
Graphics mode, I haven't touched yet, and don't plan to for a good long while.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Video console programming
Ansi codes are processed by a software component. It's something you place between STDOUT and the hardware that will 'understand' the ANSI commands and issue gotoxy, change the default attributes and things alike in a standardized fashion.confused wrote: 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?
Except maybe some TTY terminals (i mean a *real* terminal: a screen with a RS232 plug and a hard-wired keyboard), no hardware decode ANSI escapes itself.