{"schema":1,"platform":"c64","game":"gunship","part":"loader","title":"Gunship","build":"original disk, Rapidlok V6, PAL, C64 Preservation Project gunship_s1/s2[microprose_1985](rl6)(pal)","symbols_sha256":"f045b7e35d7f87c14a3aced6949112bda39bc6f011d05e651e7b0681392ead6f","snapshot":{"file":"work/play-loading.vsf","sha256":"10b99ca38dd675ace96e8fd52a064a6d29c21a3c9b0f77b9248434dfb33220ee"},"index":[{"a":2049,"n":"basic_6_list_guard","k":"routine","len":12,"c":true},{"a":2061,"n":"line_1_setup","k":"routine","len":144,"c":true},{"a":2205,"n":"line_10_move","k":"routine","len":74,"c":true},{"a":2279,"n":"line_900_tables","k":"routine","len":434,"c":true},{"a":2713,"n":"line_940_level_row","k":"routine","len":75,"c":true},{"a":2788,"n":"line_960_level_data","k":"routine","len":431,"c":true},{"a":3219,"n":"line_9000_load","k":"routine","len":76,"c":true},{"a":3295,"n":"line_14000_load_flight","k":"routine","len":520,"c":true},{"a":3815,"n":"line_19000_constants","k":"routine","len":165,"c":true},{"a":3980,"n":"line_19520_setnam","k":"routine","len":136,"c":true}],"records":[{"a":0,"t":"gap","n":2049},{"a":2049,"l":"basic_6_list_guard","c":"Line 0: REM, five DEL characters and a shifted L. LIST prints a REM's bytes as they are, so the DELs rub out the \"0 REM\" it has just printed, and the shifted L, a byte with no keyword, stops LIST with ?SYNTAX ERROR before the next line. Five of the game's six BASIC programs start so; B, the debriefing, does not.","t":"text","b":[13,8,0,0,143,20,20,20,20,20,204,0],"d":"0 REM{del}{del}{del}{del}{del}L","enc":"basic"},{"a":2061,"l":"line_1_setup","c":"Line 1 switches off RESTORE (NMI vector to an RTI) and the CIA's interrupts, lowers BASIC's top to $1300 and clears the variables. Line 2 sets the constants (19000), builds the mission's tables (900), loads the flight's files (14000), then lines 3-5 print LOAD \"g2\",8,1 on the screen, put a RETURN in the keyboard buffer and end with NEW, so BASIC loads G2 itself.","t":"text","b":[53,8,1,0,151,55,57,50,44,49,57,51,58,151,53,54,51,51,51,44,49,50,55,58,151,53,50,44,49,57,58,151,53,54,44,49,57,58,156,0],"d":"1 POKE792,193:POKE56333,127:POKE52,19:POKE56,19:CLR","enc":"basic"},{"a":2101,"t":"text","b":[84,8,2,0,141,49,57,48,48,48,58,141,57,48,48,58,141,49,52,48,48,48,58,70,178,51,51,48,50,52,0],"d":"2 GOSUB19000:GOSUB900:GOSUB14000:F=33024","enc":"basic"},{"a":2132,"t":"text","b":[125,8,3,0,153,32,34,147,17,17,76,79,65,68,32,34,59,199,40,51,52,41,59,34,71,50,34,59,199,40,51,52,41,59,34,44,56,44,49,34,0],"d":"3 PRINT \"{clr}{down}{down}load \";CHR$(34);\"g2\";CHR$(34);\",8,1\"","enc":"basic"},{"a":2173,"t":"text","b":[144,8,4,0,151,54,51,49,44,49,51,58,151,49,57,56,44,49,0],"d":"4 POKE631,13:POKE198,1","enc":"basic"},{"a":2192,"t":"text","b":[157,8,5,0,153,32,34,19,34,59,58,162,0],"d":"5 PRINT \"{home}\";:NEW","enc":"basic"},{"a":2205,"l":"line_10_move","c":"Lines 10-11: copies L pages from page F to page T through all of RAM (move_ram), F, T and L being page numbers that may carry a fraction for an offset inside the page.","t":"text","b":[215,8,10,0,151,65,48,44,165,76,66,40,70,172,75,80,41,58,151,65,49,44,70,58,151,65,50,44,165,76,66,40,84,172,75,80,41,58,151,65,51,44,84,58,151,65,52,44,165,76,66,40,76,172,75,80,41,0],"d":"10 POKEA0,FNLB(F*KP):POKEA1,F:POKEA2,FNLB(T*KP):POKEA3,T:POKEA4,FNLB(L*KP)","enc":"basic"},{"a":2263,"t":"text","b":[231,8,11,0,151,65,53,44,76,58,158,77,54,58,142,0],"d":"11 POKEA5,L:SYSM6:RETURN","enc":"basic"},{"a":2279,"l":"line_900_tables","c":"Lines 900-949: the mission's tables for the flight. MP$ becomes the theatre's two letters (tn, se, ca, me, we) from $035E, the theatre number the front end left in the cassette buffer. Sixty-four values from DATA go to $5398-$53D7. The two mission targets' twelve-byte records are copied from the theatre file's table at $9000 (index from $035C and $035D) to $53E0 and $53EC, and one more value from $909C to $53FB.","t":"text","b":[255,8,132,3,140,58,79,68,178,50,49,52,54,52,58,68,84,178,79,68,171,54,52,0],"d":"900 RESTORE:OD=21464:DT=OD-64","enc":"basic"},{"a":2303,"t":"text","b":[31,9,137,3,129,73,178,48,164,52,58,135,70,36,58,139,73,178,194,40,56,54,50,41,167,77,80,36,178,70,36,0],"d":"905 FORI=0TO4:READF$:IFI=PEEK(862)THENMP$=F$","enc":"basic"},{"a":2335,"t":"text","b":[54,9,138,3,130,73,58,131,84,78,44,83,69,44,67,65,44,77,69,44,87,69,0],"d":"906 NEXTI:DATAtn,se,ca,me,we","enc":"basic"},{"a":2358,"t":"text","b":[81,9,142,3,129,73,178,68,84,164,68,84,170,54,51,58,135,90,58,151,73,44,90,58,130,73,0],"d":"910 FORI=DTTODT+63:READZ:POKEI,Z:NEXTI","enc":"basic"},{"a":2385,"t":"text","b":[139,9,152,3,131,32,55,54,44,54,50,44,55,54,44,57,48,44,57,48,44,54,50,44,49,57,52,44,49,55,56,44,49,55,56,44,49,55,56,44,49,57,52,44,49,57,52,44,48,44,49,49,44,49,53,44,49,0],"d":"920 DATA 76,62,76,90,90,62,194,178,178,178,194,194,0,11,15,1","enc":"basic"},{"a":2443,"t":"text","b":[189,9,153,3,131,32,49,44,49,57,44,49,57,44,49,54,44,56,55,44,56,50,44,48,44,49,57,44,32,49,57,44,50,48,44,56,50,44,49,55,44,48,44,49,54,44,48,44,48,0],"d":"921 DATA 1,19,19,16,87,82,0,19, 19,20,82,17,0,16,0,0","enc":"basic"},{"a":2493,"t":"text","b":[232,9,154,3,131,32,48,44,49,51,44,55,44,56,44,50,44,49,48,44,49,44,49,50,44,32,52,44,57,44,54,44,53,44,51,44,49,49,44,48,44,48,0],"d":"922 DATA 0,13,7,8,2,10,1,12, 4,9,6,5,3,11,0,0","enc":"basic"},{"a":2536,"t":"text","b":[23,10,155,3,131,32,55,44,55,44,49,48,44,49,48,44,55,44,49,48,44,49,48,44,49,48,44,32,55,44,55,44,49,48,44,49,48,44,55,44,49,48,44,48,44,48,0],"d":"923 DATA 7,7,10,10,7,10,10,10, 7,7,10,10,7,10,0,0","enc":"basic"},{"a":2583,"t":"text","b":[54,10,162,3,77,83,178,49,52,52,172,75,80,58,151,79,68,170,51,53,44,194,40,77,83,170,49,53,54,41,0],"d":"930 MS=144*KP:POKEOD+35,PEEK(MS+156)","enc":"basic"},{"a":2614,"t":"text","b":[103,10,163,3,90,178,194,40,56,54,48,41,58,65,178,77,83,170,90,172,49,50,58,129,73,178,48,164,49,49,58,151,79,68,170,56,170,73,44,194,40,65,170,73,41,58,130,73,0],"d":"931 Z=PEEK(860):A=MS+Z*12:FORI=0TO11:POKEOD+8+I,PEEK(A+I):NEXTI","enc":"basic"},{"a":2663,"t":"text","b":[153,10,164,3,90,178,194,40,56,54,49,41,58,65,178,77,83,170,90,172,49,50,58,129,73,178,48,164,49,49,58,151,79,68,170,50,48,170,73,44,194,40,65,170,73,41,58,130,73,0],"d":"932 Z=PEEK(861):A=MS+Z*12:FORI=0TO11:POKEOD+20+I,PEEK(A+I):NEXTI","enc":"basic"},{"a":2713,"l":"line_940_level_row","c":"Lines 940-949: picks one of the twelve rows of ten values below, by theatre and enemy level (theatre*3 + $0340 - 3), and copies it to $53A9-$53B2, over the defaults line 910 put there.","t":"text","b":[177,10,172,3,65,178,194,40,56,54,50,41,172,51,170,194,40,56,51,50,41,171,51,0],"d":"940 A=PEEK(862)*3+PEEK(832)-3","enc":"basic"},{"a":2737,"t":"text","b":[222,10,177,3,139,65,177,48,167,129,74,178,49,164,65,58,129,73,178,68,84,170,49,55,164,68,84,170,50,54,58,135,90,58,151,73,44,90,58,130,73,58,130,74,0],"d":"945 IFA>0THENFORJ=1TOA:FORI=DT+17TODT+26:READZ:POKEI,Z:NEXTI:NEXTJ","enc":"basic"},{"a":2782,"t":"text","b":[228,10,181,3,142,0],"d":"949 RETURN","enc":"basic"},{"a":2788,"l":"line_960_level_data","c":"Lines 960-977: twelve rows of ten values, one row for each theatre from Southeast Asia to Western Europe and each of its three enemy levels. Training keeps the defaults of lines 920-923.","t":"text","b":[8,11,192,3,131,32,49,57,44,49,54,44,49,54,44,56,54,44,49,55,44,48,44,49,54,44,32,49,54,44,49,57,44,56,50,0],"d":"960 DATA 19,16,16,86,17,0,16, 16,19,82","enc":"basic"},{"a":2824,"t":"text","b":[44,11,193,3,131,32,49,57,44,49,54,44,49,54,44,56,54,44,49,55,44,48,44,49,54,44,32,49,54,44,49,57,44,56,50,0],"d":"961 DATA 19,16,16,86,17,0,16, 16,19,82","enc":"basic"},{"a":2860,"t":"text","b":[80,11,194,3,131,32,49,57,44,49,57,44,49,54,44,56,54,44,56,50,44,48,44,49,57,44,32,49,54,44,49,57,44,56,50,0],"d":"962 DATA 19,19,16,86,82,0,19, 16,19,82","enc":"basic"},{"a":2896,"t":"text","b":[115,11,197,3,131,32,49,57,44,48,44,49,54,44,56,54,44,49,55,44,48,44,49,57,44,32,49,57,44,49,57,44,56,50,0],"d":"965 DATA 19,0,16,86,17,0,19, 19,19,82","enc":"basic"},{"a":2931,"t":"text","b":[151,11,198,3,131,32,49,57,44,49,57,44,49,54,44,56,54,44,56,50,44,48,44,49,57,44,32,49,57,44,49,57,44,56,50,0],"d":"966 DATA 19,19,16,86,82,0,19, 19,19,82","enc":"basic"},{"a":2967,"t":"text","b":[187,11,199,3,131,32,49,57,44,49,57,44,49,54,44,56,55,44,56,50,44,48,44,50,48,44,32,49,57,44,50,48,44,56,50,0],"d":"967 DATA 19,19,16,87,82,0,20, 19,20,82","enc":"basic"},{"a":3003,"t":"text","b":[223,11,202,3,131,32,49,57,44,49,57,44,49,54,44,56,54,44,56,50,44,48,44,49,57,44,32,49,57,44,49,57,44,49,55,0],"d":"970 DATA 19,19,16,86,82,0,19, 19,19,17","enc":"basic"},{"a":3039,"t":"text","b":[3,12,203,3,131,32,49,57,44,49,57,44,49,54,44,56,54,44,56,50,44,48,44,49,57,44,32,49,57,44,49,57,44,56,50,0],"d":"971 DATA 19,19,16,86,82,0,19, 19,19,82","enc":"basic"},{"a":3075,"t":"text","b":[39,12,204,3,131,32,49,57,44,49,57,44,49,54,44,56,55,44,56,50,44,48,44,49,57,44,32,49,57,44,50,48,44,56,50,0],"d":"972 DATA 19,19,16,87,82,0,19, 19,20,82","enc":"basic"},{"a":3111,"t":"text","b":[75,12,207,3,131,32,49,57,44,49,57,44,49,54,44,56,54,44,56,50,44,48,44,49,57,44,32,49,57,44,49,57,44,56,50,0],"d":"975 DATA 19,19,16,86,82,0,19, 19,19,82","enc":"basic"},{"a":3147,"t":"text","b":[111,12,208,3,131,32,49,57,44,49,57,44,49,54,44,56,55,44,56,50,44,48,44,49,57,44,32,49,57,44,50,48,44,56,50,0],"d":"976 DATA 19,19,16,87,82,0,19, 19,20,82","enc":"basic"},{"a":3183,"t":"text","b":[147,12,209,3,131,32,50,48,44,50,48,44,49,55,44,56,55,44,56,50,44,48,44,50,48,44,32,49,57,44,56,53,44,56,50,0],"d":"977 DATA 20,20,17,87,82,0,20, 19,85,82","enc":"basic"},{"a":3219,"l":"line_9000_load","c":"Lines 9000-9002: loads the file named F$ with the KERNAL's LOAD, through call (SETLFS and SETNAM at 19520), and tries again until the status says it worked.","t":"text","b":[194,12,40,35,141,49,57,53,50,48,58,151,65,48,44,48,58,151,65,52,44,50,49,51,58,151,65,53,44,50,53,53,58,158,75,69,82,58,151,55,57,50,44,49,57,51,0],"d":"9000 GOSUB19520:POKEA0,0:POKEA4,213:POKEA5,255:SYSKER:POKE792,193","enc":"basic"},{"a":3266,"t":"text","b":[217,12,41,35,139,40,83,84,32,175,49,57,49,41,179,177,48,167,57,48,48,48,0],"d":"9001 IF(ST AND191)<>0THEN9000","enc":"basic"},{"a":3289,"t":"text","b":[223,12,42,35,142,0],"d":"9002 RETURN","enc":"basic"},{"a":3295,"l":"line_14000_load_flight","c":"Lines 14000-14095: first copies eight pages from $A800 to $C800, then loads the flight's files in turn and moves each piece where the flight wants it. cp, then its pieces to $4000, $D040, $F040, $7C00, $EE08 and $6000; ch, then its pieces to $E300, $5100 (half a page more at night) and $E200; the theatre's terrain w3.<theatre> (Western Europe's for training), with a page to $1A86; m, the engine; and m.<theatre><n>, n being 4 minus the enemy level, which line 14095 loads last.","t":"text","b":[28,13,176,54,70,178,49,54,56,58,84,178,50,48,48,58,76,178,56,58,141,49,48,58,90,178,50,48,49,172,75,80,170,52,56,58,129,73,178,48,164,55,58,151,90,170,73,170,52,56,44,194,40,90,170,73,41,58,130,73,0],"d":"14000 F=168:T=200:L=8:GOSUB10:Z=201*KP+48:FORI=0TO7:POKEZ+I+48,PEEK(Z+I):NEXTI","enc":"basic"},{"a":3356,"t":"text","b":[88,13,181,54,70,36,178,34,67,80,34,58,141,57,48,48,48,58,70,178,49,53,54,58,84,178,54,52,58,76,178,52,58,141,49,48,58,70,178,49,55,54,46,50,53,58,84,178,50,48,56,46,50,53,58,76,178,49,53,0],"d":"14005 F$=\"cp\":GOSUB9000:F=156:T=64:L=4:GOSUB10:F=176.25:T=208.25:L=15","enc":"basic"},{"a":3416,"t":"text","b":[134,13,189,54,141,49,48,58,84,178,50,52,48,46,50,53,58,141,49,48,58,70,178,49,53,50,58,84,178,49,50,52,58,76,178,50,170,56,173,75,80,58,141,49,48,0],"d":"14013 GOSUB10:T=240.25:GOSUB10:F=152:T=124:L=2+8/KP:GOSUB10","enc":"basic"},{"a":3462,"t":"text","b":[195,13,190,54,70,178,49,53,52,170,56,173,75,80,58,84,178,50,51,56,170,56,173,75,80,58,76,178,49,46,56,55,53,58,141,49,48,58,70,178,49,54,48,58,84,178,57,54,58,76,178,49,54,46,50,53,58,141,49,48,0],"d":"14014 F=154+8/KP:T=238+8/KP:L=1.875:GOSUB10:F=160:T=96:L=16.25:GOSUB10","enc":"basic"},{"a":3523,"t":"text","b":[236,13,194,54,151,65,48,44,48,58,151,65,50,44,48,58,151,65,51,44,50,52,48,58,151,65,52,44,54,51,58,151,65,53,44,48,58,158,83,66,0],"d":"14018 POKEA0,0:POKEA2,0:POKEA3,240:POKEA4,63:POKEA5,0:SYSSB","enc":"basic"},{"a":3564,"t":"text","b":[36,14,197,54,70,36,178,34,67,72,34,58,141,57,48,48,48,58,70,178,49,52,53,58,84,178,50,50,55,58,76,178,49,58,141,49,48,58,76,178,50,46,53,58,139,194,40,57,52,52,41,167,76,178,51,0],"d":"14021 F$=\"ch\":GOSUB9000:F=145:T=227:L=1:GOSUB10:L=2.5:IFPEEK(944)THENL=3","enc":"basic"},{"a":3620,"t":"text","b":[75,14,198,54,70,178,49,52,56,58,84,178,56,49,58,141,49,48,58,70,178,49,52,55,58,84,178,50,50,54,58,76,178,49,58,141,49,48,0],"d":"14022 F=148:T=81:GOSUB10:F=147:T=226:L=1:GOSUB10","enc":"basic"},{"a":3659,"t":"text","b":[122,14,199,54,70,36,178,34,87,51,46,34,170,77,80,36,58,139,77,80,36,178,34,84,78,34,167,70,36,178,34,87,51,46,87,69,34,58,151,79,68,170,50,48,44,48,0],"d":"14023 F$=\"w3.\"+MP$:IFMP$=\"tn\"THENF$=\"w3.we\":POKEOD+20,0","enc":"basic"},{"a":3706,"t":"text","b":[169,14,200,54,141,57,48,48,48,58,70,178,49,52,54,58,84,178,54,55,57,48,173,75,80,58,76,178,49,58,141,49,48,58,70,36,178,34,77,34,58,141,57,48,48,48,0],"d":"14024 GOSUB9000:F=146:T=6790/KP:L=1:GOSUB10:F$=\"m\":GOSUB9000","enc":"basic"},{"a":3753,"t":"text","b":[221,14,10,55,70,36,178,34,77,46,34,170,77,80,36,58,139,77,80,36,179,177,34,84,78,34,167,70,36,178,70,36,170,202,40,196,40,52,171,194,40,56,50,56,170,52,41,41,44,50,41,0],"d":"14090 F$=\"m.\"+MP$:IFMP$<>\"tn\"THENF$=F$+MID$(STR$(4-PEEK(828+4)),2)","enc":"basic"},{"a":3805,"t":"text","b":[231,14,15,55,137,57,48,48,48,0],"d":"14095 GOTO9000","enc":"basic"},{"a":3815,"l":"line_19000_constants","c":"Lines 19000-19004: FNLB(X) gives the low byte of X as the copy routines take it, the helpers' addresses (SB, MV, BM, KE, S6, M6), A0-A6 = 165-171 ($A5-$AB, the helpers' registers), KP = 256.","t":"text","b":[1,15,56,74,150,165,76,66,40,88,41,178,40,88,171,51,50,55,54,56,41,175,50,53,53,0],"d":"19000 DEFFNLB(X)=(X-32768)AND255","enc":"basic"},{"a":3841,"t":"text","b":[59,15,58,74,83,66,178,51,50,56,48,57,58,77,86,178,51,50,56,51,56,58,66,77,178,51,50,56,55,49,58,75,69,178,51,50,57,49,48,58,83,54,178,51,50,55,57,55,58,77,54,178,51,50,55,56,56,0],"d":"19002 SB=32809:MV=32838:BM=32871:KE=32910:S6=32797:M6=32788","enc":"basic"},{"a":3899,"t":"text","b":[134,15,59,74,65,48,178,49,54,53,58,65,49,178,65,48,170,49,58,65,50,178,65,49,170,49,58,65,51,178,65,50,170,49,58,65,52,178,65,51,170,49,58,65,53,178,65,52,170,49,58,65,54,178,65,53,170,49,58,75,80,178,50,53,54,58,75,75,178,75,80,172,75,80,0],"d":"19003 A0=165:A1=A0+1:A2=A1+1:A3=A2+1:A4=A3+1:A5=A4+1:A6=A5+1:KP=256:KK=KP*KP","enc":"basic"},{"a":3974,"t":"text","b":[140,15,60,74,142,0],"d":"19004 RETURN","enc":"basic"},{"a":3980,"l":"line_19520_setnam","c":"Lines 19520-19528: puts the file name in memory at 1006 ($03EE), then calls the KERNAL's SETLFS (device 8, secondary address 1) and SETNAM through call.","t":"text","b":[182,15,64,76,129,73,178,48,164,195,40,70,36,41,171,49,58,151,49,48,48,54,170,73,44,198,40,202,40,70,36,44,73,170,49,44,49,41,41,58,130,0],"d":"19520 FORI=0TOLEN(F$)-1:POKE1006+I,ASC(MID$(F$,I+1,1)):NEXT","enc":"basic"},{"a":4022,"t":"text","b":[224,15,70,76,151,65,48,44,48,58,151,65,49,44,56,58,151,65,50,44,49,58,151,65,52,44,49,56,54,58,151,65,53,44,50,53,53,58,158,75,69,0],"d":"19526 POKEA0,0:POKEA1,8:POKEA2,1:POKEA4,186:POKEA5,255:SYSKE","enc":"basic"},{"a":4064,"t":"text","b":[18,16,72,76,151,65,48,44,195,40,70,36,41,58,151,65,49,44,50,51,56,58,151,65,50,44,51,58,151,65,52,44,49,56,57,58,151,65,53,44,50,53,53,58,158,75,69,58,142,0],"d":"19528 POKEA0,LEN(F$):POKEA1,238:POKEA2,3:POKEA4,189:POKEA5,255:SYSKE:RETURN","enc":"basic"},{"a":4114,"t":"text","b":[0,0],"d":"(end of the program)","enc":"basic"},{"a":4116,"t":"gap","n":61420}]}