Re: Text mode support?

Search this archive.

From: Bart Oldeman (Bart.Oldeman@bristol.ac.uk)
Date: Mon 06 Nov 2000 - 02:45:06 IST


On Sun, 5 Nov 2000, Marty Ross wrote:

> I've got thousands of lines of DOS code to port to Linux that makes heavy
> use of VGA "text mode" and other low level DOS/BIOS architecture / calls
> (including loading fonts, setting attributes, and reading keystroke
> scan-codes).
> 
> At first, I thought for sure that SVGALIB would save me, but now after
> playing with it a little bit, I don't see that it has ANY support for text
> modes (e.g. standard 80x25 text mode)!  Is this true?
> 
> I just want to have direct access to text mode memory, including attributes,
> etc.  I also want keyboard access, including raw scan codes, etc.
> 
> For output, am I going to need to use the "undocumented" "console_ioctl()"
> calls and perform brute-force direct and uncoordinated access to video
> memory myself?

You can open and write to /dev/vcsa to write to the screen and set
attributes, if the permissions are there. About the keyboard I don't
really know. svgalib can get raw scan codes. The midnight commander
(mc) uses the normal terminal keys combined with an ioctl call to query
the shift/ctrl/alt keys state on the console.

But in general (but probably you already know this) you should use slang
or ncurses for text mode programs. That way they also work in an xterm and
in a telnet session. But then I don't know what your application is.

Bart


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST