Difference between revisions of "Picture Encoding"

From Intellivision Wiki
Jump to: navigation, search
 
m (Protected "Picture Encoding" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
 
(No difference)

Latest revision as of 09:05, 4 December 2010

This article describes how pictures are encoded in graphics memory. This applies to Graphics RAM and Graphics ROM.

Each card stores a single 8x8 picture in a sequence of 8 bytes. The first byte of the sequence holds the topmost row of pixels. The last byte holds the bottom row of pixels. Bit 7 in each byte holds the leftmost column of pixels, and bit 0 in each byte holds the rightmost column. Pictorally:

                                   Bit #
                              7 6 5 4 3 2 1 0  
                             +---------------+
                          0  |               |
                       B  1  |               |
                       y  2  |               |
                       t  3  |               |
                       e  4  |               |
                          5  |               |
                       #  6  |               |
                          7  |               |
                             +---------------+

Suppose, for instance, we want to define a picture for the letter R. That picture might look like so: ('#' indicates pixels that are "on", and '.' indicates pixels that are "off")

                                   Bit #
                              7 6 5 4 3 2 1 0  
                             +---------------+
                          0  |# # # # # # . .|
                       B  1  |. # # . . # # .|
                       y  2  |. # # . . # # .|
                       t  3  |. # # # # # . .|
                       e  4  |. # # . . # # .|
                          5  |. # # . . # # .|
                       #  6  |. # # . . # # .|
                          7  |# # # . . # # #|
                             +---------------+

All of the "on" pixels are represented with 1 bits, and all of the "off" pixels are represented with 0 bits. The binary pattern for this character would be:

                            DECLE   %11111100
                            DECLE   %01100110
                            DECLE   %01100110
                            DECLE   %01111100
                            DECLE   %01100110
                            DECLE   %01100110
                            DECLE   %01100110
                            DECLE   %11100111

You could copy this exact bit pattern into one of the card slots in GRAM, and voila! You have a stylized R.