fignition‎ > ‎Documentation‎ > ‎Understand It‎ > ‎

Video Modes

Text Mode

FIGnition boots up into a 25x24 character mode with support for Inverse Characters and 16 User Defined Graphics.

Default Character Set Bitmaps

Characters 0..0xF are all User-Defined-Graphics (UDGs) and can be overwritten, by default these characters; 0x10 and their inverse characters provide the bootup FIGnition logo. Characters 0x20 and 0x11 to 0x17 + their inverse characters 0xa0 and 0x91 to 0x97 are the Sinclair Battenburg graphics and are used for low-resolution plotting. Characters 0x18 to 0x1D are some extra patterns including bullet points and characters 0x1E and 0x1F are the Snial logo.

Characters 0 and 13 are control characters, they display nothing and a carriage return respectively. However, FIGnition's emit routine allows you to add 256 to any character to display any character as its raw image: 256 emit emits the image for character 0 and 269 emit emits the bottom-left corner box character.

Using Battenburg Graphics

The Batternburg graphics are characters 17 to 23 and their inverses:

Thus to turn on squares b and c you'd use character 16+2+4 = 22. To turn on square d you'd have to subtract from 167 => 167-22 = 145, which turns on pixels b,c and d. There are two exceptions to this rule: turning all the squares off is character 32 (a space) and its inverse (all pixels on) is 160.

FIGnition also supports horizontal half-character graphics in 3 shades using: 24, 25 and 27 and their inverses 152, 153 and 155. These can be combined to give 9 patterns:

Unfortunately, because there's not a lot of rationale in the character codes, it's harder to make use of them. Here's a grey-half block plotter!

32 256 * 25 + var greys

  19 c, 24 c, 27 c, 152 c,

  147 c, 153 c, 160 c,

: grPlot ( x y c -- )

  over 1 and >r >r 1 >>

  25 * + vram + dup ( addr addr : y&1 c )

  ic@ greys 9 +


    1- over over c@ =

  over c@ 32 = or until

  swap drop greys - 3

  /mod ( addr offsetMod3 offset/3 c y&1)

  r> r> if swap drop

    else rot drop swap


  3 * + greys + c@

  swap ic!


For example:

: tgreys

  3 0 do i

    48 0 do

      25 0 do

         dup i r rot grPlot


    loop drop



Fills the screen with black, then grey then white bars.

Using Box Characters

By default characters 0x08 to 0x0f are Box characters and if you don't need to overwrite them with UDGs, then you might find the following command useful!


: box ( dx dy x y -- )

  2dup at 264 emit >r >r

  over 0 do 265 emit loop

  266 emit


    r> r> 1+ 2dup >r >r

    at 267 emit over

    spaces 268 emit

  1- dup 0= until

  r> r> 1+ at 269 emit


  0 do 270 emit loop

  271 emit



3 8 10 2 box draws:

Using UDGs

Creating and displaying UDGs is covered here.

Display Commands

FIGnition supports the following display commands:

cls ( which clears the screen).
x y plot (which plots a Battenburg low-res Pixel at x,y in the current pen mode).
m pen ( which sets the current pen mode 0=move [but don't plot anything], 1=plot, 2=unplot, 3=Plot_Over )
x y at ( which sets the current print coordinate). Setting the coordinate to 24 23 and then executing cr scrolls the screen by one line.
ch emit ( which displays a character). Character codes in the range 0 .. 255 are displayed according to their bitmap; character code 13 displays a carriage return; code 0 displays nothing. In firmware versions from 0.9.5, character codes 256+n can be used to display the bitmap image in all cases.
more ( which pauses the screen if the screen position is within the last 15 characters of the last line).
." .... " for displaying a literal string.
addr len type for displaying a string in memory.
n . for displaying a number in the current number base.
n f .r like . , but in a field of f characters.
d. like . but for 32-bit numbers.
d.r like d. but in a field of f characters.

Fignition Also Supports a 160x160 Pixel Graphics Video Mode

From version 0.9.6 FIGnition support High Resolution Graphics at 160x160 pixel.

Neverthess, initial Hires video support is fairly crude. You can change video modes with the command:

n vmode ( which waits for the FIGnition to finish displaying a frame and then changes video modes).

plot and pen work in the new video mode. The circle routine works in the new video mode too.