Graphics ROM

From Intellivision Wiki
Revision as of 16:48, 31 January 2005 by Arnauld (talk | contribs) (added link to Picture Encoding)
Jump to: navigation, search

The Graphics ROM (GROM) is an 2048 x 8-bit ROM, GI part number RO-3-9503. The CP1610 sees GROM at addresses $3000-$37FF. The Graphics ROM contains the default character set and is used by the STIC to render characters to the screen as directed by the program. The Graphics ROM also includes decoding logic to allow the Graphics RAM to interface to the STIC.

The GROM actually implements three address decoding modes:

  • The CPU-access memory map. GROM is visible at $3000 - $37FF, and GRAM is visible at $3800 - $3FFF
  • The display generation memory maps:
    • Color Stack mode: GROM is visible at $0000 - $07FF. GRAM is visible at $0800 - $0FFF. Addresses are fully decoded.
    • Foreground/Background mode: Same as Color Stack, except address bits 9 and 10 get ignored. Thus, only the first 64 cards of GROM are available. (GRAM only holds 64 cards, so there is no difference there.)

The GROM uses the STIC's VBlank Interrupt to switch to the CPU-access memory map. The CPU's BUSAK signal switches the GROM back to the display-generation memory map. The GROM looks at the BAR' and DWS' signals from the STIC to choose between Color Stack and Foreground/Background decoding. If both of these signals pulse positive together, the GROM switches to Foreground/Background mode until the next interrupt.

This article describes how pictures are encoded in graphics memory (both GRAM and GROM).

GROM Picture Catalog

GROM card #0 through #94 correspond directly to ASCII character codes #32 through #126. Thus, you can convert an ASCII code to a GROM card number by simply subtracting 32. The reason for this is that ASCII codes below 32 are "control characters" -- these charactes have no pictures associated with them. Therefore, the GROM starts with the first printable ASCII character.

The following table illustrates the ASCII character set, and how it corresponds to the first portion of the GROM. Note that ASCII code #32 is the "space character".

       ASCII CODES    GROM CARDS   ASCII CHARACTERS
       -----------    ----------   -------------------------------
         32 - 47        0 - 15       ! " # $ % & ' ( ) * + , - . / 
         48 - 63       16 - 31     0 1 2 3 4 5 6 7 8 9 : ; < = > ? 
         64 - 79       32 - 47     @ A B C D E F G H I J K L M N O 
         80 - 95       48 - 63     P Q R S T U V W X Y Z [ \ ] ^ _ 
         96 - 111      64 - 79     ` a b c d e f g h i j k l m n o 
        112 - 126      80 - 95     p q r s t u v w x y z { | } ~   

The next table maps hexadecimal GROM card numbers to ASCII characters. It is the same information as the above table, in a slightly different form. The column at the left gives the first hexadecimal digit, and the row across the top gives the second hexadecimal digit. For instance, the letter A would be GROM card #$21.

       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
       |x0 |x1 |x2 |x3 |x4 |x5 |x6 |x7 |x8 |x9 |xA |xB |xC |xD |xE |xF |
  +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  | 0x |   | ! | " | # | $ | % | & | ' | ( | ) | * | + | , | - | . | / | 
  +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  | 1x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | : | ; | < | = | > | ? | 
  +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  | 2x | @ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | 
  +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  | 3x | P | Q | R | S | T | U | V | W | X | Y | Z | [ | \ | ] | ^ | _ | 
  +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  | 4x | ` | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | 
  +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  | 5x | p | q | r | s | t | u | v | w | x | y | z | { | | | } | ~ |
  +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

GROM card numbers above 94 contain a variety of graphic pictures (mostly various lines and filled areas), and also some pieces of EXEC ROM code (!).