Part 38: Hex Wars: An autopsy (Part 2a)Also! It turns out all the stuff about custom fonts in Hex War? The special loader setup, the copying and altering of the font? It's not strictly necessary. The four redefined characters are vaguely similar to the four existing corner shapes you get with shifted L, O, P, and @ (which is its own key on the C64). Here's a compare-and-contrast of the board with and without the redefined characters. (Technically, I changed the bit that redefines the characters to use the shapes of the built-in characters.)
E: also also! Here's pictures of the two built-in fonts.
The character codes listed (the hexadecimal digit on the left followed by the one at the top) are the ones you can POKE into screen memory to display the symbol. You'll notice that the second half of each is simply an inversion of the first; that's because Commodore BASIC allows you to print characters normally or inverted.
By contrast, here's what you get from PRINTing the PETSCII codes. The reversed characters can only be printed in quote mode, as otherwise their effect is immediate (clearing the screen, changing the cursor color, moving the cursor, et cetera). The yellow ! marks, however, indicate PETSCII codes that have no visible equivalent, as their effects are immediate even in quote mode. (Yes, you can go into quote mode while running a program. Things can get ugly if you do, though.) The first and last are carriage returns; the middle is backspace.
Note that the last four rows (C0-FF) are entirely duplicated elsewhere on the chart. While you can print those codes, reading the codes of typed characters will return the lower numbers (so 97, not 193, is the code for a capital A).
Isn't learning fun?