Star Wars theme programmed on a Tandy Color Computer 2
The Tandy Color Computer 2 was a circa 1986 computer sold by Radio Shack. I re-acquired one in late 2015 as I felt nostalgic about the computer I started programming with back when I was 9. One January night in 2016 I sat down and wrote my first substantial BASIC code on the TRS-80 in over 25 years. I just had an itch to make it play the Star Wars theme and so that's what I did.
I used sheet music for a piano and typed the code in by hand on the Color Computer 2 and recorded the execution through a VCR connected to my modern computer. I was unsuccessful in saving my work but I included screenshots in the video and I transcribed it below if you want to check out the code.
I apologize if I have any typos in the transcription below, refer to the video for actual screenshots of the code that ran.
5 CLS
8 X$ = "**********"
10 PRINT X$X$X$"** "
15 PRINT "STAR WARS"
20 PRINT " (MAIN THEME)"
25 PRINT " "
30 PRINT "BY JOHN WILLIAMS"
35 PRINT "(C) 1977"
36 PRINT " "
40 PRINT X$X$X$"** "
50 PRINT "PROGRAMMED BY CHAD LEIGH KLUCK"
55 PRINT " JANUARY 30, 2016"
60 PRINT "ON A TANDY 64K COLOR COMPUTER 2"
200 A$ = "O3;L8;DDD"
210 B$ = "O3;L2'G'O4;L2;D"
224 C$ = "L8;O4;C;O3;B;A;O4;L2;G;L4;D"
240 D$ = "L8;O4;C;O3;B;O4;C;O3;L2;A"
250 E$ = "O3;L4;D;L8;D"
260 F$ = "O3;L4.;E;L8;E;O4;C;O3;BAG"
270 G$ = "O3;L8;GAB;L4;A;L8;E;L4;F#"
280 H$ = "XB$;XC$;XC$;XD$;"
900 PLAY "P1;P1;P1"
1000 PLAY "XA$;XH$;XE$;XH$;"
1020 PLAY "XE$;XF$;XG$;XE$;XF$;"
1030 PLAY "O4;L4;D;O3;L2;A"
1040 PLAY "XE$;XF$;XG$;"
1050 PLAY "O4;L4;D;L8;D"
1060 PLAY "L8;O4;G;F;E-;D;C"
1070 PLAY "L8;O3;B-;A;G;O4;L3;D"
1080 PLAY "XA$;XH$;XE$;XH$;"
1100 PLAY "O4;L4;D;L1.;G"
1110 FOR N = 1 TO 4
1120 PLAY "P255;O4;L8;G"
1130 NEXT N
This code is available in my GitHub respository Star Wars Theme for Color Basic.