Home » Personal collection » Acorn ADFS disks » Electron » Music_2.ADF » SAMPLES/BACKGROUND
SAMPLES/BACKGROUND
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Electron » Music_2.ADF |
Filename: | SAMPLES/BACKGROUND |
Read OK: | ✔ |
File size: | 07EE bytes |
Load address: | FFFF1D00 |
Exec address: | FFFF8023 |
File contents
5F=1 10REM BACKGROUND TUNE PLAYER 20REM BY DARREN SMITH 30REM (C) THE MICRO USER 40 50MODE4:FOR pass=0 TO 2 STEP 2 60FOR pass=0 TO 2 STEP 2:P%=&A00 70P%=&A00:[OPT pass|:.init LDA #0 80STA &9F:LDA #14:LDX #0:JSR &FFF4 90SEI:LDA &220:STA oldvector 100LDA &221:STA oldvector+1 110LDA #event MOD 256:STA &220 120LDA #event DIV 256:STA &221 130CLI:LDA #0:LDX #5:JMP event 140.event PHA:CMP #0:BNE notevent 150TXA:PHA:CMP #5:BNE notbuffer 160TYA:PHA:.checknote LDX &9F 170LDA &900,X:CMP #&FF:BNE findlength 180LDX #0:STX &9F:.findlength 190LDA &900,X:LSR A:BCC short 200.long LDA speed:ASL A:STA sound+6 210JMP mask:.short LDA speed 220STA sound+6:.mask 230LDA &900,X:AND #&FE:STA sound+4 240.playnote:LDA #7:LDX #sound MOD 256 250LDY #sound DIV 256:JSR &FFF1 260.nextnote INC &9F:.endcode 270PLA:TAY:.notbuffer PLA:TAX 280.notevent PLA:JMP (oldvector) 290.oldvector OPT FNw(0):.speed 300OPT FNb(3):.sound OPT FNw(1) 310OPT FNw(-8):OPT FNw(0):OPT FNw(4) 320]:NEXT:loop=0:REPEAT:READ data:IF data=1000 THEN 330 ELSE ?(&900+loop)=data:loop=loop+1::UNTIL F=0 330CALL init:END 340DEFFNb(Z%):?P%=Z%:P%=P%+1:=pass 350DEFFNw(Z%):!P%=Z%:P%=P%+2:=pass 360REM TUNE DATA 370DATA 133,116,121,108,113,96,101,80,84,72,65,0,113,64,113,65,113,1,113,109 380DATA 104,112,128,104,112,128,104,112,128,104,112,129,120,112,104,96,100 390DATA 120,96,100,120,96,100,120,96,100,121,112,100,84,105,100,105,100,105 400DATA 93,88,93,88,93,84,60,64,84,100,80,84,100,112,96,100,112,133,101,104 410DATA 112,128,104,112,128,104,112,128,104,112,129,120,112,104,96,100,120 420DATA 96,100,120,96,100,120,96,100,121,112,100,84,120,72,88,121,112,104 430DATA 100,92,88,92,121,112,104,92,100,64,84,101,64,93,85,113,109,104,112 440DATA 128,104,112,128,104,112,128,104,112,129,120,120,112,104,96,100,120,96 450DATA 100,120,96,100,120,96,100,121,112,100,84,105,100,105,100,105,93,88 460DATA 93,88,93,84,60,64,84,100,80,84,100,112,96,100,112,133,101,104,112 470DATA 128,104,112,128,104,112,108,104,112,129,120,112,104,96,100,120,96 480DATA 100,120,96,100,120,96,100,121,112,100,84,120,72,88,121,112,104,100 490DATA 92,88,92,121,112,104,92,100,64,84,101,64,93,85,255,1000
F=1 � BACKGROUND TUNE PLAYER � BY DARREN SMITH � (C) THE MICRO USER ( 2�4:� pass=0 � 2 � 2 <� pass=0 � 2 � 2:P%=&A00 F#P%=&A00:[OPT pass|:.init LDA #0 P$STA &9F:LDA #14:LDX #0:JSR &FFF4 ZSEI:LDA &220:STA oldvector dLDA &221:STA oldvector+1 nLDA #event � 256:STA &220 xLDA #event � 256:STA &221 �CLI:LDA #0:LDX #5:JMP event �".event PHA:CMP #0:BNE notevent � TXA:PHA:CMP #5:BNE notbuffer �TYA:PHA:.checknote LDX &9F �&LDA &900,X:CMP #&FF:BNE findlength �LDX #0:STX &9F:.findlength �LDA &900,X:LSR A:BCC short �%.long LDA speed:ASL A:STA sound+6 �JMP mask:.short LDA speed �STA sound+6:.mask �!LDA &900,X:� #&FE:STA sound+4 �%.playnote:LDA #7:LDX #sound � 256 �LDY #sound � 256:JSR &FFF1 .nextnote INC &9F:.endcode PLA:TAY:.notbuffer PLA:TAX !.notevent PLA:JMP (oldvector) ".oldvector OPT �w(0):.speed ,OPT �b(3):.sound OPT �w(1) 6"OPT �w(-8):OPT �w(0):OPT �w(4) @Q]:�:loop=0:�:� data:� data=1000 � �DJA � ?(&900+loop)=data:loop=loop+1::� F=0 J� init:� T!ݤb(Z%):?P%=Z%:P%=P%+1:=pass ^ ݤw(Z%):!P%=Z%:P%=P%+2:=pass h� TUNE DATA rJ� 133,116,121,108,113,96,101,80,84,72,65,0,113,64,113,65,113,1,113,109 |H� 104,112,128,104,112,128,104,112,128,104,112,129,120,112,104,96,100 �I� 120,96,100,120,96,100,120,96,100,121,112,100,84,105,100,105,100,105 �I� 93,88,93,88,93,84,60,64,84,100,80,84,100,112,96,100,112,133,101,104 �H� 112,128,104,112,128,104,112,128,104,112,129,120,112,104,96,100,120 �G� 96,100,120,96,100,120,96,100,121,112,100,84,120,72,88,121,112,104 �H� 100,92,88,92,121,112,104,92,100,64,84,101,64,93,85,113,109,104,112 �K� 128,104,112,128,104,112,128,104,112,129,120,120,112,104,96,100,120,96 �H� 100,120,96,100,120,96,100,121,112,100,84,105,100,105,100,105,93,88 �G� 93,88,93,84,60,64,84,100,80,84,100,112,96,100,112,133,101,104,112 �G� 128,104,112,128,104,112,108,104,112,129,120,112,104,96,100,120,96 �H� 100,120,96,100,120,96,100,121,112,100,84,120,72,88,121,112,104,100 �=� 92,88,92,121,112,104,92,100,64,84,101,64,93,85,255,1000 �
00000000 0d 00 05 07 46 3d 31 0d 00 0a 1c f4 20 42 41 43 |....F=1..... BAC| 00000010 4b 47 52 4f 55 4e 44 20 54 55 4e 45 20 50 4c 41 |KGROUND TUNE PLA| 00000020 59 45 52 0d 00 14 15 f4 20 42 59 20 44 41 52 52 |YER..... BY DARR| 00000030 45 4e 20 53 4d 49 54 48 0d 00 1e 18 f4 20 28 43 |EN SMITH..... (C| 00000040 29 20 54 48 45 20 4d 49 43 52 4f 20 55 53 45 52 |) THE MICRO USER| 00000050 0d 00 28 05 20 0d 00 32 19 eb 34 3a e3 20 70 61 |..(. ..2..4:. pa| 00000060 73 73 3d 30 20 b8 20 32 20 88 20 32 20 20 0d 00 |ss=0 . 2 . 2 ..| 00000070 3c 1d e3 20 70 61 73 73 3d 30 20 b8 20 32 20 88 |<.. pass=0 . 2 .| 00000080 20 32 3a 50 25 3d 26 41 30 30 20 0d 00 46 23 50 | 2:P%=&A00 ..F#P| 00000090 25 3d 26 41 30 30 3a 5b 4f 50 54 20 70 61 73 73 |%=&A00:[OPT pass| 000000a0 7c 3a 2e 69 6e 69 74 20 4c 44 41 20 23 30 0d 00 ||:.init LDA #0..| 000000b0 50 24 53 54 41 20 26 39 46 3a 4c 44 41 20 23 31 |P$STA &9F:LDA #1| 000000c0 34 3a 4c 44 58 20 23 30 3a 4a 53 52 20 26 46 46 |4:LDX #0:JSR &FF| 000000d0 46 34 0d 00 5a 1e 53 45 49 3a 4c 44 41 20 26 32 |F4..Z.SEI:LDA &2| 000000e0 32 30 3a 53 54 41 20 6f 6c 64 76 65 63 74 6f 72 |20:STA oldvector| 000000f0 0d 00 64 1c 4c 44 41 20 26 32 32 31 3a 53 54 41 |..d.LDA &221:STA| 00000100 20 6f 6c 64 76 65 63 74 6f 72 2b 31 0d 00 6e 1d | oldvector+1..n.| 00000110 4c 44 41 20 23 65 76 65 6e 74 20 83 20 32 35 36 |LDA #event . 256| 00000120 3a 53 54 41 20 26 32 32 30 0d 00 78 1d 4c 44 41 |:STA &220..x.LDA| 00000130 20 23 65 76 65 6e 74 20 81 20 32 35 36 3a 53 54 | #event . 256:ST| 00000140 41 20 26 32 32 31 0d 00 82 1f 43 4c 49 3a 4c 44 |A &221....CLI:LD| 00000150 41 20 23 30 3a 4c 44 58 20 23 35 3a 4a 4d 50 20 |A #0:LDX #5:JMP | 00000160 65 76 65 6e 74 0d 00 8c 22 2e 65 76 65 6e 74 20 |event...".event | 00000170 50 48 41 3a 43 4d 50 20 23 30 3a 42 4e 45 20 6e |PHA:CMP #0:BNE n| 00000180 6f 74 65 76 65 6e 74 0d 00 96 20 54 58 41 3a 50 |otevent... TXA:P| 00000190 48 41 3a 43 4d 50 20 23 35 3a 42 4e 45 20 6e 6f |HA:CMP #5:BNE no| 000001a0 74 62 75 66 66 65 72 0d 00 a0 1e 54 59 41 3a 50 |tbuffer....TYA:P| 000001b0 48 41 3a 2e 63 68 65 63 6b 6e 6f 74 65 20 4c 44 |HA:.checknote LD| 000001c0 58 20 26 39 46 0d 00 aa 26 4c 44 41 20 26 39 30 |X &9F...&LDA &90| 000001d0 30 2c 58 3a 43 4d 50 20 23 26 46 46 3a 42 4e 45 |0,X:CMP #&FF:BNE| 000001e0 20 66 69 6e 64 6c 65 6e 67 74 68 0d 00 b4 1e 4c | findlength....L| 000001f0 44 58 20 23 30 3a 53 54 58 20 26 39 46 3a 2e 66 |DX #0:STX &9F:.f| 00000200 69 6e 64 6c 65 6e 67 74 68 0d 00 be 1e 4c 44 41 |indlength....LDA| 00000210 20 26 39 30 30 2c 58 3a 4c 53 52 20 41 3a 42 43 | &900,X:LSR A:BC| 00000220 43 20 73 68 6f 72 74 0d 00 c8 25 2e 6c 6f 6e 67 |C short...%.long| 00000230 20 4c 44 41 20 73 70 65 65 64 3a 41 53 4c 20 41 | LDA speed:ASL A| 00000240 3a 53 54 41 20 73 6f 75 6e 64 2b 36 0d 00 d2 1d |:STA sound+6....| 00000250 4a 4d 50 20 6d 61 73 6b 3a 2e 73 68 6f 72 74 20 |JMP mask:.short | 00000260 4c 44 41 20 73 70 65 65 64 0d 00 dc 15 53 54 41 |LDA speed....STA| 00000270 20 73 6f 75 6e 64 2b 36 3a 2e 6d 61 73 6b 0d 00 | sound+6:.mask..| 00000280 e6 21 4c 44 41 20 26 39 30 30 2c 58 3a 80 20 23 |.!LDA &900,X:. #| 00000290 26 46 45 3a 53 54 41 20 73 6f 75 6e 64 2b 34 0d |&FE:STA sound+4.| 000002a0 00 f0 25 2e 70 6c 61 79 6e 6f 74 65 3a 4c 44 41 |..%.playnote:LDA| 000002b0 20 23 37 3a 4c 44 58 20 23 73 6f 75 6e 64 20 83 | #7:LDX #sound .| 000002c0 20 32 35 36 0d 00 fa 1e 4c 44 59 20 23 73 6f 75 | 256....LDY #sou| 000002d0 6e 64 20 81 20 32 35 36 3a 4a 53 52 20 26 46 46 |nd . 256:JSR &FF| 000002e0 46 31 0d 01 04 1e 2e 6e 65 78 74 6e 6f 74 65 20 |F1.....nextnote | 000002f0 49 4e 43 20 26 39 46 3a 2e 65 6e 64 63 6f 64 65 |INC &9F:.endcode| 00000300 0d 01 0e 1e 50 4c 41 3a 54 41 59 3a 2e 6e 6f 74 |....PLA:TAY:.not| 00000310 62 75 66 66 65 72 20 50 4c 41 3a 54 41 58 0d 01 |buffer PLA:TAX..| 00000320 18 21 2e 6e 6f 74 65 76 65 6e 74 20 50 4c 41 3a |.!.notevent PLA:| 00000330 4a 4d 50 20 28 6f 6c 64 76 65 63 74 6f 72 29 0d |JMP (oldvector).| 00000340 01 22 1f 2e 6f 6c 64 76 65 63 74 6f 72 20 4f 50 |."..oldvector OP| 00000350 54 20 a4 77 28 30 29 3a 2e 73 70 65 65 64 0d 01 |T .w(0):.speed..| 00000360 2c 1e 4f 50 54 20 a4 62 28 33 29 3a 2e 73 6f 75 |,.OPT .b(3):.sou| 00000370 6e 64 20 4f 50 54 20 a4 77 28 31 29 0d 01 36 22 |nd OPT .w(1)..6"| 00000380 4f 50 54 20 a4 77 28 2d 38 29 3a 4f 50 54 20 a4 |OPT .w(-8):OPT .| 00000390 77 28 30 29 3a 4f 50 54 20 a4 77 28 34 29 0d 01 |w(0):OPT .w(4)..| 000003a0 40 51 5d 3a ed 3a 6c 6f 6f 70 3d 30 3a f5 3a f3 |@Q]:.:loop=0:.:.| 000003b0 20 64 61 74 61 3a e7 20 64 61 74 61 3d 31 30 30 | data:. data=100| 000003c0 30 20 8c 20 8d 44 4a 41 20 8b 20 3f 28 26 39 30 |0 . .DJA . ?(&90| 000003d0 30 2b 6c 6f 6f 70 29 3d 64 61 74 61 3a 6c 6f 6f |0+loop)=data:loo| 000003e0 70 3d 6c 6f 6f 70 2b 31 3a 3a fd 20 46 3d 30 0d |p=loop+1::. F=0.| 000003f0 01 4a 0c d6 20 69 6e 69 74 3a e0 0d 01 54 21 dd |.J.. init:...T!.| 00000400 a4 62 28 5a 25 29 3a 3f 50 25 3d 5a 25 3a 50 25 |.b(Z%):?P%=Z%:P%| 00000410 3d 50 25 2b 31 3a 3d 70 61 73 73 20 0d 01 5e 20 |=P%+1:=pass ..^ | 00000420 dd a4 77 28 5a 25 29 3a 21 50 25 3d 5a 25 3a 50 |..w(Z%):!P%=Z%:P| 00000430 25 3d 50 25 2b 32 3a 3d 70 61 73 73 0d 01 68 0f |%=P%+2:=pass..h.| 00000440 f4 20 54 55 4e 45 20 44 41 54 41 0d 01 72 4a dc |. TUNE DATA..rJ.| 00000450 20 31 33 33 2c 31 31 36 2c 31 32 31 2c 31 30 38 | 133,116,121,108| 00000460 2c 31 31 33 2c 39 36 2c 31 30 31 2c 38 30 2c 38 |,113,96,101,80,8| 00000470 34 2c 37 32 2c 36 35 2c 30 2c 31 31 33 2c 36 34 |4,72,65,0,113,64| 00000480 2c 31 31 33 2c 36 35 2c 31 31 33 2c 31 2c 31 31 |,113,65,113,1,11| 00000490 33 2c 31 30 39 0d 01 7c 48 dc 20 31 30 34 2c 31 |3,109..|H. 104,1| 000004a0 31 32 2c 31 32 38 2c 31 30 34 2c 31 31 32 2c 31 |12,128,104,112,1| 000004b0 32 38 2c 31 30 34 2c 31 31 32 2c 31 32 38 2c 31 |28,104,112,128,1| 000004c0 30 34 2c 31 31 32 2c 31 32 39 2c 31 32 30 2c 31 |04,112,129,120,1| 000004d0 31 32 2c 31 30 34 2c 39 36 2c 31 30 30 0d 01 86 |12,104,96,100...| 000004e0 49 dc 20 31 32 30 2c 39 36 2c 31 30 30 2c 31 32 |I. 120,96,100,12| 000004f0 30 2c 39 36 2c 31 30 30 2c 31 32 30 2c 39 36 2c |0,96,100,120,96,| 00000500 31 30 30 2c 31 32 31 2c 31 31 32 2c 31 30 30 2c |100,121,112,100,| 00000510 38 34 2c 31 30 35 2c 31 30 30 2c 31 30 35 2c 31 |84,105,100,105,1| 00000520 30 30 2c 31 30 35 0d 01 90 49 dc 20 39 33 2c 38 |00,105...I. 93,8| 00000530 38 2c 39 33 2c 38 38 2c 39 33 2c 38 34 2c 36 30 |8,93,88,93,84,60| 00000540 2c 36 34 2c 38 34 2c 31 30 30 2c 38 30 2c 38 34 |,64,84,100,80,84| 00000550 2c 31 30 30 2c 31 31 32 2c 39 36 2c 31 30 30 2c |,100,112,96,100,| 00000560 31 31 32 2c 31 33 33 2c 31 30 31 2c 31 30 34 0d |112,133,101,104.| 00000570 01 9a 48 dc 20 31 31 32 2c 31 32 38 2c 31 30 34 |..H. 112,128,104| 00000580 2c 31 31 32 2c 31 32 38 2c 31 30 34 2c 31 31 32 |,112,128,104,112| 00000590 2c 31 32 38 2c 31 30 34 2c 31 31 32 2c 31 32 39 |,128,104,112,129| 000005a0 2c 31 32 30 2c 31 31 32 2c 31 30 34 2c 39 36 2c |,120,112,104,96,| 000005b0 31 30 30 2c 31 32 30 0d 01 a4 47 dc 20 39 36 2c |100,120...G. 96,| 000005c0 31 30 30 2c 31 32 30 2c 39 36 2c 31 30 30 2c 31 |100,120,96,100,1| 000005d0 32 30 2c 39 36 2c 31 30 30 2c 31 32 31 2c 31 31 |20,96,100,121,11| 000005e0 32 2c 31 30 30 2c 38 34 2c 31 32 30 2c 37 32 2c |2,100,84,120,72,| 000005f0 38 38 2c 31 32 31 2c 31 31 32 2c 31 30 34 0d 01 |88,121,112,104..| 00000600 ae 48 dc 20 31 30 30 2c 39 32 2c 38 38 2c 39 32 |.H. 100,92,88,92| 00000610 2c 31 32 31 2c 31 31 32 2c 31 30 34 2c 39 32 2c |,121,112,104,92,| 00000620 31 30 30 2c 36 34 2c 38 34 2c 31 30 31 2c 36 34 |100,64,84,101,64| 00000630 2c 39 33 2c 38 35 2c 31 31 33 2c 31 30 39 2c 31 |,93,85,113,109,1| 00000640 30 34 2c 31 31 32 0d 01 b8 4b dc 20 31 32 38 2c |04,112...K. 128,| 00000650 31 30 34 2c 31 31 32 2c 31 32 38 2c 31 30 34 2c |104,112,128,104,| 00000660 31 31 32 2c 31 32 38 2c 31 30 34 2c 31 31 32 2c |112,128,104,112,| 00000670 31 32 39 2c 31 32 30 2c 31 32 30 2c 31 31 32 2c |129,120,120,112,| 00000680 31 30 34 2c 39 36 2c 31 30 30 2c 31 32 30 2c 39 |104,96,100,120,9| 00000690 36 0d 01 c2 48 dc 20 31 30 30 2c 31 32 30 2c 39 |6...H. 100,120,9| 000006a0 36 2c 31 30 30 2c 31 32 30 2c 39 36 2c 31 30 30 |6,100,120,96,100| 000006b0 2c 31 32 31 2c 31 31 32 2c 31 30 30 2c 38 34 2c |,121,112,100,84,| 000006c0 31 30 35 2c 31 30 30 2c 31 30 35 2c 31 30 30 2c |105,100,105,100,| 000006d0 31 30 35 2c 39 33 2c 38 38 0d 01 cc 47 dc 20 39 |105,93,88...G. 9| 000006e0 33 2c 38 38 2c 39 33 2c 38 34 2c 36 30 2c 36 34 |3,88,93,84,60,64| 000006f0 2c 38 34 2c 31 30 30 2c 38 30 2c 38 34 2c 31 30 |,84,100,80,84,10| 00000700 30 2c 31 31 32 2c 39 36 2c 31 30 30 2c 31 31 32 |0,112,96,100,112| 00000710 2c 31 33 33 2c 31 30 31 2c 31 30 34 2c 31 31 32 |,133,101,104,112| 00000720 0d 01 d6 47 dc 20 31 32 38 2c 31 30 34 2c 31 31 |...G. 128,104,11| 00000730 32 2c 31 32 38 2c 31 30 34 2c 31 31 32 2c 31 30 |2,128,104,112,10| 00000740 38 2c 31 30 34 2c 31 31 32 2c 31 32 39 2c 31 32 |8,104,112,129,12| 00000750 30 2c 31 31 32 2c 31 30 34 2c 39 36 2c 31 30 30 |0,112,104,96,100| 00000760 2c 31 32 30 2c 39 36 0d 01 e0 48 dc 20 31 30 30 |,120,96...H. 100| 00000770 2c 31 32 30 2c 39 36 2c 31 30 30 2c 31 32 30 2c |,120,96,100,120,| 00000780 39 36 2c 31 30 30 2c 31 32 31 2c 31 31 32 2c 31 |96,100,121,112,1| 00000790 30 30 2c 38 34 2c 31 32 30 2c 37 32 2c 38 38 2c |00,84,120,72,88,| 000007a0 31 32 31 2c 31 31 32 2c 31 30 34 2c 31 30 30 0d |121,112,104,100.| 000007b0 01 ea 3d dc 20 39 32 2c 38 38 2c 39 32 2c 31 32 |..=. 92,88,92,12| 000007c0 31 2c 31 31 32 2c 31 30 34 2c 39 32 2c 31 30 30 |1,112,104,92,100| 000007d0 2c 36 34 2c 38 34 2c 31 30 31 2c 36 34 2c 39 33 |,64,84,101,64,93| 000007e0 2c 38 35 2c 32 35 35 2c 31 30 30 30 0d ff |,85,255,1000..| 000007ee