Classic Computer Magazine Archive ANTIC VOL. 5, NO. 4 / AUGUST 1986

Ultimate type-in character editor


Program by STEVEN LEE
Article by CHARLES JACKSON, Antic Program Editor

UltraFont may be the most powerful character set editor ever published as an Atari type-in program. It lets you create, display and manipulate character sets, or "fonts" - as many as six characters at a time-in any of five graphics modes. This is an all machine-language program that you type in as a self-converting BASIC data file. (Antic Disk subscribers will find a bonus of several character fonts on this month's disk.) UltraFont runs on all 8-bit Atari computers with at least 24K memory, disk or cassette. A joystick is required.


If you've ever played Space Invaders, worked with a word processor such as PaperClip, or seen Antic's Color The Cover contest winner (June, 1985), you've seen redefined character sets (fonts). Using a redefined character set is very similar to using a different typeface on your printer.

A character set is a list of instructions which tells your computer how to draw characters. For example, the numbers 0, 24, 60, 102, 102, 126, 102, 0 tell the computer how to form the letter A. These numbers, when written in binary notation and stacked one on top of the other, form a "stencil" of the letter A:

0   00000000
24  00011000
60  00111100
102 01100110
102 01100110
126 01111110
102 01100110
0   00000000

If we place our stencil over a blank video screen, and turn on only pixels (picture elements) underneath a number 1, our image (bitmap) looks like this:

24    **
60   ****
102 **  **
102 **  **
126 ******
102 **  **

We can alter the appearance of our letter A by altering the instructions the computer uses to draw it. If we changed all the 102's to 126's, for example, the A would look more like a house:

24    **
60   ****
126 ******
126 ******
126 ******
126 ******

If we change our A to resemble a spaceship, we have the beginnings of a Space Invaders game. If we redefine the characters A, B and C to resemble a man beginning to take a step, a man in mid-step, and a man completing a step, we can create a simple animation sequence. Of course, our animation sequence could not display any words which used the letters A, B, or C-in any text message, these characters would also appear as stick figures.

As you might expect, creating and using redefined character sets from scratch is not all that easy. The Atari's character set starts at memory location 57344 ($E000) and continues through 58367 ($E3FF). This 1024 byte block of memory is permanently carved in ROM, and cannot be changed.

The trick here is to copy the entire character set from ROM into an appropriate place in RAM, where we can alter it. Then, we tell the computer to use our RAM-based character set, instead of the one in ROM. Once in RAM, we can redefine any or all of the 128 non-inverse characters.

The computer uses the non-inverse character set as a template for creating the inverse set. Thus, if you redefine a capital M, your inverse capital M also gets redefined.

You can design a redefined character set with a pencil, a pocket calculator, and several reams of graph paper. This is known as "doing it the hard way." Fortunately, there are many speedy programs known as "character font editors" that help you design your own redefined character sets, show you what your completed character set will look like, perform the necessary calculations and SAVE the set to a nine-sector disk file.

UltraFont is a full-featured font editor, the most powerful type-in character editing program ever published in Antic. The program's Edit window can accommodate up to six characters and works with GRAPHICS 0, 1, 2,12 and 13 (ANTIC modes 2, 6, 7, 4 and 5, respectively).

If you played
Space Invaders
or worked with a
word processor;
you 've seen


Type in Listing 1, CHARFONT.BAS, check it with TYPO II, and SAVE a copy before you RUN it. When RUN, the program asks whether you want to create a [D]isk version or a [C]assette version of the program. Choose [C] and the program will create a machine-language boot tape. Choose [D] and it will create a 55-sector object file called CHARFONT.OBJ. If you're using a disk system, be sure your disk has at least 55 free sectors. Be patient; CHARFONT.BAS requires about six minutes to create the new file.

Antic Disk subscribers will find a copy of CHARFONT.OBJ on the monthly disk. As a bonus, you'll also get several complete sample character fonts.

Cassette owners: Once you've created the object file, rewind the tape and press PLAY on your program recorder. Next, hold down the computer's [START] key while turning on the computer. (XL/XE owners should also hold down the [OPTION] key.) Press any key and the program should load and run.

Disk owners have two options: First, remove all cartridges, insert a disk with the DOS.SYS and DUPSYS files, and turn on the computer. Again, XL and XE owners should hold down the [OPTION] key during this process. When the DOS menu appears, use the [L]oad File option to load and run CHARFONT.OBJ.

Disk owners may also choose to copy the CHARFONT.OBJ program to another disk and name it AUTORUN.SYS. Now, just insert this disk into the drive, turn the computer on (XL/XE owners press the [OPTION] key) and the program will autoboot.


The main screen is divided into three windows. At the top, the Drawing window holds your Edit screen, a grid on which you plot your characters. The little white marks at the top of this screen show you where each character is divided. The pink line at the bottom of the screen indicates the position of your drawing cursor.

The Selecting window (in the middle) displays the complete character set. Move the cursor over any character and press the joystick button to bring it into the Edit window.

The bottom window shows what your character will look like when viewed in any chosen graphics mode.


This program has more than two dozen commands. Fortunately, you only need a few to get acquainted with it. To operate any of the following commands, all you need to type is the letter or symbol shown inside the square brackets []. For example, if you've never used this program before, you'll probably want to type an [H] or a [?] to access the [H]ELP screens.

[E]DIT- This command altertely moves your cursor between the Edit window and the Drawing window.

[B]LANK- Changes a series of characters into blank spaces. Place the cursor on the first in a series of characters to erase, press the joystick button, then place the cursor on the last character in the series and press the button again. All of the characters in this range will be changed into blank spaces.

[R]ESTORE- Changes a series of characters back into their original, unaltered forms. This command works the same way as the BLANK command.

[C]OPY- Makes multiple copies of a single character. Move the cursor over the character to copy and press the joystick button. Now, place the cursor over any other character and press the button. This erases the current character and replaces it with a copy of the first character. Press the [ESCAPE] key to leave this mode.

[K]OLOR- Multi-colored characters are rarely used in word processing prograrms. However, when redefined to look like rockets, aliens and landscapes, they are frequently used games. ANTIC modes 4 and 5 are four-color character modes designed for this purpose. To adjust the colors of your character, first press the number (1-5) of the color register you wish to alter. Once you've selected a color register, move the joystick left and right to adjust the color value. Move the joystick up and down to adjust the luminance value. Press the joystick trigger to choose another color register to alter.

[F]LIP- Changes the characters in the Edit window into their mirror-images.

[INVERT]- Inverts the characters in the Edit window

[G]RID- Lets you choose the size of your Edit window grid. The maximum window size is 6x6. Since the screen is not large enough to display a grid of this size, the program uses a 6 x 2 window to scroll vertically through the grid. When using Graphics 2 or ANTIC mode 5, it's best to use a grid no bigger than 6 x 4.

This is the most
powerful type-in
character editing
program we've
ever published.

[A] TOP- Moves the cursor to the top of the Edit grid.

[Z] BOTTOM- Moves the cursor to the bottom of the Edit grid.

[X] SWITCH- Alternates between two characters. This function is useful for creating animation sequences. Press the [ESCAPE] key to exit this mode.

Atari inverse INVERSE- Change the current display to inverse video.

[M]ODES- Select from available graphics modes-Graphics 0, 1,2 and ANTIC modes 4 and 5.

[S]ELECT SET- Alternate between the built-in character set and the redefined set you're working on.

[P]UT SET- Shows what your character set will look like in the graphics mode you've chosen. Remember that Graphics 1 and 2 only use the lower half of the character set. Press the [ESCAPE] key to exit this mode.

[U]NDO- Restores the characters back to their original form.

[>]UPDATE UNDO- Update the characters to the current data. It's useful when you're making uncertain changes.

[W]RITE DATA- Scans for characters you've redefined, then writes the data for those characters to disk, tape, printer, or screen. If you write the data to disk or cassette, you may also choose to write this data as source code. This option will generate either BASIC DATA statements, or Assembly language .BYTE statements. The computer asks you for a starting line number, the language you want to use (BASIC or Assembler), and a SAVE filename for the resulting file. When you're done, simply ENTER the resulting file into your program.

[D]INPUT DATA- This function lets you type in the numbers to form a character, instead of drawing it with a joystick. This is useful if you've already calculated the eight numbers needed to redefine a character. Just choose the first character to change and type in those eight numbers. Press [RETURN] and you'll be prompted to type in the data for the next character. If you don't want to change that character, press [RETURN] to skip that character, and edit the next one. Press the [ESCAPE] key to exit this mode.

[-] SHIFT UP- Shift the characters in the Edit grid up one position. Bits in the top row will wrap around to the bottom row.

[=] SHIFT DOWN- Works like SHIFT UP but moves the characters UP, but moves the characters left by one position.

[+] SHIFT LEFT- Works like SHIFT UP but moves the characters left by one position.

[*] SHIFT RIGHT- Works like SHIFT UP but moves the characters right by one position.

[1] SLOW- Decreases the speed of the drawing cursor.

[2] FAST- Increases the speed of the drawing cursor.


[OPTION]- Displays a disk directory from any selected disk drive.

[SELECT] Loads a previously saved character set. Will also load character sets created by most other editors.

[START]-Saves the current character set and the values of the five color registers.


If you only want to redefine a few characters, put your cursor in the top screen on the character you want to change, press [E] for Edit, select the character you wish to replace it with, and press the joystick trigger. This will perform an UPDATE on the character set information. Now you may continue drawing.

Use the right half of the bottom screen to see what your characters will ultimately look like. The bottom left portion displays your characters in inverse video. Remember that GRAPHICS 1 and 2 use only the lower half of the character set. Normally, you cannot display lower case or inverse video letters in these modes. Instead, the characters will be displayed in different colors. For example, in Graphics 1 an uppercase, non-inverse "A" will look just like a lowercase, inverse "a"- except the two will be displayed in different colors.

In ANTIC modes 4 and 5, the color register for playfield two (location 710, $02C6) is not used in inverse video. Playfield three, (location 711, $02C7) is used instead. This gives us five colors to work with, although we can only use four in any one character.

Ultra Font has
more than two
dozen commands

COLOR0 (location 708, $02C4)
COLOR1 (location 709, $02C5)
COLOR2 (location 710, $02C6)
COLOR4 (location 712, $02C8)
COLOR0 (location 708, $02C4)
COLOR1 (location 709, $02C5)
COLOR3 (location 711, $02C7)
COLOR4 (location 712, $02C8)

You can also merge two character sets into one. Just put as many as 36 characters of the first set into the Edit grid, load in the second character set, and use the [U] UNDO command to link the two sets.

Antic readers will certainly discover many other creative ways to unleash the power of UltraFont. Don't forget to write and tell us what you have created.

Listing 1: CHARFONT.BAS Download

On Disk: CHARFONT.EXE Download

Bonus Fonts BLOCK.FNT Download
, GOTHIC.FNT Download
, OUTLINE.FNT Download
, ROMAN.FNT Download
, SCRIPT.FNT Download

Steven Lee, 17, is a Sacramento, Calrfornia high school student who has been programming his Atari 800 for four years.