The CRT Unit etc.
Frank Heckenbach
ih8mj at fjf.gnu.de
Thu Mar 3 07:46:03 CET 2005
Rick Engebretson wrote:
> On SuSE 8.1 (others mostly work too, RH9.0 not really) a high resolution
> framebuffer console driver (eg. 1024x768 pixels x16bpp) installs
> automatically with NVidiaTNT2 and MatroxG200 video cards. Both also get
> X11 installed. The Matrox card will install hardware accelerated OpenGL
> drivers from the distro, TNT2 drivers need to be downloaded. Thus, 3
> different graphics interfaces are available.
>
> What interests me is the framebuffer console. One can write directly to
> /dev/fb0 as user. This beats SVGAlib for graphics on the console.
Definitely (having changed to fb myself recently since my new
graphics card doesn't provide a good high-resolution textmode
anymore).
> Further, the "stty" user command is available on SuSE. This can change
> the console (ncurses controls) size yet leave a lot of framebuffer real
> estate for pixel graphics. Your CRTunit detects this modified console
> size very nicely. Your CRTunit is very sophisticated. (re; the linux
> console (up to 128 of them) runs on high performance computers, not a
> 9600 baud serial line.)
Thanks, but this praise really goes to the ncurses people. I didn't
have to do anything special about it.
> The reason I'm plowing through C libraries is to mmap /dev/fb0.
You did see MMapHandle (low-level) and MemoryMap (higer-level) in
the GPC module? :-)
> This
> should allow serious graphics capability on the linux console.
It does. One of the first things I did after changing to fb was to
write me a simple image viewer. Incidentally, it uses MemoryMap. It
was nice to see that it could be done in less than 10 KB of source
code (ok, it uses djpeg and ImageMagick's convert in a pipe ;-).
It might not be portable yet, but it works for me. If anyone cares,
it can be found at <http://fjf.gnu.de/misc/fgv.pas>.
OTOH, using a simple graphics library that supports fb should make
the programs more portable. AFAIK, GRX supports an fb target. I'm
going to try it when I get to it (at first quick attempt, it didn't
work, but perhaps I just have to enable it in a build rather than
svgalib or something) ...
> The
> problem with mmap in existing pascals is they are incomplete. You can't
> do everything. So going directly to low level system calls seems
> easiest.
Which is basically what the above-mentioned routines do. (BTW, which
other Pascals have mmap? I wasn't aware of any, so our routines are
most likely not compatible either.)
Frank
--
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8
More information about the Gpc
mailing list