STIC

From Intellivision Wiki

(Difference between revisions)
Jump to: navigation, search
m
(Foreground/Background Mode)
Line 31: Line 31:
The program selects the STIC's Foreground/Background (FGBG) mode by writing to the STIC register at location $21 during [[VBlank Period 1]].  This sets the STIC in FGBG mode.  The STIC stays in this mode until the program accesses location $21 again.  While in this mode, the STIC interprets each value in the BACKTAB as follows:
The program selects the STIC's Foreground/Background (FGBG) mode by writing to the STIC register at location $21 during [[VBlank Period 1]].  This sets the STIC in FGBG mode.  The STIC stays in this mode until the program accesses location $21 again.  While in this mode, the STIC interprets each value in the BACKTAB as follows:
-
      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
+
[[Image:Stic_fgbg_word.png|center|Word from BACKTAB in Foreground / Background Mode]]
-
      ?  ?  B  b  t  b  b  n  n  n  n  n  n  f  f  f<br/>
+
-
    where:
+
-
      ??        Ignored by the STIC. Programs can use these as flag bits.
+
-
      bBbb      The background color (off bits), either [[Pastel Colors|pastel]] or [[Primary Colors|primary]] colors (0 - 15).
+
-
                Note that bit 13 of the BACKTAB word becomes bit 2 of the color number.
+
-
      t        Indicates where the STIC will source the image from:  0 = GROM, 1 = GRAM.
+
-
      nnnnnn    Actual # of the card corresponding to it's position in GRAM or GROM, (0 - 63).
+
-
      fff      Foreground color, primaries only (0 - 7).
+
Unlike Color Stack mode below, the Foreground/Background mode places no restrictions on where the background color changes.  With this flexibility comes a couple disadvantages:
Unlike Color Stack mode below, the Foreground/Background mode places no restrictions on where the background color changes.  With this flexibility comes a couple disadvantages:

Revision as of 18:48, 25 November 2007

The STIC provides the video display for the Intellivision Master Component. It is capable of displaying a background resolution of 160x96 pixels and up to 8 hardware sprites, referred to as Moveable OBjects or MOBs.

Contents

Registers

The STIC has a fair number of registers visible in the CPU's memory map. The System RAM appears to decode addresses $00 - $7F to the STIC, although the STIC itself only responds to the range $00 - $3F. Furthermore, that address space is not entirely populated. The following table lists the known STIC registers:

Address RangeDescription
$00 - $07 MOB X Coordinate Registers
$08 - $0F MOB Y Coordinate Registers
$10 - $17 MOB Attribute Registers
$18 - $1F MOB Interaction (collision) Registers
$20 Active Display Strobe
$21 Mode Select Strobe
$22 - $27 Unused/Unknown
$28 - $2B Color Stack
$2C Border Color
$2D - $2F Unused/Unknown
$30 Horizontal Delay (Scrolling)
$31 Vertical Delay (Scrolling)
$32 Border Extension Control
$33 - $3F Unused/Unknown

Display Background

The background area is rendered by the STIC as a series of "cards", which are blocks of 8x8 pixels. The background is composed of 20 cards horizontally and 12 cards vertically for a total of 240 cards. The overall resolution of the background is 159x96. (The rightmost column does not get displayed.)

The cards to be displayed by the STIC are loaded by the program into an area of memory referred to as the BACKground TABle or BACKTAB. The BACKTAB is located within a portion of the 16-bit RAM memory space from $0200-$02EF. While drawing the display, the STIC reads each card from the BACKTAB and draws it onscreen. How the STIC interprets each card in the BACKTAB depends on whether the STIC is in Foreground/Background mode or Color Stack mode.

Foreground/Background Mode

The program selects the STIC's Foreground/Background (FGBG) mode by writing to the STIC register at location $21 during VBlank Period 1. This sets the STIC in FGBG mode. The STIC stays in this mode until the program accesses location $21 again. While in this mode, the STIC interprets each value in the BACKTAB as follows:

Word from BACKTAB in Foreground / Background Mode

Unlike Color Stack mode below, the Foreground/Background mode places no restrictions on where the background color changes. With this flexibility comes a couple disadvantages:

Color Stack Mode

The program selects the STIC's Color Stack mode by reading from the STIC register at location $21 during VBlank Period 1. This sets the STIC in Color Stack mode. The STIC stays in this mode until the program accesses location $21 again. While in this mode, the STIC interprets each value in the BACKTAB as follows:

     15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
      ?  ?  a  F  t  N  N  n  n  n  n  n  n  f  f  f
where:  ?? Ignored by the STIC. Programs can use these as flag bits. a When set, advances the color stack Ffff Foreground color (on bits), either pastel or primary colors (0 - 15). t Indicates where the STIC will source the image from: 0 = GROM, 1 = GRAM. NNnnnnnn Actual # of the card corresponding to it's position in GRAM (0 - 63), or GROM (0 - 255). When 't' is 1, the STIC ignores 'NN' (bits 9 and 10). Programs can use these bits as flags. fff Foreground color, primaries only (0 - 7).

When rendering the background in color stack mode, the STIC selects the foreground color from the value stored in BACKTAB, and the background color from the current value on the top of the Color Stack. The Color Stack registers, at locations $28 - $2B define this stack of colors. The Color Stack is really more like a circular queue: Initially, the STIC picks the background color from the first entry on the stack. Whenever the STIC sees the 'Advance' bit set, it moves to the next entry on the stack prior to rendering the card. If the STIC was already on the last entry (at location $2B), it wraps back to the first entry.

In this mode, both foreground and background colors can come from the entire 16-color palette, at least for images from GRAM. This allows producing very colorful screens, but with some restriction on where the background color changes.

Color Stack mode also supports a special display mode for individual cards, called Colored Squares mode. Programs indicate which cards display as Colored Squares cards by setting bit 12 to '1' and bit 11 to '0'. This also means that programs cannot display cards from GROM with a pastel foreground color, since that is what this encoding would otherwise specify. The STIC interprets Colored Squares cards as follows:


     15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
      ?  ?  d  1  0  d  d  c  c  c  b  b  b  a  a  a
where:  ?? Ignored by the STIC. Programs can use these as flag bits. ddd Color of pixel 3 ccc Color of pixel 2 bbb Color of pixel 1 aaa Color of pixel 0

displays as: +----+----+ |aaaa|bbbb| |aaaa|bbbb| +----+----+ |cccc|dddd| |cccc|dddd| +----+----+

Each quadrant of a Colored Square card can be one of 8 colors. The squares have these properties:

Moveable Objects

The STIC is capable of rendering up to 8 moveable objects, or MOBs, which may be either 8x8 or 8x16 in size. The STIC can stretch each MOB horizontally by 2x, and can stretch each MOB vertically by 2x, 4x, or 8x. Note that each MOB pixel is displayed by default (if no stretching is enabled) as the same width of each background pixel, but only half the height of the background pixels. The STIC can also mirror each MOB in the horizontal direction, the vertical direction, or both.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox