{
 "chunk": "boot_titleColorRam9800_9800",
 "unit": "boot/titleColorRam9800",
 "unitLabels": {
  "boot/titleColorRam9800": {
   "9800": "titleColorRam",
   "9810": "titleColorRow00Cell16",
   "985E": "titleColorRow02Cell14",
   "987E": "titleColorRow03Cell06",
   "9BE8": "titleColorRamPadding"
  }
 },
 "notes": {
  "9800": {
   "unit": "boot/titleColorRam9800",
   "line": "row 0 cells 0-15 - open sky, drawn with %11 pixels so $0E is the sky itself; the yellow DAN BUNTEN'S letters are %01 pairs",
   "block": [
    "titleColorRam - colour RAM of the title picture: 1000 bytes = 25 screen rows of 40 cells, one",
    "screen row per line below (rows 0, 2 and 3 are split where a foreign label lands inside them).",
    "Source: the first 1000 bytes of the directory file 'load' ($9800-$C3FF, 45 blocks on tracks",
    "19-21), KERNAL-loaded by eaLoadGame ($02B8) before it calls the boot loader at $C000.",
    "The one piece of code that reads it is bootShowTitlePicture: the self-modifying loop at $C271",
    "copies four whole pages, $9800-$9BFF to $D800-$DBFF, and the code after it sets $D016 = $D8,",
    "$D018 = $38 and $D011 = $3B - multicolour bitmap, VIC bank 2, video matrix $8C00 (filled from",
    "titleScreenRam $9C00) and bitmap $A000 (titleBitmapA000).",
    "In multicolour bitmap mode the low nibble of a colour-RAM byte is the colour of every %11 pixel",
    "pair in that 4x8-pixel cell; %01 and %10 take the high and the low nibble of the $8C00 byte and",
    "%00 takes the background $D021, which bootMain set to black at $C14E. The high nibble is 0 in",
    "all 1000 bytes (the VIC ignores it anyway), so the values run $01-$0F.",
    "Every one of the 1000 cells contains at least one %11 pixel pair (checked against the bitmap at",
    "$A000), so there is no don't-care byte in this table - each one is visible on screen. The artist",
    "drew the big flat areas in %11, which is why the sky ($0E), the field ($05), the smoke greys and",
    "the yellow copyright line ($07) are all coloured from here; the DAN BUNTEN'S line at the top is",
    "the one large feature that is not - it is %01 pixels taking the high nibble of the $8C00 byte.",
    "Colours used, by frequency: $0E light blue 236 (sky), $02 red 182 (the MODEM WARS logo), $0B dark",
    "grey 162, $0F light grey 113, $0C mid grey 55 (the walker, the smoke), $05 green 105 (the field),",
    "$01 white 83, $07 yellow 37 (the two text lines), $09 brown 21 (hills and debris), $08 orange 5,",
    "$0A light red 1. Black, blue, cyan, purple and light green never occur.",
    "The block is dead the moment the loader pulls track 28 s0-12 over $9300-$9FFF; the picture stays",
    "on screen because the VIC is reading the copies in $D800 and $8C00 and nothing touches the bitmap",
    "at $A000 until the game starts drawing. docs/titleScreen.png is this picture decoded.",
    "At run time these same addresses belong to game/graphicsData9300 (glyph tables and the two",
    "console fonts), which is why labels from that unit appear in the middle of the rows below and why",
    "a row here may be broken in two where that unit declares a data type of its own."
   ]
  },
  "9810": {
   "unit": "boot/titleColorRam9800",
   "line": "row 0 cells 16-39 - end of the DAN BUNTEN'S line, dark red debris streak at 26, then the smoke cloud",
   "block": [
    "$9810 is not the start of anything in the title picture - it is cell 16 of screen row 0. The label",
    "is here only because the same address in the run-time image is tallDigitGlyphPairTable in",
    "game/graphicsData9300 (read by drawTallGlyph at $2BBA/$2BC5), and a label applies to every unit",
    "that covers the address. The same goes for $985E and $987E below."
   ]
  },
  "9828": {
   "unit": "boot/titleColorRam9800",
   "line": "row 1 - sky out to cell 26, smoke cloud greys 27-39"
  },
  "9850": {
   "unit": "boot/titleColorRam9800",
   "line": "row 2 cells 0-13 - top of the red MODEM WARS logo, sky showing between the letters"
  },
  "985E": {
   "unit": "boot/titleColorRam9800",
   "line": "row 2 cells 14-39 - logo continues; the smoke cloud cuts grey into it from cell 30",
   "block": [
    "Cell 14 of screen row 2. Stale label: at run time $985E is the biased base through which the",
    "chat-line editor ($C80A) indexes asciiToGlyphTable in game/graphicsData9300."
   ]
  },
  "9878": {
   "unit": "boot/titleColorRam9800",
   "line": "row 3 cells 0-5 - white muzzle flash at the left edge (cell 0) and the M of MODEM"
  },
  "987E": {
   "unit": "boot/titleColorRam9800",
   "line": "row 3 cells 6-39 - body of the logo, greys where the smoke crosses it",
   "block": [
    "Cell 6 of screen row 3. Stale label: at run time $987E is asciiToGlyphTable, read by printChar at",
    "$C02A in the $C000 text engine. XREF also lists 'from boot/fastLoaderC000: r:C02A' for this",
    "address, but $C02A in the boot loader is the 'dec ldCount' inside bootLoadSectors - that reference",
    "really belongs to the text-engine overlay, which shares the $C000 addresses with the loader."
   ]
  },
  "98A0": {
   "unit": "boot/titleColorRam9800",
   "line": "row 4 - the muzzle flash burns yellow/white over the logo at cells 1-4"
  },
  "98C8": {
   "unit": "boot/titleColorRam9800",
   "line": "row 5 - flash core: orange 1, yellow 2, white 3-4"
  },
  "98F0": {
   "unit": "boot/titleColorRam9800",
   "line": "row 6 - flash fading (yellow/white 3-6), logo, smoke greys from 26"
  },
  "9918": {
   "unit": "boot/titleColorRam9800",
   "line": "row 7 - bottom row of the logo; the walker gun barrel is the light grey pair at 7-8"
  },
  "9940": {
   "unit": "boot/titleColorRam9800",
   "line": "row 8 - sky, gun barrel (light grey/white 8-10), the walker back and the smoke column; orange 31 is the top of the fireball"
  },
  "9968": {
   "unit": "boot/titleColorRam9800",
   "line": "row 9 - barrel at 11, shoulder greys 17-23, hull 24-31, first fireball yellow/orange at 32 and 35"
  },
  "9990": {
   "unit": "boot/titleColorRam9800",
   "line": "row 10 - barrel white 11-13, cab top 14-22, hull 23-31, fireball yellow at 32/35/38 and red at 39"
  },
  "99B8": {
   "unit": "boot/titleColorRam9800",
   "line": "row 11 - barrel 10-12, cab and hull 13-30, explosion red/yellow/white 31-39"
  },
  "99E0": {
   "unit": "boot/titleColorRam9800",
   "line": "row 12 - cab and hull 10-30, explosion 32-39 with the first brown debris at 36"
  },
  "9A08": {
   "unit": "boot/titleColorRam9800",
   "line": "row 13 - the hull (greys 7-26), sky 27-31, fireball white 32-39; cell 38 ($9A2E) is the only light red byte in the picture"
  },
  "9A30": {
   "unit": "boot/titleColorRam9800",
   "line": "row 14 - hull greys 7-26, sky 27-29, explosion red/orange/white/yellow 30-39"
  },
  "9A58": {
   "unit": "boot/titleColorRam9800",
   "line": "row 15 - the second, smaller walker at the left (5-16), the hull above the legs (17-26), blast whites 30-39"
  },
  "9A80": {
   "unit": "boot/titleColorRam9800",
   "line": "row 16 - the left walker 4-16, sky 17-25 between it and the main walker leg at 26-27, blast 31-39"
  },
  "9AA8": {
   "unit": "boot/titleColorRam9800",
   "line": "row 17 - left walker greys 4-17, main walker leg 27-28, brown debris 37-38, sky elsewhere"
  },
  "9AD0": {
   "unit": "boot/titleColorRam9800",
   "line": "row 18 - legs at 3-10, 16-17 and 28-29; brown ground and debris 32-38"
  },
  "9AF8": {
   "unit": "boot/titleColorRam9800",
   "line": "row 19 - the horizon: brown hills from cell 25 on, dark grey legs, the last sky cells"
  },
  "9B20": {
   "unit": "boot/titleColorRam9800",
   "line": "row 20 - the green field starts; white/grey legs and feet, brown patches at 8, 25 and 32"
  },
  "9B48": {
   "unit": "boot/titleColorRam9800",
   "line": "row 21 - field with the walkers' legs and feet"
  },
  "9B70": {
   "unit": "boot/titleColorRam9800",
   "line": "row 22 - field and feet"
  },
  "9B98": {
   "unit": "boot/titleColorRam9800",
   "line": "row 23 - COPYRIGHT (C) 1988 OZARK-SOFTSCAPE in yellow over the green field"
  },
  "9BC0": {
   "unit": "boot/titleColorRam9800",
   "line": "row 24 - bottom half of that line, the feet, and a small dark grey 'mk' at cells 37-38 (the artist's initials?)"
  },
  "9BE8": {
   "unit": "boot/titleColorRam9800",
   "block": [
    "titleColorRamPadding - the last 24 bytes of the 1024-byte block, after the 1000 screen cells.",
    "bootShowTitlePicture copies four whole pages, so these bytes do reach colour RAM at $DBE8-$DBFF,",
    "past the 1000 cells the VIC fetches: they are copied but never displayed, and no code reads them.",
    "The pattern is an alternating $00/$FF dither. The matching 24 bytes at the end of the screen-RAM",
    "block ($9FE8) are its exact bit-complement except for one byte ($9BF4 = $FF against $9FF4 = $0B),",
    "and the sequence occurs nowhere else in the file, so this is probably the tail of a shape/mask",
    "pair left in the artist's tool when the picture was saved, not data of any kind."
   ],
   "line": "24 bytes past the last cell of the picture"
  }
 },
 "dataTypes": {
  "9800": [
   "grid",
   16,
   40
  ],
  "9810": [
   "grid",
   24,
   40
  ],
  "9828": [
   "grid",
   40,
   40
  ],
  "9850": [
   "grid",
   14,
   40
  ],
  "985E": [
   "grid",
   26,
   40
  ],
  "9878": [
   "grid",
   6,
   40
  ],
  "987E": [
   "grid",
   34,
   40
  ],
  "98A0": [
   "grid",
   40,
   40
  ],
  "98C8": [
   "grid",
   40,
   40
  ],
  "98F0": [
   "grid",
   40,
   40
  ],
  "9918": [
   "grid",
   40,
   40
  ],
  "9940": [
   "grid",
   40,
   40
  ],
  "9968": [
   "grid",
   40,
   40
  ],
  "9990": [
   "grid",
   40,
   40
  ],
  "99B8": [
   "grid",
   40,
   40
  ],
  "99E0": [
   "grid",
   40,
   40
  ],
  "9A08": [
   "grid",
   40,
   40
  ],
  "9A30": [
   "grid",
   40,
   40
  ],
  "9A58": [
   "grid",
   40,
   40
  ],
  "9A80": [
   "grid",
   40,
   40
  ],
  "9AA8": [
   "grid",
   40,
   40
  ],
  "9AD0": [
   "grid",
   40,
   40
  ],
  "9AF8": [
   "grid",
   40,
   40
  ],
  "9B20": [
   "grid",
   40,
   40
  ],
  "9B48": [
   "grid",
   40,
   40
  ],
  "9B70": [
   "grid",
   40,
   40
  ],
  "9B98": [
   "grid",
   40,
   40
  ],
  "9BC0": [
   "grid",
   40,
   40
  ],
  "9BE8": [
   "grid",
   24,
   24
  ]
 }
}
