Classic Computer Magazine Archive COMPUTE! ISSUE 41 / OCTOBER 1983 / PAGE 213

64 CHARACTER CREATOR

AI J. Ockert

This menu-driven utility makes it easy to create, modify, and save custom characters. Also, the program calculates DATA statements for your new characters and allows a review of your creation in any 64 color.

This character generator program moves the complete character set (256 characters) into RAM and sets up the screen so you can easily redefine characters. Up to 128 characters can be redefined at any one time. However, the reversed (inverse video) characters cannot be redefined without modifying the program.

An 8 × 8 grid will be drawn on the screen. By using the cursor keys, you can draw any character you wish to create.

With single-key commands, all of which are listed next to the grid on screen, characters can be manipulated for a variety of purposes. When you have the character the way you want it, the D command will display the DATA statement containing your new character.

After you have redefined as many characters as you wish (up to 128), you can save them in a data file by using the S command. Preceding all the character data will be the total number of characters saved in that data file. And preceding each character's data will be the key code of that character.

The next time you run the program, you can load all the characters saved in a data file by using the L command. The program is set up for tape files. If you are a disk drive owner, simply substitute the following lines:

640 IF A$ = "L" THEN 0PEN1, 8, 0, N$ : GOTO900
645 OPEN1, 8, 1, N? : GOTO800

Easy Single-Key Access

When the program is first run after the ROM character set is transferred to RAM and the screen set up, the program initializes the C (select a character) command. If you want to load previously defined characters first, select any character to get back to the main menu. Then select the L (load) command.

While running the program, you can view the character that you are creating in the Multi-Color Mode (MCM) by selecting the M (Multi-Color ON) command. All the characters displayed on the screen will be in multicolor. However, only the character that you are creating, which is displayed at screen location 1731, will change when you change the color with F7. This is because only Color Memory location 56003, which contains the color information for screen location 1731, is changed with the F7 function key.

Also, while in MCM, the redefined character has to have a color between 8 and 15 in Color RAM (CRAM) to be in MCM. That is, if the color code is between 8 and 15 (orange through gray 3) in the CRAM, then the bit pairs will change colors as the background colors BKG # 0 through BKG # 2 are changed. However, if the color code in CRAM is from 0 to 7 (black through yellow), then the redefined character will be displayed only in that color.

You can also see what different color combinations look like by changing the screen background color BKG # 0 using the Fl function key and changing the character color by using the F7 function key. When the three background colors are changed by using Fl, F3, and F5, respectively, all the screen characters change.

The bit pair/color register format is displayed in the upper-right corner of the screen. This is to assist you in determining what color the bit pair will have while in Multi-Color Mode. If both pixels of the bit pair are off (00), the screen (BKG # 0) register color will be displayed there.

If only the second pixel of the bit pair is on (01), background # 1 (BKG # 1) register color will be displayed for the bit pair.

If only the first pixel of the bit pair is on (10), background # 2 (BKG # 2) register color will be displayed for the bit pair.

If both pixels of the pair are on (11), the Color Memory (CRAM) color will be displayed for the bit pair – but only in screen location 1731.

After you have created a few characters, by using the left arrow (←) command you can break from the program to see what your characters look like on the screen in different combinations. The screen can be cleared and your characters typed onto the screen. In this mode the program can even be listed. However, if you modify the program now, you will lose your redefined character data in the arrays since all variables are zeroed when you modify or edit a program.

If you stay in the immediate mode, you will not lose your characters, and you can return to the main program by typing in GOTO 12 and RETURN.