Video Modes

From Uzebox

Jump to: navigation, search

The Uzebox currently supports 12 video modes (as of v3.3).

Contents

[edit] Mode 1

Alt text
Mode 1 Example - Megatris
  • The mode used in the original kernel (i.e: used for Megatris)
  • 240x224 resolution
    • 6 or 8 pixels wide tiles
    • Configurable tile height
  • Allows more than 256 unique tiles on screen by using 16 bit vram array (each entry is a direct memory pointer to a tile in flash)
  • no scrolling
  • no sprites
  • CPU cycles left: high
  • RAM consumption: medium
  • Program memory consumption: very low

[edit] See also

[edit] Mode 2

Alt text
Mode 2 Example - Zombienator
  • 144x224 resolution, 6x8 pixels tiles, 32x32 vram
  • 8 bit vram array, each entry is an index into a 256 tiles table
  • full screen scrolling
  • multiples screen sections with independent scrolling, height, sprite priority and tile memory
  • maximum 32 sprites at once, 6x8 pixels, up to 5 per scanline. No sprites flipping. (though now vertical flipping will be possible)
  • Sprites blitting independent of background offset
  • CPU cycles left: low
  • RAM consumption: medium-high
  • Program memory consumption: high due to unrolled loops (low if horizontal scrolling not required)

[edit] See Also

[edit] Mode 3

Alt text
Mode 3 Example - Super Mario demo
Alt text
Mode 3 Example - Donkey Kong
  • Up to 240x224 resolution, 8x8 pixels tiles, up to 32x32 vram
  • 8 bit vram array, each entry is an index into a 256 tiles table
  • Full screen scrolling
  • 1 scrolling main section and 1 static overlay section for scores, etc.
  • Configurable number of sprites using 'ramtiles', sprites can be flipped on the X/Y axis and can be overlaid on other sprites. With the 4K RAM & CPU limit, about 20 sprites can be displayed at once. Aggregated sprites will allow a bigger total sprites count to to the tiles overlapping required when blitting sprites which position are not multiples of 8. (see note below about MAX_SPRITES)
  • CPU cycles left: lowest
  • RAM consumption: high
  • Program memory consumption: medium

[edit] See also

[edit] Mode 4

Alt text
Mode 4 Example - Dungeon Slash Demo

Developed by David Etherthon

  • 288x224 resolution, 16x16 pixels tiles
  • full screen scrolling
  • no sprites
  • 8x8 text area section
  • CPU cycles left: high
  • RAM consumption: low
  • Program memory consumption: medium

[edit] Mode 5

Alt text
Mode 5 Example - Chess4uzebox
  • Based on Mode 1, but using 8-bit indexes to save RAM
  • 240x224 resolution, 6x8 pixels tiles, 40x28 vram
  • 8 bit vram array, each entry is a index to a tile table (maximum 256 unique tiles on screen)
  • no scrolling
  • no sprites
  • CPU cycles left: high
  • RAM consumption: low
  • Program memory consumption: very low

[edit] Mode 6

Alt text
Mode 6 Example - Vector Demo

Monochrome 1bpp ramtile-only video mode.

  • Submodes: 240x224 (30x28 ramtiles) or 288x224 (36x28 ramtiles)
  • Supports up to 256 ramtiles
  • Foreground/Background colors can be changed per scanline in 240x224 submode
  • Optimized point and lines functions
  • CPU cycles left: low
  • RAM consumption: medium
  • Program memory consumption: medium

[edit] Mode 7

Alt text
Mode 7 Example - Movie Player

Mode 7 is a video player. It plays uncompressed full screen movies at 30FPS with sound.

  • 170x114 (147x114 effective) resolution, 30fps
  • 256 colors per pixel
  • Sound at 15.7Khz
  • no scrolling
  • no sprites
  • CPU cycles left: low
  • RAM consumption: low
  • Program memory consumption: medium

Video Mode 7 Implementation Details

[edit] Mode 8

Alt text
Mode 8 Example: Bitmap Demo
  • 120x96 bitmapped mode
  • 4 colors per pixel (2 bits per pixel)
  • Global 4 color palette out of 256 colors
  • no scrolling
  • no sprites
  • CPU cycles left: high
  • RAM consumption: medium
  • Program memory consumption: very low

[edit] Mode 9

Alt text
Mode 9 Example: Uze Snakes

