Video Modes
4.1 Overview
Zeal Video Board supports a variety of video modes configurable via the VIDEO_MODE register. These modes offer a solid balance of resolution, color depth, layers, and sprite support, letting you create great visuals while keeping the system manageable.
Note that the 256-color palette is shared by all video modes. For detailed information, see the Palette Memory chapter.
4.2 Supported Video Modes
| Mode | Name | Resolution | Color Depth | Layers | Sprites | Notes |
|---|---|---|---|---|---|---|
| 0 | Text 640 | 640×480 | 1bpp* | Single text | None | 80×40 chars on screen, 8×12 pixels each |
| 1 | Text 320 | 320×240 | 1bpp* | Single text | None | 40×20 chars viewport on 80×40 grid |
| 2 | Bitmap 256 | 256×240 | 8bpp | Bitmap only | None | Borders compensate missing pixels |
| 3 | Bitmap 320 | 320×240 | 8bpp | Bitmap only | None | Borders compensate missing pixels |
| 4 | GFX 640 8-bit | 640×480 | 8bpp | 2 (BG+FG) | Up to 128 | Foreground supports transparency |
| 5 | GFX 320 8-bit | 320×240 | 8bpp | 2 (BG+FG) | Up to 128 | Zoomed viewport of 640×480 |
| 6 | GFX 640 4-bit | 640×480 | 4bpp | 1 (BG + attr) | Up to 128 | Per-tile palette, sprites no behind FG |
| 7 | GFX 320 4-bit | 320×240 | 4bpp | 1 (BG + attr) | Up to 128 | Zoomed viewport of 640×480 |
* In Text modes, each character's bitmap is 1-bit per pixel (foreground/background). However, the foreground and background colors are mapped per character from the first 16 entries of the global palette using the layer1 tilemap as color attributes.
4.3 Zoom and Viewports
All 320×240 modes are effectively zoomed views of the corresponding 640×480 modes. The video board internally maintains the full 640×480 layout (for tilemaps or bitmap), but outputs only a 320×240 window by duplicating pixels horizontally and vertically. This zoom creates a viewport effect, where scrolling lets you pan across the full 640×480 content.
4.4 Text Modes (0 and 1)
- Display 8×12 pixel characters arranged on a grid of 80×40 tiles internally.
- In 640×480 mode (Text 640), all 80×40 characters are visible.
- In 320×240 mode (Text 320), only a viewport of 40×20 characters is shown, which can scroll over the full 80×40 grid.
- Scrolling granularity is character-based (8×12 pixels).
- Only a single text layer is present. This layer uses layer1 of the tilemap for color attributes (see Tilemap Memory chapter).
- Sprites are not rendered in text modes, and tileset and sprite memories are unused.
- The first 16 entries of the global palette are used.
4.5 GFX 8-bit Modes (4 and 5)
- Two graphical layers are active:
- Background (layer0)
- Foreground (layer1), which supports transparency (color index 0 is transparent).
- Tile size is 16×16 pixels, arranged as 40×30 tiles in 640×480 or 20×15 in 320×240 (zoomed).
- Sprites use the same 8-bit color tileset and can be 16×16 or 16×32 pixels.
- All sprites can be shown simultaneously, stacked by index: Sprite 0 at bottom, Sprite 127 at top.
- Sprites support flipping in X and Y axes and can be rendered above or below the foreground layer.
- Scrolling has pixel granularity (see Screen Scrolling chapter).
- Tiles cannot be flipped in X or Y in these modes.
- Tiles and sprites share the 64KB global tileset memory, allowing up to 256 tiles (each 16×16, 8bpp) in use.
4.6 GFX 4-bit Modes (6 and 7)
- Only one graphics layer (layer0) is used for tiles. The former foreground layer (layer1) is repurposed for tile attributes such as palette selection.
- Each tile selects one of 16 palettes, each palette containing 16 colors.
- Tile size remains 16×16 pixels, but each tile is now 4bpp (128 bytes), so the tileset memory can hold up to 512 tiles.
- Sprites are now 4bpp as well and also select their palette from the 16 available.
- Sprites support flipping X and Y but cannot be placed behind a foreground layer since it is no longer available.
- Scroll X and Y have pixel granularity (see Screen Scrolling chapter).
- Zoom and tile counts are identical to 8-bit modes.
4.7 Bitmap Modes (2 and 3)
- Tileset memory is repurposed as a linear framebuffer containing raw 8bpp pixels.
- Bitmap resolutions are 256×240 or 320×200 (320×240 with borders). The choice of 256×240 is deliberate for efficient addressing on 8-bit CPUs (multiplying by 256 is a simple left shift by 8).
- No tilemaps or sprites are used or rendered in these modes.
- Borders are displayed to compensate for missing pixels in these resolutions.
- Pixels pass through the global palette and are affected by scroll X and Y values for interesting effects.
- Sprites and tilemap memories are unused and no sprites are rendered.