Oric Fonts
Text on the Oric is drawn from a redefinable character set held in RAM. At boot the machine copies its character patterns from ROM into RAM, so every glyph can be edited in place, giving custom fonts and tile shapes for games. Each character is a 6-wide, 8-row pattern that matches the six-pixel pixel byte of the display.
Overview
Each character is a 6×8 cell, the same six pixels wide as a pixel byte and eight rows tall. A glyph is eight bytes, one per pixel row, matching the display exactly. Because the character set sits in RAM, editing those bytes changes how a character prints everywhere at once, with no extra cost when text is drawn.
Character format
A glyph is eight consecutive bytes. The first byte is the top row of the character, the last byte the bottom row. In each byte bits 5 down to 0 are the six pixels, bit 5 the leftmost, a set bit an ink pixel. Bits 7 and 6 are not part of the pattern and are left clear, so each row uses the same low six bits as a pixel byte.
| Byte | Row | Bits (bit 5 = left) |
|---|---|---|
| 0 | Top | 6 pixels of row 0 |
| 1–6 | Middle | rows 1 to 6 |
| 7 | Bottom | 6 pixels of row 7 |
Most standard glyphs leave the bottom row blank so characters have spacing between text rows, and the pattern occupies the left of the six pixels.
The RAM character set
The Oric holds its characters in RAM, not ROM, so they can be edited. At power-on the machine copies the built-in patterns into the standard character area, which then feeds both text mode and text in the HIRES window. The set holds 128 characters at eight bytes each, so a full set is 1024 bytes, sitting inside a 2048-byte reserved area.
| Set | Base | Size |
|---|---|---|
| Standard charset | 0xB400 (46080) | 128 chars × 8 bytes |
| Alternate charset | 0x9800 (38912) | 128 chars × 8 bytes |
Redefining characters
To change a character you write its eight bytes in the character area. The address of a glyph is the set base plus the character code times eight; the eight bytes from there are its rows top to bottom. Overwrite them with your own pattern and every place that prints that code shows the new shape at once. Games use this to turn chosen character codes into custom tiles, a player shape or border pieces, then print those codes to lay out a screen quickly.
| Step | Detail |
|---|---|
| Find the glyph | base + code × 8 |
| Write 8 bytes | top row first, low 6 bits per row |
| Effect | every printed copy of that code updates |
The alternate set
The Oric keeps two character sets, a standard set and an alternate set, both copied to RAM at boot and both editable. A text mode attribute byte chooses which set the rest of the row uses, so a program can switch between them along a line without changing the character codes. The alternate set is often given a second font or a bank of graphics tiles, doubling the shapes available in text and HIRES text without disturbing the standard letters.