Display/Screens

From WSdev Wiki
Revision as of 09:54, 23 February 2025 by Asie (talk | contribs) (Created page with " A screen is a layout of tiles. Each cell in a screen controls one 8x8 tile. The display system can show two distinct screens simultaneously. It also supports hardware flipping of tiles, both horizontally and vertically. The size of each screen is fixed at 32x32 cells or 256x256 pixels, while each cell is stored as a two-byte word: <pre> Address 15 bit 8 7 bit 0 ---- ---- ---- ---- 0bbb byyy yyxx xxx. ||| |||| |||| ||| ||| |||| ||++-+++-- X coord...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

A screen is a layout of tiles. Each cell in a screen controls one 8x8 tile.

The display system can show two distinct screens simultaneously. It also supports hardware flipping of tiles, both horizontally and vertically.

The size of each screen is fixed at 32x32 cells or 256x256 pixels, while each cell is stored as a two-byte word:

       Address
15  bit  8  7  bit  0
 ---- ----  ---- ----
 0bbb byyy  yyxx xxx.
  ||| ||||  |||| |||
  ||| ||||  ||++-+++-- X coordinate (0-31)
  ||| |+++--++-------- Y coordinate (0-31)
  +++-+--------------- Base address (from I/O port)

         Data
15  bit  8  7  bit  0
 ---- ----  ---- ----
 vhbp pppt  tttt tttt
 |||| ||||  |||| ||||
 |||| |||+--++++-++++- Tile index (0-511)
 |||+-+++------------- Palette (0-15)
 ||+------------------ Tile bank (0-1) - color only
 |+------------------- Horizontal flip
 +-------------------- Vertical flip

In color modes, the tile bank selects between tiles 0-511 and 512-1023.