{ "_comment": "generated by tools/mergeSurvey.py from survey/*.json - do not edit by hand", "notes": { "02B8": { "routine": [ "eaLoadGame - Stage-1 boot stub reached through the hijacked BASIC vectors (normally IMAIN at $0302 after BASIC prints READY. following LOAD\"EA\",8,1). Sets logical file 8 / device 8 / secondary address 1, names the file \"LOAD\" (4 chars at $02EC), clears the KERNAL message flag so no SEARCHING/LOADING text appears, then KERNAL-LOADs \"load\" to its own header address $9800-$C3FF. On success it JSRs the boot loader entry at $C000 (-> bootMain $C145, which shows the title picture, installs the drive fast loader and fills $0800+ with the game) and finally JMPs to gameEntry $0800. On a LOAD error (C=1) it skips the boot loader and jumps to $0800 anyway - the original error handler that followed was patched away (see $02D8).", "In: none (entered by JMP via the BASIC vector table, BASIC stack in place); reads filename at $02EC", "Out: never returns; zp $9D (MSGFLG) = 0; memory $9800-$C3FF loaded; then $C000 boot path and JMP $0800" ], "unit": "boot/eaBootFile" }, "02DA": { "routine": [ "deadLoadErrorRetry - Unreachable remnant of the original load-error handler. Decodes as LDA #$12 / STA $0401 / STA $0402 / STA $0404 / LDA #$0F / STA $0403 / BNE $02B8, i.e. writes screen codes 'R','R','O','R' into the top-left screen row (the preceding LDA #$05 / STA $0400 = 'E' was overwritten by the JSR $C000 + JMP $0800 patch, leaving the orphaned operand bytes $00,$04 at $02D8-$02D9) and then loops back to retry the whole load. The BCS at $02D0 originally landed here; in this build it lands on JMP $0800 instead.", "In: none", "Out: would write screen RAM $0400-$0404 and branch to $02B8; never executed in this build", "(confidence: medium)" ], "unit": "boot/eaBootFile" }, "02A8": { "unit": "boot/eaBootFile", "block": [ "strayBasicStub: unknown, 16 bytes. Tokenised BASIC program text: link $080D, line 10, token $93 LOAD, \"EA\",8,1, $00, then $00,$00 end-of-program. Formatted as if it lived at $0801 (the link only matches a 12-byte line, e.g. LOAD\"EA\",8 without ,1, so it was probably edited by hand). Never executed - it merely pads the file so that the vector table lands on $0300. The seed note places the line at $02AA; it really begins at $02A8 with its link word." ] }, "02D8": { "unit": "boot/eaBootFile", "block": [ "leftoverErrorHandler: unknown, 20 bytes. $02D8-$02D9 = orphaned operand ($0400) of an overwritten STA $0400; $02DA-$02EB = valid but unreachable 6502 code that writes 'ERROR' screen codes to $0400-$0404 and BNEs back to $02B8 (see routine deadLoadErrorRetry)." ] }, "02EC": { "unit": "boot/eaBootFile", "block": [ "eaFileName: text, 4 bytes. \"LOAD\" - PETSCII name of the 45-block second-stage file passed to SETNAM (length 4)." ] }, "02F0": { "unit": "boot/eaBootFile", "block": [ "fileNamePadding: unknown, 16 bytes. \"00\" ($30,$30) followed by 14 zero bytes; probably the tail of a longer name from the mastering template (e.g. LOAD00) plus padding up to the vector table. Unused." ] }, "0300": { "unit": "boot/eaBootFile", "block": [ "basicVectorHijack: wordTable, 12 bytes. Six little-endian words, all $02B8, overwriting the BASIC vectors IERROR $0300, IMAIN $0302, ICRNCH $0304, IQPLOP $0306, IGONE $0308, IEVAL $030A. Whichever path BASIC takes after the LOAD (READY main loop, an error, tokenising, listing, executing, evaluating) ends up in eaLoadGame. The table extends to $030B, 4 bytes past the nominal chunk end, but is fully contained in lines 19-55 of the file." ] } } }