Texas Instruments TMS9918 - Screen Mode 2 Detail

Screen Mode 2 Detail

Technically, mode 2 is a character mode with a colorful character set. The screen is vertically divided into three 256×64 pixel areas, each of which gets its own character set. By sequentially printing the characters 0 through 255 in all three areas, the program can simulate a graphics mode where each pixel can be set individually. However, the resulting framebuffer is non-linear.

The program can also use three identical character sets, and then deal with the screen like a text mode with a colorful character set. Background patterns and sprites then consist of colorful characters. This was commonly used in games, because to fill/scroll the entire screen, only 32×24 bytes had to be moved. Games on other home computers such as the Commodore 64 also worked on a character basis. The graphics can be drawn such that the 8×8 pixel borders are not too obvious, an art where Konami was particularly well known for their excellence.

This is the TMS9918 screen mode 2 challenge: every 8×1 pixel area has two colors, foreground and background. They may be freely picked out of the 16 color palette. But within each 8×1 pixel area, only two different colors can exist. When manipulating the screen in BASIC with the LINE command, one easily could exceed the limit of max 2 colors per 8×1 area and end up with "color spill".

In comparison, the MOS Technology VIC-II used in the Commodore 64 limited programmers to 4 colors per 4×8 fat-pixel area. This meant there was less local color pressure, but more global color pressure: while three of the 4 colors could be freely picked out of palette of 16, the remaining fourth was a universal background color.

The TMS9918 does not have any scroll registers. Scrolling must be done in software.

Read more about this topic:  Texas Instruments TMS9918

Famous quotes containing the words screen, mode and/or detail:

    Every obstruction of the course of justice,—is a door opened to betray society, and bereave us of those blessings which it has in view.... It is a strange way of doing honour to God, to screen actions which are a disgrace to humanity.
    Laurence Sterne (1713–1768)

    Sight is the least sensual of all the senses. And we strain ourselves to see, see, see—everything, everything through the eye, in one mode of objective curiosity.
    —D.H. (David Herbert)

    General scepticism is the live mental attitude of refusing to conclude. It is a permanent torpor of the will, renewing itself in detail towards each successive thesis that offers, and you can no more kill it off by logic than you can kill off obstinacy or practical joking.
    William James (1842–1910)