Fonts

This page contains collection of fonts that can be used with Commander X16. They are in binary form with first two bytes in each file set to 0 so they can be loaded anywhere into CPU RAM or directly into Video RAM (or VRAM).

More on how the Tile maps work in my post here.


One Color Fonts

One color fonts are the most compact ones and the type that is used by default after starting the Commander X16. Each pixel uses one bit and therefore can only have two values, foreground color or background color.

Example of loading into VRAM would be:

VLOAD "LIGHTFONT.BIN",8,1,0

in this case the font will be loaded into address $10000 in VRAM. For the default Layer 1 to use this font we need to change the Tile Base address to:

POKE $9F36,128


I created fonts in such a way to keep the PETSCII graphics so the majority of the screen should not require any modifications.
All fonts are also split in half where first half (0-127) is positive, meaning that characters are drawn in foreground color and second half (128-255) is negative, meaning that characters are transparent and therefore drawn in background color. This allows the normal display of the cursor.

Light Font

This font resembles many of the fonts on 8 bit computers of the are like ORIC that I was making first coding steps but also Sinclair Spectrum and Apple II. This font is very easy to look at and is my favorite as I was never big fan of Commodore 64 font.

Download: LIGHTFONT.BIN

PET Font

Light font and graphic characters as used on Commodore PET computers.

Download: PETHIFONT.BIN


Modern Font

This font might be useful for futuristic or space shooter games.

Download: MODERNFONT.BIN

PC Font

Early PCs used 8x14 and 8x16 pixel fonts there was also 8x8 pixel variation. With this font we can use it on Commander X16 too.

Download: PCFONT.BIN

Cursive Font

This is another light font that might not be the easiest to read but could be appropriate for some adventure games.

Download: CURSIVEFONT.BIN

Army Font

One variant of the font that simulates painted characters using stencils.

Download: ARMYFONT.BIN



Three Color Fonts

Three color fonts are using two bits per pixel, so font file takes twice as much space as the One Color font but of course we get three colors plus transparency at our disposal for many more possibilities for design. For these fonts to be usable we need to switch to Tile mode 2 and then set the Tile Base address in the same way as for one color fonts like this:

VLOAD "LIGHTSHADOWFONT.BIN",8,1,0
POKE $9F36,%10000000
POKE $9F34,%01100001

We also have to be aware that color attribute byte contains following information:


Offset Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 Tile Index (bits 0-7)
1 Palette Offset (bits 4-7) V-flip H-flip Tile Index (bits 8-9)

BASIC environment is not really set up to use multi colored fonts but we can still use it. We have to pay attention to differences.
BASIC is expecting to be in Mode 0, meaning that top four bits define background color and low four bits define foreground color. In Mode 2 that is not so and because we only defined 256 characters (tiles) we have to keep bits 0 and 1 unset (0).
To define offset we simply set background color.
If we want to have our characters flipped horizontally and/or vertically have to set foreground color to 4 and 8.
Let's look at some examples:

COLOR 0,7

will apply palette offset by 112 bytes (7x16) and because first color (00) in tile is always transparent will use three colors at 113 (01), 114 (10) and 115 (11) which is in the green gradient range.
If we want to flip characters horizontally we can type:

COLOR 4,7

and we will get:




This allows us to continue working and editing our BASIC program because it is still visible even though we are working in Mode 2.

Color Font

This is standard Kernal font that is split into three layers. I used it in the example above.

Download: COLORFONT.BIN


Light Font with Shadow

The same font as at the top with added shadow. Note that this font only uses two colors plus transparency.

Download: LIGHTSHADOWFONT.BIN


16 x 16 Pixel Fonts

Expanded Standard Font

This is standard C64 font that was expanded to 16 x 16 pixel size. I tried to keep the style with only smoothing the edges with only minor changes.






Comments

  1. I'm surprised you don't have a PET font. It's similar to the 'light' font but is a bit wider so there isn't as much space between characters.

    ReplyDelete
    Replies
    1. Good point. I was actually thinking about using PET graphics characters with Light font but then decided to stick with the original ones. I am also not sure if PET font is copyrighted and would get me in trouble by just copying it. Basic characters are not that unique but graphics definitely are.

      Delete
    2. In the US, bitmap fonts are not protected by copyrights. I don't know about other countries.

      Delete

Post a Comment

Popular posts from this blog

Commander X16 Premium Keyboard