BT CGVC0 - cr88192/bgbtech_shxemu GitHub Wiki

Possible: Simplistic Console-Graphics Video Codec

Values are encoded as little-endian 16-bit words.

  • Pixels are ordered starting from the MSB, which corresponds to the upper-left corner.
    • a00 a01 b02 b03
    • a04 a05 b06 b07
    • c08 c09 d10 d11
    • c12 c13 d14 d15
Notation:
  • XXXX: Depicts a 16-bit word
  • xXXX: Depicts a value from 0000..7FFF (MSB=0)
  • Xxxx: Depicts a value from 8000..FFFF (MSB=1)
  • XxXx: Depicts a value which may be 16 or 32 bits.
Color Endpoint (16):
  • xrrr-rrgg-gggb-bbbb
Color Endpoint (16/32):
  • 0rrr-rrgg-gggb-bbbb
  • 10aa-aaaa-rrrr-rrrr-gggg-gggg-bbbb-bbbb
Joint Endpoint:
  • A pair of endpoints may be encoded together as a joint endpoint in some cases.
    • Indicated as AaAa/BbBb
  • 110d-dddd-ddvv-vvvv-vuuu-uuuu-yyyy-yyyy
Partition:
  • Reuse BC7 / BPTC partition patterns.
Data:
  • Y: Pixel Data
  • A..H: Colors A..H
  • N: Number of blocks
WORD Oriented (LE):
  • 0000..7FFF: Raw Block
    • xXXX aAAA bBBB
      • 4x4x1
    • bBBB Aaaa YYYY-YYYY
      • 4x4x2
  • 1000-0000-aaaa-aaaa
    • Flat Color (Interpreted as RGB555)
  • 84XX
    • 1000-0100-nnnn-nnnn
      • Skip (1..255)
  • 85XX
    • 1000-0101-00nn-nnnn
      • Run of previous color (1..63).
    • 1000-0101-01nn-nnnn (YYYY)*n
      • Run of 4x4x1 blocks using prior colors.
    • 1000-0101-10nn-nnnn (YYYY-YYYY)*n
      • Run of 4x4x2 blocks using prior colors.
    • 1000-0101-11nn-nnnn (YYXX)*n
      • Run of 2n 2x2x2 blocks using prior colors.
  • 86XX
    • 1000-0110-000p-pppp YYYY AaAa/BbBb CcCc/DdDd
      • 4x4x1 with a partition and 2 subsets
    • 1000-0110-001p-pppp YYYY-YYYY AaAa/BbBb CcCc/DdDd
      • 4x4x2 with a partition and 2 subsets
    • 1000-0110-010p-pppp YYYY AaAa/BbBb CcCc/DdDd EeEe/FfFf
      • 4x4x1 with a partition and 3 subsets
    • 1000-0110-011p-pppp YYYY-YYYY-YYYY AaAa/BbBb CcCc/DdDd EeEe/FfFf
      • 4x4x3 with a partition and 3 subsets
  • 87XX
    • 8700 AaAa
      • Flat Color (Alternate)
    • 8701 YYYY AaAa/BbBb
      • 4x4x1 (Ext Color)
    • 8702 YYYY-YYYY AaAa/BbBb
      • 4x4x2 (Ext Color)
    • 8703 YYYY-YYYY-YYYY AaAa/BbBb
      • 4x4x3 (Ext Color)
    • 8704 YYYY AaAa/BbBb CcCc/DdDd EeEEe/FfFf GgGg/HhHh
      • 4x4x1 with 4 subsets (each 2x2 pixels)
    • 8705 YYYY-YYYY-YYYY AaAa/BbBb CcCc/DdDd EeEe/FfFf GgGg/HhHh
      • 4x4x3 with 4 subsets (each 2x2 pixels)
  • 88XX..FFFF: Flat Color (Interpreted as an RGB555 endpoint)
⚠️ **GitHub.com Fallback** ⚠️