Video Modes

From Uzebox Wiki
Revision as of 23:52, 12 March 2013 by Uze (talk | contribs) (→‎Mode 1)
Jump to navigation Jump to search

The Uzebox currently supports 9 video modes (as of v3.1).

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

See also

Usage and implementation details

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)

See Also

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

See also

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

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

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

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

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

Mode 9

Alt text
Mode 9 Example: Uze Snakes
  • 360x240, tiles only, 60x28 tiles, 6x8 pixels tile, real-time code generated tile data
  • 8 bit vram array, each entry is an index into a 256 tiles table
  • 256 colors per pixel
  • no scrolling
  • no sprites
  • CPU cycles left: high
  • RAM consumption: low
  • Program memory consumption: very high (depending on tile count)

Video Mode 9 Implementation Details

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)

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

See also

Additional Information

How Video Modes Work