25
Patterns
The background and sprites are made out of 8x8-pixel patterns. Each pattern is
composed of four bitplanes, so individual pixels can be one of 16 colors. Pattern data is
stored in VRAM. There is enough memory for 512 patterns, though some of the available
VRAM is used by the sprite attribute table and name table. Each pattern uses 32 bytes.
The first four bytes are bitplanes 0 through 3 for line 0, the next four bytes are bitplanes
0 through 3 for line 1, etc., up to line 7. For more information about how patterns are
used, see the background and sprite sections.
Background
The background is made up of 8x8 tiles that can use 16 colors from either palette. The
background is defined by the name table, which is a 32x28 matrix of words stored in
VRAM. If using the 224 or 240-line displays, the size of the name table is 32x32 instead.
Each word in the name table has the following layout:
- = Unused. Some games use these bits as flags for collision and damage zones (such as
Wonderboy in Monster Land, Zillion 2)
p = Priority flag. When set, sprites will be displayed underneath the background pattern
in question
c = Palette select
v = Vertical flip flag
h = Horizontal flip flag
n = Pattern index, any one of 512 patterns in VRAM can be selected
Horizontal scrolling
Register $08 can be divided into two parts, the upper five bits are the starting column,
and the lower three bits are the fine scroll value.
On each scanline, the VDP has a column counter that goes from 0 to 31. The exact pixel
on which the VDP starts rendering columns is offset to the right by the fine scroll value.
For example, if the fine scroll value is set to 7, then 31 columns are fully visible and the
first pixel of the 32nd column is shown at the far right edge of the display.
MSB LSB
---pcvhnnnnnnnnn
Содержание Franky
Страница 1: ...Instruction Manual ...