{
 "schema": 1,
 "platform": "c64",
 "game": "friday-the-13th",
 "part": "intro",
 "build": "G64 disk image: a one-line loader, a title program that loads at $2900, a 29,299-byte main program at $5800, two data files at $0C00 and $E000, and a 880-byte program at $0400. One sector on the disk has a bad checksum",
 "source": "regenerator2000 live",
 "regions": {
  "exclude": [
   [
    256,
    511,
    "stack"
   ],
   [
    53248,
    57343,
    "I/O and colour RAM"
   ],
   [
    2304,
    10495,
    "not the intro's: the file TITLE2, the loader of the game, loads at $0900 after the intro has run, and the intro's snapshots hold only the memory's start-up pattern there"
   ],
   [
    1024,
    2023,
    "the KERNAL's text screen at the hand-over, showing the BASIC start-up and the LOAD \"*\",8,1 that started the disk: not the intro's"
   ],
   [
    64816,
    64847,
    "the same 32 bytes as the KERNAL ROM's table of default vectors at $FD30 ($EA31, $FE66, $FE47 ...), in the RAM beneath the ROM: not loaded by the intro"
   ]
  ],
  "extra": [
   [
    24576,
    26623,
    "character set"
   ]
  ],
  "edges": [
   0,
   256,
   512,
   1024,
   2048,
   4096,
   16384,
   32768,
   40960,
   49152,
   53248,
   57344
  ]
 },
 "blocks": [
  {
   "start": 0,
   "end": 10495,
   "type": "Undefined"
  },
  {
   "start": 10496,
   "end": 10804,
   "type": "Code"
  },
  {
   "start": 10805,
   "end": 11674,
   "type": "PETSCII Text"
  },
  {
   "start": 11675,
   "end": 11729,
   "type": "Code"
  },
  {
   "start": 11730,
   "end": 11733,
   "type": "Byte"
  },
  {
   "start": 11734,
   "end": 11739,
   "type": "PETSCII Text"
  },
  {
   "start": 11740,
   "end": 13823,
   "type": "Byte"
  },
  {
   "start": 13824,
   "end": 13974,
   "type": "Code"
  },
  {
   "start": 13975,
   "end": 34689,
   "type": "Byte"
  },
  {
   "start": 34690,
   "end": 65535,
   "type": "Undefined"
  }
 ],
 "symbols": [
  {
   "address": 1,
   "name": "zpa_01",
   "type": "ZeroPageAbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 2,
   "name": "zpa_02",
   "type": "ZeroPageAbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 3,
   "name": "zpa_03",
   "type": "ZeroPageAbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 197,
   "name": "zpa_C5",
   "type": "ZeroPageAbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 251,
   "name": "zpa_FB",
   "type": "ZeroPageAbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 252,
   "name": "zpa_FC",
   "type": "ZeroPageAbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 253,
   "name": "zpa_FD",
   "type": "ZeroPageAbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 254,
   "name": "zpa_FE",
   "type": "ZeroPageAbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 648,
   "name": "a_0288",
   "type": "AbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 2304,
   "name": "title2_start",
   "type": "Jump",
   "kind": "user"
  },
  {
   "address": 10496,
   "name": "intro_start",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 10558,
   "name": "show_title",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 10588,
   "name": "show_bitmap",
   "type": "Jump",
   "kind": "user"
  },
  {
   "address": 10633,
   "name": "show_portraits",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 10686,
   "name": "copy_pages",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 10691,
   "name": "b_29C3",
   "type": "Branch",
   "kind": "auto"
  },
  {
   "address": 10693,
   "name": "copy_dest",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 10695,
   "name": "copy_dest_page",
   "type": "AbsoluteAddress",
   "kind": "user"
  },
  {
   "address": 10708,
   "name": "show_text_screen",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 10780,
   "name": "print_story",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 10784,
   "name": "print_string",
   "type": "Jump",
   "kind": "user"
  },
  {
   "address": 10790,
   "name": "b_2A26",
   "type": "Branch",
   "kind": "auto"
  },
  {
   "address": 10804,
   "name": "r_2A34",
   "type": "Return",
   "kind": "auto"
  },
  {
   "address": 10805,
   "name": "text_licence",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 11112,
   "name": "text_story",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 11675,
   "name": "wait_key",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 11681,
   "name": "b_2DA1",
   "type": "Branch",
   "kind": "auto"
  },
  {
   "address": 11688,
   "name": "load_title2",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 11730,
   "name": "title2_name_length",
   "type": "AbsoluteAddress",
   "kind": "user"
  },
  {
   "address": 11731,
   "name": "title2_name_pointer",
   "type": "AbsoluteAddress",
   "kind": "user"
  },
  {
   "address": 11732,
   "name": "a_2DD4",
   "type": "AbsoluteAddress",
   "kind": "auto"
  },
  {
   "address": 11734,
   "name": "title2_name",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 11740,
   "name": "title_screen",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 12764,
   "name": "title_colour_ram",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 13824,
   "name": "play_scream",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 13864,
   "name": "j_3628",
   "type": "Jump",
   "kind": "auto"
  },
  {
   "address": 13868,
   "name": "j_362C",
   "type": "Jump",
   "kind": "auto"
  },
  {
   "address": 13878,
   "name": "b_3636",
   "type": "Branch",
   "kind": "auto"
  },
  {
   "address": 13884,
   "name": "j_363C",
   "type": "Jump",
   "kind": "auto"
  },
  {
   "address": 13913,
   "name": "b_3659",
   "type": "Branch",
   "kind": "auto"
  },
  {
   "address": 13918,
   "name": "b_365E",
   "type": "Branch",
   "kind": "auto"
  },
  {
   "address": 13923,
   "name": "b_3663",
   "type": "Branch",
   "kind": "auto"
  },
  {
   "address": 13931,
   "name": "scream_click",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 13952,
   "name": "scream_quiet",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 13961,
   "name": "scream_delay_6",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 13963,
   "name": "scream_delay",
   "type": "Subroutine",
   "kind": "user"
  },
  {
   "address": 13968,
   "name": "scream_delay_2",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 13971,
   "name": "scream_delay_3",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 13984,
   "name": "scream_sample",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 15008,
   "name": "scream_sample_2",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 16032,
   "name": "scream_sample_3",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 16384,
   "name": "title_bitmap",
   "type": "Field",
   "kind": "user"
  },
  {
   "address": 17408,
   "name": "title_bitmap_3",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 18432,
   "name": "title_bitmap_6",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 19456,
   "name": "title_bitmap_9",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 20480,
   "name": "title_bitmap_12",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 21504,
   "name": "title_bitmap_16",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 22528,
   "name": "title_bitmap_19",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 23552,
   "name": "title_bitmap_22",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 24384,
   "name": "portraits_bitmap",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 25408,
   "name": "portraits_bitmap_3",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 26432,
   "name": "portraits_bitmap_6",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 27456,
   "name": "portraits_bitmap_9",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 28480,
   "name": "portraits_bitmap_12",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 29504,
   "name": "portraits_bitmap_16",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 30528,
   "name": "portraits_bitmap_19",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 31552,
   "name": "portraits_bitmap_22",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 32384,
   "name": "portraits_screen",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 32768,
   "name": "portraits_screen_2",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 33408,
   "name": "portraits_colour_ram",
   "type": "UserDefined",
   "kind": "user"
  },
  {
   "address": 65466,
   "name": "KERNAL_SETLFS",
   "type": "Predefined",
   "kind": "system"
  },
  {
   "address": 65469,
   "name": "KERNAL_SETNAM",
   "type": "Predefined",
   "kind": "system"
  },
  {
   "address": 65490,
   "name": "KERNAL_CHROUT",
   "type": "Predefined",
   "kind": "system"
  },
  {
   "address": 65493,
   "name": "KERNAL_LOAD",
   "type": "Predefined",
   "kind": "system"
  }
 ],
 "comments": [
  {
   "address": 1,
   "type": "line",
   "text": "the processor port: set to $36 (BASIC out); show_text_screen clears bit 2 to read the character ROM and sets it again"
  },
  {
   "address": 2,
   "type": "line",
   "text": "zero-page byte play_scream uses for the end of the sample, low byte"
  },
  {
   "address": 3,
   "type": "line",
   "text": "the end of the sample, high byte"
  },
  {
   "address": 197,
   "type": "line",
   "text": "the KERNAL's current key, $40 when none is held; wait_key reads it"
  },
  {
   "address": 251,
   "type": "line",
   "text": "a pointer: the source of copy_pages and the text print_string prints"
  },
  {
   "address": 252,
   "type": "line",
   "text": "the pointer's high byte"
  },
  {
   "address": 253,
   "type": "line",
   "text": "the scream sample's length, low byte, read by play_scream from the sample's first two bytes"
  },
  {
   "address": 254,
   "type": "line",
   "text": "the scream sample's length, high byte"
  },
  {
   "address": 648,
   "type": "line",
   "text": "the KERNAL's screen page: set to $7C so that CHROUT prints on the screen at $7C00"
  },
  {
   "address": 2304,
   "type": "line",
   "text": "where TITLE2, the loader of the game's files, loads; the intro jumps there once it is loaded (the loader was not read)"
  },
  {
   "address": 10496,
   "type": "line",
   "text": "the introduction, entered from the loader when the file TITLE has loaded: black border and background, BASIC banked out, the screen cleared; moves the portraits picture out of the video bank to $8800 (40 pages from $5F40), shows the title picture with the scream, then the licence and the story as text, waiting for a key after each, then the portraits, and loads TITLE2 and jumps to it at $0900"
  },
  {
   "address": 10558,
   "type": "line",
   "text": "shows the title picture: copies its screen colours ($2DDC) to $7C00 and its colour RAM ($31DC) to $D800, then sets up the picture (show_bitmap)"
  },
  {
   "address": 10588,
   "type": "line",
   "text": "selects video bank 1 ($4000-$7FFF) through CIA 2, the screen at $7C00 and the bitmap at $4000 ($D018), multicolour on, bitmap mode on"
  },
  {
   "address": 10633,
   "type": "line",
   "text": "shows the five counsellors' portraits: copies the picture back from $8800 into the bitmap at $4000 (32 pages), its screen colours from $A740 to $7C00 and its colour RAM from $AB40 to $D800, sets the background to dark grey (11) and turns the bitmap on (show_bitmap)"
  },
  {
   "address": 10686,
   "type": "line",
   "text": "copies X pages from the address in $FB-$FC to the page in A, 256 bytes at a time; the copy's destination is the STA's own operand"
  },
  {
   "address": 10693,
   "type": "line",
   "text": "the STA whose high byte copy_pages writes with the destination page"
  },
  {
   "address": 10695,
   "type": "line",
   "text": "the high byte of copy_dest's operand: the destination page, written by copy_pages and counted up a page at a time"
  },
  {
   "address": 10708,
   "type": "line",
   "text": "with the I/O banked out, copies the character ROM (16 pages from $D000) to $6000, tells the KERNAL the screen is at $7C00 ($0288), points the video chip at the font, clears the screen, turns bitmap and multicolour off, and prints the licence text ($2A35)"
  },
  {
   "address": 10780,
   "type": "line",
   "text": "prints the story text at $2B68"
  },
  {
   "address": 10784,
   "type": "line",
   "text": "prints the text at Y (low) and X (high) through CHROUT until a zero byte"
  },
  {
   "address": 10805,
   "type": "line",
   "text": "the licence screen: \"FRIDAY THE 13TH\" is a trademark of Paramount Pictures Corporation, manufactured by Domark Ltd under exclusive licence, in PETSCII with colour codes, ended by a zero"
  },
  {
   "address": 11112,
   "type": "line",
   "text": "the story screen: you and nine friends at Crystal Lake holiday camp, Jason Voorhees's grotto, the bloodstained mask, JASON IS WAITING...., and BEFORE HE DISPOSES OF YOU!, ended by a zero"
  },
  {
   "address": 11675,
   "type": "line",
   "text": "waits for no key ($C5 = $40), then for a key, so that a key held from before does not count"
  },
  {
   "address": 11688,
   "type": "line",
   "text": "sets the cursor home in red, opens the file TITLE2 on device 8 with SETLFS and SETNAM, and loads it to the address it was saved from with LOAD"
  },
  {
   "address": 11730,
   "type": "line",
   "text": "length of the file name, 6"
  },
  {
   "address": 11731,
   "type": "line",
   "text": "address of the file name, $2DD6"
  },
  {
   "address": 11732,
   "type": "line",
   "text": "the file name's address, high byte"
  },
  {
   "address": 11733,
   "type": "line",
   "text": "a zero between the pointer and the name"
  },
  {
   "address": 11734,
   "type": "line",
   "text": "the file name TITLE2"
  },
  {
   "address": 11740,
   "type": "line",
   "text": "the title picture's screen colours, 1000 bytes (and 24 spare), the two colours of each 4 by 8 cell in its two nibbles, copied to $7C00"
  },
  {
   "address": 12764,
   "type": "line",
   "text": "the title picture's third colour of each cell, 1000 bytes and 24 spare, copied to colour RAM at $D800"
  },
  {
   "address": 13788,
   "type": "line",
   "text": "36 bytes in the file that nothing reads: alternating $00 and $FF, the pattern of the memory the file was saved from"
  },
  {
   "address": 13824,
   "type": "line",
   "text": "plays the scream over the title picture: a 1-bit sample from $36A0, whose first two bytes give its length ($08FE bytes); each 1 bit turns the volume up with voice 1 on (scream_click), each 0 bit turns it off"
  },
  {
   "address": 13931,
   "type": "line",
   "text": "volume 15 and a triangle on voice 1 at frequency $F313"
  },
  {
   "address": 13952,
   "type": "line",
   "text": "volume 0"
  },
  {
   "address": 13961,
   "type": "line",
   "text": "two more NOPs in front of scream_delay, a longer delay that nothing calls"
  },
  {
   "address": 13963,
   "type": "line",
   "text": "four NOPs: the delay between bits"
  },
  {
   "address": 13968,
   "type": "line",
   "text": "a delay of two NOPs that nothing calls"
  },
  {
   "address": 13971,
   "type": "line",
   "text": "a delay of three NOPs that nothing calls"
  },
  {
   "address": 13975,
   "type": "line",
   "text": "nine bytes between the delays and the sample that nothing reads"
  },
  {
   "address": 13984,
   "type": "line",
   "text": "the scream: two bytes of length ($08FE), then 1-bit samples read eight to a byte: first part"
  },
  {
   "address": 15008,
   "type": "line",
   "text": "the scream's second part"
  },
  {
   "address": 16032,
   "type": "line",
   "text": "the scream's last 256 bytes, to $3F9F"
  },
  {
   "address": 16288,
   "type": "line",
   "text": "96 bytes in the file that nothing reads: the pattern of the memory the file was saved from"
  },
  {
   "address": 16384,
   "type": "line",
   "text": "the title picture, a multicolour bitmap of 8000 bytes (FRIDAY THE 13TH over a hockey mask with a knife through it in a pool of blood, and the Domark logo): bytes 0 to 1023, character rows 0 to 3 (a row is 320 bytes, 25 rows in all)"
  },
  {
   "address": 17408,
   "type": "line",
   "text": "the title bitmap, bytes 1024 to 2047, character rows 3 to 6 (a row is 320 bytes)"
  },
  {
   "address": 18432,
   "type": "line",
   "text": "the title bitmap, bytes 2048 to 3071, character rows 6 to 9 (a row is 320 bytes)"
  },
  {
   "address": 19456,
   "type": "line",
   "text": "the title bitmap, bytes 3072 to 4095, character rows 9 to 12 (a row is 320 bytes)"
  },
  {
   "address": 20480,
   "type": "line",
   "text": "the title bitmap, bytes 4096 to 5119, character rows 12 to 15 (a row is 320 bytes)"
  },
  {
   "address": 21504,
   "type": "line",
   "text": "the title bitmap, bytes 5120 to 6143, character rows 16 to 19 (a row is 320 bytes)"
  },
  {
   "address": 22528,
   "type": "line",
   "text": "the title bitmap, bytes 6144 to 7167, character rows 19 to 22 (a row is 320 bytes)"
  },
  {
   "address": 23552,
   "type": "line",
   "text": "the title bitmap, bytes 7168 to 7999, character rows 22 to 24 (a row is 320 bytes), ending at $5F3F"
  },
  {
   "address": 24384,
   "type": "line",
   "text": "the portraits picture, a multicolour bitmap of 8000 bytes (the five counsellors with their names), loaded here and moved to $8800 by intro_start before the text screens use this bank: bytes 0 to 1023, character rows 0 to 3 (a row is 320 bytes)"
  },
  {
   "address": 25408,
   "type": "line",
   "text": "the portraits bitmap, bytes 1024 to 2047, character rows 3 to 6 (a row is 320 bytes)"
  },
  {
   "address": 26432,
   "type": "line",
   "text": "the portraits bitmap, bytes 2048 to 3071, character rows 6 to 9 (a row is 320 bytes)"
  },
  {
   "address": 27456,
   "type": "line",
   "text": "the portraits bitmap, bytes 3072 to 4095, character rows 9 to 12 (a row is 320 bytes)"
  },
  {
   "address": 28480,
   "type": "line",
   "text": "the portraits bitmap, bytes 4096 to 5119, character rows 12 to 15 (a row is 320 bytes)"
  },
  {
   "address": 29504,
   "type": "line",
   "text": "the portraits bitmap, bytes 5120 to 6143, character rows 16 to 19 (a row is 320 bytes)"
  },
  {
   "address": 30528,
   "type": "line",
   "text": "the portraits bitmap, bytes 6144 to 7167, character rows 19 to 22 (a row is 320 bytes)"
  },
  {
   "address": 31552,
   "type": "line",
   "text": "the portraits bitmap, bytes 7168 to 7999, character rows 22 to 24 (a row is 320 bytes), ending at $7E7F"
  },
  {
   "address": 32384,
   "type": "line",
   "text": "the portraits picture's screen colours, 1000 bytes and 24 spare, read from $A740 after the move"
  },
  {
   "address": 32768,
   "type": "line",
   "text": "the portraits picture's screen colours from $8000, past the memory map's edge: the last 640 bytes of portraits_screen"
  },
  {
   "address": 33408,
   "type": "line",
   "text": "the portraits picture's colour RAM, 1000 bytes and 24 spare, read from $AB40 after the move"
  },
  {
   "address": 34432,
   "type": "line",
   "text": "258 bytes at the end of the file TITLE that nothing reads: mostly the pattern of the memory the file was saved from; TITLE ends at $8781"
  }
 ]
}