The following describes installation and configuration of picoTK. It has been tested with SuSE 7.0 and a RedHat 6.1 Linux distributions.
tar xzf picotk-xx.tgz
cd picotk make
Note: picoTK cannot be compiled from a text console, since the
fontripper tool requires access to a running X-Server.
From a common directory exacute the following. It is important to run
these programs from the same directory as they need access to the same
shared memory file handle
emulators/fbe & ; This starts fbe in 4bpp mode (The demo is compiled for this) demo/demo ; Start demo
picoTK can be tailored by changing the picotk/toolkit/Makefile. This Makefile is responsible for generating the libPTK.a static library, which is to be compiled into the application.
The following variables in
the driver settings:
COLOR_DEPTH PIXLS_X PIXLS_Y PIXLS_TOTAL_X BASE_ADDRFor some legacy and VESA VGA modes there are already prepared entries in the Makefile. Uncomment the appropriate lines and make sure to set the correct corresponding video mode in pc386_lilo's Makefile.inc as well. (For the picoTK demo application edit the file
demo/Makefile.inc.pc386_lilowhich get copied to the correct place during the make process.)
COLOR_DEPTH specifies the color depth - and in consequence the
driver to be used. It's either 1, 4 or 8.
PIXLS_Y specify the X and Y display sizes in
PIXLS_TOTAL_X specifies the number of total X pixels. This is
normally equal to PIXLS_X but eventually greater. For example custom
hardwware may decide - easing implementation - to have a total X size
of 512 Pixel, while only 320 are displayed. The number of total pixels
is required to get the correct offset address into the framebuffer.
BASE_ADDR is the physical address where the linear frame buffer
starts. The special macro
LILO_VGA_BASE can be used instead of
the actual address to request the frame buffer start from pc386_lilo;
this is required for VESA VGA flat linear frame buffer modes.
You can change the fonts included in the library by changing the
Makefile. The picoTK tool
fontripper rips a X-Font from the
X-server and converts them into a C sourcefile. The file contains a
(large) initialized unsigned char array wich contains the ripped
font in a distinct format (see
struct picoFont for
the actual format).
The makefile makes use of the
fontripper for every font to be
fontripper accepts two arguments. Firstly the X-font name, in the way
X understands fonts, i.e. the XFLD (X font logical description)
containing wildcards (asterisk) for
properties, which need not to be matched. Secondly
a "picoTK name", this is used for referencing the font from within your
picotk application. The common conventions for filenames and variable
names are as follows:
<picoTK name>.c The font source text <picoTK name>.o The conpiled picotk font <font_picoTK name> The reference (=variable name) for use in the application
fbe with option
-help to get a list of available