Video mode 9 uses tiles that are actually compiled into AVR assembly ("code tiles"). It provides the highest resolution on the Uzebox. Sub mode "80" is useful for 80x25 text display.

  • no scrolling
  • no sprites
  • CPU cycles left: high
  • RAM consumption: low
  • Program memory consumption: very high (depending on tile count)
  • Sub mode "60": 360x240, 60x28 tiles, 6x8 pixels tiles, 256 colors per pixel
  • Sub mode "80": 480x240, 80x28 tiles, 6x8 pixels tiles, 2 colors per pixel

Video Mode 9 Implementation Details

[edit] Mode 10

Mode 10 Example: MegaSokoban
Mode 10 Example: MegaSokoban
  • Based on Mode 5, but using 12x16 pixel tiles to save RAM
  • 192x192 resolution, 12x16 pixels tiles, 16x12 vram (with black border)
  • 8 bit vram array, each entry is a index to a tile table (maximum 256 unique tiles on screen)
  • no scrolling
  • no sprites
  • CPU cycles left: high
  • RAM consumption: very low (around 3KB free)
  • Program memory consumption: very low (depending on tile count - 192B per tile)

[edit] Mode 11

NOTE: This mode is a current work-in-progress.

Palette video mode 3 / Flash/RAM saver video mode 3 / Platformer video mode 3

  • 240x224 resolution, flexible 16x4/8x8 pixel tiles, up to 32x32 vram
  • Palette support for 16x4 tile lines, either 16 colors without or 136 colors with additional restrictions.
  • 8 bit vram array, each entry is an index into a 256 tiles table
  • Up to 4 different tilesets, one selectable for each 8x8/each two 16x4 pixel lines.
  • full screen scrolling
  • 1 scrolling main section and 1 static overlay section for scores, etc.
  • configurable number of sprites using 'ramtiles', sprites can be flipped on the X axis and can be overlaid on other sprites. With the 4K RAM & CPU limit, about 20 sprites can be displayed at once. Aggregated sprites will allow a bigger total sprites count to to the tiles overlapping required when blitting sprites which position are not multiples of 16|4 or 8|8. (see note below about MAX_SPRITES)
  • CPU cycles left: lowest
  • RAM consumption: higher than video mode 3 with direct video sprites, slightly more than half of video mode 3 if sprites are in palette video, too.
  • Program memory consumption: low

[edit] See also

[edit] Mode 12

Alt text
Mode 12 Example: Uze8

"Chip 8" mode.

  • Bitmappep mode: 1bpp
  • Submode 0: 64x32
  • Submode 1: 128x64

[edit] Mode 13 WIP

There is currently a work in progress for mode 13 paletted mode. It will be quite similar to video mode 3:

  • 8x8 tiles for flash and ram tiles, 32 bytes each in size
  • full screen scrolling
  • screen overlay
  • global palette of either 8 or 15 colours

Video Mode 13 Implementation Details

[edit] Mode 74 WIP

Mode 74 example
Mode 74 Example: Sprite engine demo

This is a work in progress, mostly completed paletted (4 bits per pixel) mode at 7 cycles per pixel (1,5:1 pixel aspect ratio, slightly wider pixels than in Video mode 3).

  • Up to 192 pixels width (7 cycles per pixel; 24 tiles at 8 pixels per tile)
  • X and Y scrolling
  • Arbitrary (vertical) split screen regions
  • 8x8 pixel tiles
  • Normally 192 4 bits per pixel ROM tiles + (up to) 64 4 bits per pixel RAM tiles
  • Each tile row's VRAM address and display mode is individually configurable
  • Further row modes include 1 bit per pixel and 2 bit per pixel modes ("Multicolor")
  • Sprite engine supports X and Y flipping, background priority (by masks) and recoloring
  • The 16 color palette supports palette effects
  • Loading random access data from SD card is possible during spare HSync time
  • CPU cycles left: Depends on number of sprites used, may need lower vertical sizes for utilizing all RAM tiles
  • RAM consumption: A 256 byte buffer is required for the palette, a RAM tile takes 32 bytes (half of Mode 3's respective consumption)
  • Program memory consumption: Low to medium depending on required features (however ROM tiles for this mode are smaller than for Mode 3)

Mode 74 Quickstart, a short guide on how to start working with this video mode.

[edit] Additional Information

How Video Modes Work

Personal tools