Next Previous Contents

4. Getting started with picoTK

The following describes installation and configuration of picoTK. It has been tested with SuSE 7.0 and a RedHat 6.1 Linux distributions.

4.1 Requirements

4.2 Installation

Note: picoTK cannot be compiled from a text console, since the fontripper tool requires access to a running X-Server.

4.3 Running the picoTK demo

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 fbe_buffer.

   emulators/fbe &         ; This starts fbe in 4bpp mode (The demo 
                             is compiled for this)
   demo/demo               ; Start demo

4.4 Customizing picoTK

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.

Color depth and resolution settings

The following variables in toolkit/Makefile determine the driver settings:

For 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 as well. (For the picoTK demo application edit the file demo/ which 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_X and PIXLS_Y specify the X and Y display sizes in pixels.

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 PTK.h, struct picoFont for the actual format). The makefile makes use of the fontripper for every font to be converted. 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 fontripper gets 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 

4.5 Customizing the framebuffer emulator

Start fbe with option -help to get a list of available options

Next Previous Contents