{
  "cartridge": "cal",
  "mapper": 0,
  "prg": 32768,
  "chr": 8192,
  "mirroring": "vertical",
  "strip": {
    "x0": 8, "y0": 16, "block": 16, "cols": 15, "rows": 3,
    "white": 48, "black": 15,
    "note": "a block is white when its bit is 1; bits read MSB first left to right; the pad byte has A at bit 0; the frame counter counts NMIs since reset; a byte polled in the blanking that ends frame k is in the strip of frame k+2; parity is the XOR of screen, variant, hold, both frame bytes and pad, folded to one bit",
    "fields": [
      {"row": 0, "col": 0, "bits": 3, "name": "sync", "value": 5},
      {"row": 0, "col": 3, "bits": 3, "name": "screen"},
      {"row": 0, "col": 6, "bits": 6, "name": "variant"},
      {"row": 0, "col": 12, "bits": 1, "name": "hold"},
      {"row": 0, "col": 13, "bits": 1, "name": "parity"},
      {"row": 0, "col": 14, "bits": 1, "name": "reserved", "value": 0},
      {"row": 1, "col": 0, "bits": 3, "name": "sync", "value": 2},
      {"row": 1, "col": 3, "bits": 4, "name": "frame_11_8"},
      {"row": 1, "col": 7, "bits": 8, "name": "frame_7_0"},
      {"row": 2, "col": 0, "bits": 3, "name": "sync", "value": 6},
      {"row": 2, "col": 3, "bits": 4, "name": "frame_15_12"},
      {"row": 2, "col": 7, "bits": 8, "name": "pad"}
    ]
  },
  "screens": [
    {"id": 0, "name": "strip", "variant_frames": 240, "variants": 1, "emphasis": "0", "regions": [
    ]},
    {"id": 1, "name": "palette", "variant_frames": 60, "variants": 56, "emphasis": "variant % 8", "regions": [
      {"name": "patch0", "x": 0, "y": 64, "w": 64, "h": 80, "entries": [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0]},
      {"name": "patch1", "x": 64, "y": 64, "w": 64, "h": 80, "entries": [17, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 21, 21, 21, 21, 21, 21, 21, 21, 23, 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 27, 27, 27, 16, 16, 16, 16, 16, 16, 16, 16]},
      {"name": "patch2", "x": 128, "y": 64, "w": 64, "h": 80, "entries": [33, 33, 33, 33, 33, 33, 33, 33, 35, 35, 35, 35, 35, 35, 35, 35, 37, 37, 37, 37, 37, 37, 37, 37, 39, 39, 39, 39, 39, 39, 39, 39, 41, 41, 41, 41, 41, 41, 41, 41, 43, 43, 43, 43, 43, 43, 43, 43, 32, 32, 32, 32, 32, 32, 32, 32]},
      {"name": "patch3", "x": 192, "y": 64, "w": 64, "h": 80, "entries": [49, 49, 49, 49, 49, 49, 49, 49, 51, 51, 51, 51, 51, 51, 51, 51, 53, 53, 53, 53, 53, 53, 53, 53, 55, 55, 55, 55, 55, 55, 55, 55, 57, 57, 57, 57, 57, 57, 57, 57, 59, 59, 59, 59, 59, 59, 59, 59, 48, 48, 48, 48, 48, 48, 48, 48]},
      {"name": "patch4", "x": 0, "y": 144, "w": 64, "h": 80, "entries": [2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 15, 15, 15, 15, 15, 15, 15, 15]},
      {"name": "patch5", "x": 64, "y": 144, "w": 64, "h": 80, "entries": [18, 18, 18, 18, 18, 18, 18, 18, 20, 20, 20, 20, 20, 20, 20, 20, 22, 22, 22, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 24, 24, 26, 26, 26, 26, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29]},
      {"name": "patch6", "x": 128, "y": 144, "w": 64, "h": 80, "entries": [34, 34, 34, 34, 34, 34, 34, 34, 36, 36, 36, 36, 36, 36, 36, 36, 38, 38, 38, 38, 38, 38, 38, 38, 40, 40, 40, 40, 40, 40, 40, 40, 42, 42, 42, 42, 42, 42, 42, 42, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45]},
      {"name": "patch7", "x": 192, "y": 144, "w": 64, "h": 80, "entries": [50, 50, 50, 50, 50, 50, 50, 50, 52, 52, 52, 52, 52, 52, 52, 52, 54, 54, 54, 54, 54, 54, 54, 54, 56, 56, 56, 56, 56, 56, 56, 56, 58, 58, 58, 58, 58, 58, 58, 58, 60, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 61, 61]}
    ]},
    {"id": 2, "name": "bars", "variant_frames": 120, "variants": 8, "emphasis": "0", "regions": [
      {"name": "cell00", "x": 0, "y": 64, "w": 32, "h": 32, "entries": [1, 2, 17, 18, 33, 34, 49, 50]},
      {"name": "cell01", "x": 32, "y": 64, "w": 32, "h": 32, "entries": [2, 3, 18, 19, 34, 35, 50, 51]},
      {"name": "cell02", "x": 64, "y": 64, "w": 32, "h": 32, "entries": [3, 4, 19, 20, 35, 36, 51, 52]},
      {"name": "cell03", "x": 96, "y": 64, "w": 32, "h": 32, "entries": [4, 5, 20, 21, 36, 37, 52, 53]},
      {"name": "cell04", "x": 128, "y": 64, "w": 32, "h": 32, "entries": [5, 6, 21, 22, 37, 38, 53, 54]},
      {"name": "cell05", "x": 160, "y": 64, "w": 32, "h": 32, "entries": [6, 7, 22, 23, 38, 39, 54, 55]},
      {"name": "cell06", "x": 192, "y": 64, "w": 32, "h": 32, "entries": [7, 8, 23, 24, 39, 40, 55, 56]},
      {"name": "cell07", "x": 224, "y": 64, "w": 32, "h": 32, "entries": [8, 9, 24, 25, 40, 41, 56, 57]},
      {"name": "cell10", "x": 0, "y": 96, "w": 32, "h": 32, "entries": [9, 10, 25, 26, 41, 42, 57, 58]},
      {"name": "cell11", "x": 32, "y": 96, "w": 32, "h": 32, "entries": [10, 11, 26, 27, 42, 43, 58, 59]},
      {"name": "cell12", "x": 64, "y": 96, "w": 32, "h": 32, "entries": [11, 12, 27, 28, 43, 44, 59, 60]},
      {"name": "cell13", "x": 96, "y": 96, "w": 32, "h": 32, "entries": [null, null, null, null, null, null, null, null]},
      {"name": "cell14", "x": 128, "y": 96, "w": 32, "h": 32, "entries": [1, 2, 17, 18, 33, 34, 49, 50]},
      {"name": "cell15", "x": 160, "y": 96, "w": 32, "h": 32, "entries": [2, 3, 18, 19, 34, 35, 50, 51]},
      {"name": "cell16", "x": 192, "y": 96, "w": 32, "h": 32, "entries": [3, 4, 19, 20, 35, 36, 51, 52]},
      {"name": "cell17", "x": 224, "y": 96, "w": 32, "h": 32, "entries": [4, 5, 20, 21, 36, 37, 52, 53]},
      {"name": "cell20", "x": 0, "y": 128, "w": 32, "h": 32, "entries": [5, 6, 21, 22, 37, 38, 53, 54]},
      {"name": "cell21", "x": 32, "y": 128, "w": 32, "h": 32, "entries": [6, 7, 22, 23, 38, 39, 54, 55]},
      {"name": "cell22", "x": 64, "y": 128, "w": 32, "h": 32, "entries": [7, 8, 23, 24, 39, 40, 55, 56]},
      {"name": "cell23", "x": 96, "y": 128, "w": 32, "h": 32, "entries": [8, 9, 24, 25, 40, 41, 56, 57]},
      {"name": "cell24", "x": 128, "y": 128, "w": 32, "h": 32, "entries": [9, 10, 25, 26, 41, 42, 57, 58]},
      {"name": "cell25", "x": 160, "y": 128, "w": 32, "h": 32, "entries": [10, 11, 26, 27, 42, 43, 58, 59]},
      {"name": "cell26", "x": 192, "y": 128, "w": 32, "h": 32, "entries": [11, 12, 27, 28, 43, 44, 59, 60]},
      {"name": "cell27", "x": 224, "y": 128, "w": 32, "h": 32, "entries": [null, null, null, null, null, null, null, null]},
      {"name": "cell30", "x": 0, "y": 160, "w": 32, "h": 32, "entries": [1, 2, 17, 18, 33, 34, 49, 50]},
      {"name": "cell31", "x": 32, "y": 160, "w": 32, "h": 32, "entries": [2, 3, 18, 19, 34, 35, 50, 51]},
      {"name": "cell32", "x": 64, "y": 160, "w": 32, "h": 32, "entries": [3, 4, 19, 20, 35, 36, 51, 52]},
      {"name": "cell33", "x": 96, "y": 160, "w": 32, "h": 32, "entries": [4, 5, 20, 21, 36, 37, 52, 53]},
      {"name": "cell34", "x": 128, "y": 160, "w": 32, "h": 32, "entries": [5, 6, 21, 22, 37, 38, 53, 54]},
      {"name": "cell35", "x": 160, "y": 160, "w": 32, "h": 32, "entries": [6, 7, 22, 23, 38, 39, 54, 55]},
      {"name": "cell36", "x": 192, "y": 160, "w": 32, "h": 32, "entries": [7, 8, 23, 24, 39, 40, 55, 56]},
      {"name": "cell37", "x": 224, "y": 160, "w": 32, "h": 32, "entries": [8, 9, 24, 25, 40, 41, 56, 57]},
      {"name": "cell40", "x": 0, "y": 192, "w": 32, "h": 32, "entries": [9, 10, 25, 26, 41, 42, 57, 58]},
      {"name": "cell41", "x": 32, "y": 192, "w": 32, "h": 32, "entries": [10, 11, 26, 27, 42, 43, 58, 59]},
      {"name": "cell42", "x": 64, "y": 192, "w": 32, "h": 32, "entries": [11, 12, 27, 28, 43, 44, 59, 60]},
      {"name": "cell43", "x": 96, "y": 192, "w": 32, "h": 32, "entries": [null, null, null, null, null, null, null, null]},
      {"name": "cell44", "x": 128, "y": 192, "w": 32, "h": 32, "entries": [1, 2, 17, 18, 33, 34, 49, 50]},
      {"name": "cell45", "x": 160, "y": 192, "w": 32, "h": 32, "entries": [2, 3, 18, 19, 34, 35, 50, 51]},
      {"name": "cell46", "x": 192, "y": 192, "w": 32, "h": 32, "entries": [3, 4, 19, 20, 35, 36, 51, 52]},
      {"name": "cell47", "x": 224, "y": 192, "w": 32, "h": 32, "entries": [4, 5, 20, 21, 36, 37, 52, 53]}
    ]},
    {"id": 3, "name": "gratings", "variant_frames": 240, "variants": 1, "emphasis": "0", "regions": [
      {"name": "v1", "x": 0, "y": 64, "w": 64, "h": 64, "pattern": "v1", "pitch": 1, "axis": "x", "colour": 48},
      {"name": "v2", "x": 64, "y": 64, "w": 64, "h": 64, "pattern": "v2", "pitch": 2, "axis": "x", "colour": 48},
      {"name": "v4", "x": 128, "y": 64, "w": 64, "h": 64, "pattern": "v4", "pitch": 4, "axis": "x", "colour": 48},
      {"name": "v8", "x": 192, "y": 64, "w": 64, "h": 64, "pattern": "v8", "pitch": 8, "axis": "x", "colour": 48},
      {"name": "h1", "x": 0, "y": 128, "w": 64, "h": 64, "pattern": "h1", "pitch": 1, "axis": "y", "colour": 48},
      {"name": "h2", "x": 64, "y": 128, "w": 64, "h": 64, "pattern": "h2", "pitch": 2, "axis": "y", "colour": 48},
      {"name": "h4", "x": 128, "y": 128, "w": 64, "h": 64, "pattern": "h4", "pitch": 4, "axis": "y", "colour": 48},
      {"name": "h8", "x": 192, "y": 128, "w": 64, "h": 64, "pattern": "h8", "pitch": 8, "axis": "y", "colour": 48},
      {"name": "chk1", "x": 0, "y": 192, "w": 128, "h": 48, "pattern": "chk1", "pitch": 1, "axis": "xy", "colour": 48},
      {"name": "chk2", "x": 128, "y": 192, "w": 128, "h": 48, "pattern": "chk2", "pitch": 2, "axis": "xy", "colour": 48}
    ]},
    {"id": 4, "name": "edges", "variant_frames": 240, "variants": 1, "emphasis": "0", "regions": [
      {"name": "luma0", "x": 0, "y": 64, "w": 64, "h": 80, "entries": [null]},
      {"name": "chroma0", "x": 0, "y": 144, "w": 64, "h": 80, "entries": [22]},
      {"name": "luma1", "x": 64, "y": 64, "w": 64, "h": 80, "entries": [48]},
      {"name": "chroma1", "x": 64, "y": 144, "w": 64, "h": 80, "entries": [42]},
      {"name": "luma2", "x": 128, "y": 64, "w": 64, "h": 80, "entries": [null]},
      {"name": "chroma2", "x": 128, "y": 144, "w": 64, "h": 80, "entries": [22]},
      {"name": "luma3", "x": 192, "y": 64, "w": 64, "h": 80, "entries": [48]},
      {"name": "chroma3", "x": 192, "y": 144, "w": 64, "h": 80, "entries": [42]}
    ]},
    {"id": 5, "name": "dotcrawl", "variant_frames": 240, "variants": 1, "emphasis": "0", "regions": [
      {"name": "crawl1", "x": 0, "y": 64, "w": 128, "h": 176, "pattern": "chk1", "pitch": 1, "axis": "xy", "colour": 48},
      {"name": "crawl2", "x": 128, "y": 64, "w": 128, "h": 176, "pattern": "chk2", "pitch": 2, "axis": "xy", "colour": 48}
    ]},
    {"id": 6, "name": "pad", "variant_frames": 240, "variants": 1, "emphasis": "0", "regions": [
      {"name": "field", "x": 0, "y": 64, "w": 256, "h": 160, "entries": [null]}
    ]},
    {"id": 7, "name": "geometry", "variant_frames": 240, "variants": 1, "emphasis": "0", "regions": [
    ]}
  ]
}
