3 Voices Music on MO6

Cette catégorie traite de développements récents pour nos vieilles machines, applications, jeux ou démos... Amis programmeurs, c'est ici que vous pourrez enfin devenir célèbres!

Modérateurs : Papy.G, fneck, Carl

Répondre
Garland
Messages : 20
Enregistré le : 25 oct. 2018 19:40

3 Voices Music on MO6

Message par Garland » 22 juin 2019 19:35

Hi guys,
here in Italy the best magazines at time were all from Jackson Editions. They ran also a series dedicated to PC128 OP, and here' s a code from 1989 which can play music on 3 channels. Now probably this is taken from a reverse engineering of Logiciel's M3V, however it uses new tokens for store and play music, of course the core is written in asm. Exec the first one to poke the engine, then type NEW and exec the second one which plays a 3 voices tune by using the engine.


Engine:

Code : Tout sélectionner

1 REM ***************************** 
2 REM * MUSICA A THE VOCI 
3 REM * BY 4 REM * GOLINO-VANNINI-COCCETTINI * 
5 REM * COPYRIGHT 1989 
6 REM ***************************** 
10 C=1000:CLS:X%=&H4000:DO:C%=0:FOR I%=0 TO 7:READ A$:IF A$="*" THEN EXIT 2 
20 A%=VAL("&H"+A$):C%=C%+A%:POKE X%+I%,A%:NEXT I% 
30 READ D%:IF C%MOD256<>D% THEN PRINT"ERRORE NELLA LINEA ";C:EXIT ELSE LOCATE 0,22,0:PRINT "Locazioni"; X%;"-";X%+7;"OK";C 
40 X%=X%+I%:C=C+10 
50 LOOP:EXEC &H44B7
1000 DATA 4C,B7,A7,E5,39,7E,BF,43, 72 
1010 DATA 7E,B8,F4,BD,BA,A2,CE,44, 85 
1020 DATA F8,8D,0E,BD,BA,A0,CE,44, 188 
1030 DATA FA,8D,06,BD,BA,A0,CE,44, 182 
1040 DATA FC,8C,00,00,2C,02,20,DD, 179 
1050 DATA 8C,00,0B,25,02,20,F7,1F, 244 
1060 DATA 10,58,86,80,3D,8E,46,00, 127 
1070 DATA 30,8B,AF,C4,39,8E,51,00, 70 
1080 DATA BF,44,E7,8E,45,B4,BF,44, 116 
1090 DATA F4,8E,45,BA,BF,44,F6,C6, 64 
1100 DATA 01,F7,44,ED,17,02,71,7F, 50 
1110 DATA 44,ED,8E,55,10,BF,44,E7, 14 
1120 DATA 8E,45,B6,BF,44,F4,8E,45, 83 
1130 DATA BB,BF,44,F6,17,02,59,8E, 180 
1140 DATA 59,20,BF,44,E7,8E,45,B8, 238 
1150 DATA BF,44,F4,8E,45,BC,BF,44, 137 
1160 DATA F6,17,02,44,8E,51,00,8D, 191 
1170 DATA 1E,34,10,10,BF,45,BD,8E, 193 
1180 DATA 55,10,8D,13,34,10,10,BF, 24 
1190 DATA 45,BF,8E,59,20,8D,08,34, 212 
1200 DATA 10,10,BF,45,C1,20,13,10, 40 
1210 DATA 8E,00,00,EC,84,10,83,00, 145 
1220 DATA 00,26,01,39,31,AB,30,04, 112 
1230 DATA 20,F1,BE,45,BD,BC,45,BF, 145 
1240 DATA 22,03,BE,45,BF,BC,45,C1, 169 
1250 DATA 22,03,BE,45,C1,34,10,FC, 41 
1260 DATA 45,BD,43,53,C3,00,01,30, 140 
1270 DATA 8B,AF,F8,06,AE,66,CC,00, 24 
1280 DATA 00,ED,02,ED,04,35,10,34, 89 
1290 DATA 10,FC,45,BF,43,53,C3,00, 105 
1300 DATA 01,30,8B,AF,F8,04,AE,64, 121 
1310 DATA CC,00,00,ED,02,ED,04,35, 225 
1320 DATA 10,FC,45,C1,43,53,C3,00, 107 
1330 DATA 01,30,8B,AF,F4,35,10,CC, 112 
1340 DATA 00,00,ED,02,ED,04,35,30, 69 
1350 DATA BE,44,F2,BF,44,E7,8E,51, 189
1360 DATA 00,CE,55,10,10,8E,59,20, 74 
1370 DATA B6,21,8C,BD,40,00,EC,84, 208 
1380 DATA 10,83,00,00,10,27,00,9C, 102 
1390 DATA 10,A3,C4,25,02,EC,C4,10, 94 
1400 DATA A3,A4,25,02,EC,A4,34,06, 56 
1410 DATA 34,10,BE,44,E7,86,5C,3D, 76 
1420 DATA ED,81,BF,44,E7,35,10,EC, 137 
1430 DATA 02,ED,9F,44,E7,34,10,BE, 187 
1440 DATA 44,E7,30,02,EC,42,ED,81, 249 
1450 DATA EC,22,ED,81,BF,44,E7,35, 155 
1460 DATA 10,EC,84,A3,E4,10,83,00, 154 
1470 DATA 00,26,09,30,04,C6,01,F7, 33 
1480 DATA 44,EC,20,05,7F,44,EC,ED, 241 
1490 DATA 84,EC,C4,A3,E4,10,83,00, 78 
1500 DATA 00,26,0C,33,44,C6,02,FB, 108 
1510 DATA 44,EC,F7,44,EC,20,02,ED, 102 
1520 DATA C4,EC,A4,A3,E4,10,83,00, 110 
1530 DATA 00,26,0C,31,24,C6,04,FB, 76 
1540 DATA 44,EC,F7,44,EC,20,02,ED, 102 
1550 DATA A4,35,06,34,10,BE,44,E7, 12 
1560 DATA F6,44,EC,E7,80,BF,44,E7, 119 
1570 DATA 8C,9F,FC,10,24,02,5B,35, 237 
1580 DATA 10,16,FF,5A,BE,44,E7,ED, 85 
1590 DATA 84,BF,44,F2,B6,21,1A,BD, 39 
1600 DATA 40,00,39,B6,21,8C,BD,40, 217 
1610 DATA 00,86,FE,B4,A7,C3,B7,A7, 0 
1620 DATA C3,F6,A7,C1,C4,F7,F7,A7, 122 
1630 DATA C1,7F,A7,CF,CC,3F,04,B7, 124 
1640 DATA A7,CD,F7,A7,CF,1A,50,34, 127 
1650 DATA 08,86,42,1F,8B,BE,44,F8, 116 
1660 DATA BF,42,B7,BE,44,FA,BF,42, 181 
1670 DATA BA,BE,44,FC,BF,42,BD,8E, 4 
1680 DATA 00,00,1F,13,1F,12,9F,C2, 196 
1690 DATA 8E,60,00,EC,81,10,83,00, 238 
1700 DATA 00,27,35,DD,85,EC,81,DD, 8 
1710 DATA 89,EC,81,DD,94,EC,81,DD, 177 
1720 DATA 9E,E6,80,B6,A7,CD,84,3F, 241 
1730 DATA 80,05,81,3F,22,12,54,24, 241 
1740 DATA 03,B7,A7,CD,54,24,03,B7, 96 
1750 DATA A7,CD,54,24,03,B7,A7,CD, 26 
1760 DATA 9F,C0,20,17,9E,C0,20,C3, 215 
1770 DATA 35,08,86,01,BA,A7,C3,B7, 159 
1780 DATA A7,C3,1C,AF,B6,21,1A,BD, 227 
1790 DATA 40,00,39,9E,C2,10,DF,C6, 142 
1800 DATA 10,DE,C4,10,8E,33,C0,32, 117 
1810 DATA E9,0D,80,10,DF,B8,E6,9F, 162 
1820 DATA 42,B7,30,89,11,03,9F,BB, 32 
1830 DATA EB,9F,42,BA,33,C9,14,3B, 209 
1840 DATA DF,BE,EB,9F,42,BD,F7,A7, 196 
1850 DATA CD,31,3F,26,DA,10,DF,C4, 240 
1860 DATA 10,DE,C6,9F,C2,20,AD,47, 41 
1870 DATA 9F,8C,50,51,40,50,78,40, 20 
1880 DATA 60,1B,51,40,9F,8C,5F,FB, 145 
1890 DATA 7D,44,ED,27,05,BD,BF,30, 134 
1900 DATA 20,03,BD,BF,2E,F7,44,E9, 241 
1910 DATA BF,44,EA,5D,26,0B,FE,44, 189 
1920 DATA E7,8E,00,00,AF,C1,AF,C1, 85 
1930 DATA 39,F6,44,E9,5D,26,02,20, 1 
1940 DATA ED,BE,44,EA,E6,84,C1,56, 90 
1950 DATA 26,05,17,00,C7,20,EA,C1, 212 
1960 DATA 4F,26,05,17,00,9C,20,E1, 46 
1970 DATA C1,50,26,04,8D,7B,20,D9, 60 
1980 DATA 10,AE,84,CE,44,FE,4F,10, 177 
1990 DATA AC,C1,27,08,4C,81,07,26, 150 
2000 DATA F6,7E,40,08,F6,44,E9,C1, 160 
2010 DATA 02,27,18,E6,02,C1,42,26, 82
2020 DATA 07,C6,04,F7,44,EC,20,0E, 38 
2030 DATA C1,23,26,07,C6,02,F7,44, 20 
2040 DATA EC,20,03,7F,44,EC,34,02, 244 
2050 DATA A6,9F,44,F6,C6,2A,3D,8E, 58 
2060 DATA 45,0C,30,8B,35,02,FE,44, 133 
2070 DATA EA,7D,44,EC,27,05,33,41, 55 
2080 DATA 7A,44,E9,33,42,7A,44,E9, 195 
2090 DATA 7A,44,E9,FF,44,EA,C6,06, 160 
2100 DATA 3D,FB,44,EC,EE,85,BE,44, 221 
2110 DATA E7,10,AE,9F,44,F4,10,AF, 59 
2120 DATA 81,EF,81,BF,44,E7,16,FF, 240 
2130 DATA 60,30,01,BF,44,EA,BE,44, 128 
2140 DATA E7,EE,9F,44,F4,EF,81,6F, 139 
2150 DATA 80,6F,80,BF,44,E7,7A,44, 23 
2160 DATA E9,39,E6,01,C0,31,C1,00, 187 
2170 DATA 2C,03,7E,40,05,C1,03,2F, 229 
2180 DATA 03,7E,40,05,E7,9F,44,F6, 134 
2190 DATA 30,02,BF,44,EA,7A,44,E9, 198 
2200 DATA 7A,44,E9,39,4F,E6,01,C0, 214 
2210 DATA 30,C1,00,2C,03,7E,40,05, 227 
2220 DATA C1,09,2F,03,7E,40,05,F7, 182 
2230 DATA 44,EC,4C,E6,02,C0,30,C1, 21 
2240 DATA 00,2D,18,C1,09,2E,14,4C, 157 
2250 DATA 34,06,F6,44,EC,86,0A,3D, 45 
2260 DATA F7,44,EC,35,06,FB,44,EC, 141 
2270 DATA F7,44,EC,F6,44,EC,C1,00, 14 
2280 DATA 26,03,7E,40,05,C1,60,23, 48 
2290 DATA 03,7E,40,05,BE,44,EA,4C, 254 
2300 DATA 30,86,BF,44,EA,34,02,B6, 143 
2310 DATA 44,E9,A0,E4,35,04,B7,44, 229 
2320 DATA E9,4F,F6,44,EC,ED,9F,44, 46 
2330 DATA F4,39,35,10,7F,9F,FC,7F, 11 
2340 DATA 9F,FD,8E,44,D5,E6,80,3F, 232 
2350 DATA 02,5D,26,F9,16,FB,C6,39, 142 
2360 DATA 8E,60,00,BF,44,F2,B6,21, 186 
2370 DATA 8C,BD,40,00,6F,84,6F,01, 236 
2380 DATA B6,21,1A,BD,40,00,39,BD, 228 
2390 DATA BA,A2,8C,00,0B,10,22,FB, 32 
2400 DATA A4,1F,10,86,14,3D,CB,20, 149 
2410 DATA F7,41,4E,39,00,00,00,00, 191 
2420 DATA 53,55,4F,4E,C1,43,41,4E, 216 
2430 DATA 43,45,4C,4C,C1,4D,45,54, 199 
2440 DATA 54,C9,52,45,47,49,53,54, 235 
2450 DATA 52,C9,54,45,4D,50,CF,00, 32 
2460 DATA 00,00,00,00,00,00,00,00, 0 
2470 DATA 00,00,00,00,80,8C,44,9C, 236 
2480 DATA 26,F9,39,80,F9,81,04,22, 120 
2490 DATA 0B,8E,44,CB,48,1F,89,3A, 210 
2500 DATA 9D,C0,6E,94,7E,40,08,C6, 235 
2510 DATA 05,F7,27,7A,8E,44,70,BF, 158 
2520 DATA 27,7B,8E,44,A3,BF,27,7D, 122 
2530 DATA 39,00,00,41,E3,44,40,40, 33 
2540 DATA 3D,40,0B,44,57,54,41,56, 14 
2550 DATA 4F,4C,41,20,53,41,54,55, 57 
2560 DATA 52,41,0D,0A,07,00,00,60, 17 
2570 DATA 1B,00,23,31,07,00,4C,4C, 14 
2580 DATA 4C,4C,60,1B,45,B8,45,BC, 17 
2590 DATA 47,00,50,00,50,00,44,4F, 122 
2600 DATA 52,45,4D,49,46,41,53,4F, 86 
2610 DATA 4C,41,53,49,01,57,01,6B, 237 
2620 DATA 02,87,01,81,01,98,01,6B, 16 
2630 DATA 01,B0,01,CA,01,98,01,CA, 224 
2640 DATA 01,E5,01,B0,02,02,02,20, 189 
2650 DATA 01,E5,02,41,02,63,02,20, 176 
2660 DATA 02,87,01,57,02,63,02,AE, 246 
2670 DATA 02,D7,05,0F,03,02,03,30, 37 
2680 DATA 02,D7,03,60,03,93,03,30, 5 
2690 DATA 03,93,03,CA,03,60,04,04, 206 
2700 DATA 04,41,03,CA,04,81,04,C6, 97 
2710 DATA 04,41,05,0F,02,AE,04,C6, 211 
2720 DATA 05,5C,05,AD,0A,1D,06,04, 68 
2730 DATA 06,5F,05,AD,06,C0,07,27, 11
2740 DATA 06,5F,07,27,07,94,06,C0, 244 
2750 DATA 08,07,08,81,07,94,09,03, 63 
2760 DATA 09,8C,08,81,0A,1D,05,5C, 166 
2770 DATA 09,8C,0A,B7,0B,5A,14,3B, 10 
2780 DATA 0C,07,0C,BE,0B,5A,0D,80, 207 
2790 DATA 0E,4E,0C,BE,0E,4E,0F,28, 185 
2800 DATA 0D,80,10,0E,11,03,0F,28, 246 
2810 DATA 12,06,13,18,11,03,14,3B, 166 
2820 DATA 0A,B7,13,18,18,90,18,90, 60 
2830 DATA 18,90,03,03,03,18,90,18, 113 
2840 DATA 90,18,90,4C,4C,4C,4C,4C, 180 
2850 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
2860 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
2870 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
2880 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
2890 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
2900 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
2910 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
2920 DATA 00,00,00,00,00,00,00,00, 0 
2930 DATA 00,00,00,00,00,00,00,00, 0 
2940 DATA 00,00,00,00,00,00,00,00, 0 
2950 DATA 00,00,00,00,00,00,00,00, 0 
2960 DATA 00,00,00,00,00,00,00,00, 0 
2970 DATA 00,00,00,00,00,00,00,00, 0 
2980 DATA 00,00,00,00,00,00,00,00, 0 
2990 DATA 00,00,00,00,00,00,00,00, 0 
3000 DATA 00,00,00,00,00,00,00,00, 0 
3010 DATA 00,00,00,00,00,00,00,00, 0 
3020 DATA 00,00,00,00,00,00,00,00, 0 
3030 DATA 00,00,00,00,00,00,00,00, 0 
3040 DATA 00,00,00,00,00,00,00,00, 0 
3050 DATA 00,00,00,00,00,00,00,00, 0 
3060 DATA 00,00,00,00,00,00,00,00, 0 
3070 DATA 00,00,00,00,00,00,00,00, 0 
3080 DATA 00,00,00,00,00,00,00,00, 0 
3090 DATA 00,00,00,00,00,00,00,00, 0 
3100 DATA 00,00,00,00,00,00,00,00, 0 
3110 DATA 00,00,00,00,00,00,00,00, 0 
3120 DATA 00,00,00,00,00,00,00,00, 0 
3130 DATA 00,00,00,00,00,00,00,00, 0 
3140 DATA 00,00,00,00,00,00,00,00, 0 
3150 DATA 00,00,00,00,00,00,00,00, 0 
3160 DATA 00,00,00,00,00,00,00,00, 0 
3170 DATA 00,00,00,00,00,00,00,00, 0 
3180 DATA 00,00,00,00,00,00,00,00, 0 
3190 DATA 00,00,00,00,00,00,00,00, 0 
3200 DATA 00,00,00,00,00,00,00,00, 0 
3210 DATA 00,00,00,00,00,00,00,00, 0 
3220 DATA 00,00,00,00,00,00,00,00, 0 
3230 DATA 00,00,00,00,00,00,00,00, 0 
3240 DATA 00,00,00,00,00,00,00,00, 0 
3250 DATA 00,00,00,00,00,00,00,00, 0 
3260 DATA 00,00,00,00,00,00,00,00, 0 
3270 DATA 00,00,00,00,00,00,00,00, 0 
3280 DATA 00,00,00,00,00,00,00,00, 0 
3290 DATA 00,00,00,00,00,00,00,00, 0 
3300 DATA 00,00,00,00,00,00,00,00, 0 
3310 DATA 00,00,00,00,00,00,00,00, 0 
3320 DATA 15,15,15,15,15,15,15,15, 168 
3330 DATA 15,15,15,15,15,15,15,15, 168 
3340 DATA 15,15,15,15,15,15,15,15, 168 
3350 DATA 15,15,15,15,15,15,15,15, 168 
3360 DATA 15,15,15,15,15,15,15,15, 168 
3370 DATA 15,15,15,15,15,15,15,15, 168 
3380 DATA 15,15,15,15,15,15,15,15, 168 
3390 DATA 15,15,15,15,15,15,15,15, 168 
3400 DATA 15,15,15,15,15,15,15,15, 168 
3410 DATA 15,15,15,15,15,15,15,15, 168 
3420 DATA 15,15,15,15,15,15,15,15, 168 
3430 DATA 15,15,15,15,15,15,15,15, 168 
3440 DATA 15,15,15,15,15,15,15,15, 168 
3450 DATA 15,15,15,15,15,15,15,15, 168 
3460 DATA 15,15,15,15,15,15,15,15, 168
3470 DATA 15,15,15,15,15,15,15,15, 168 
3480 DATA 00,00,00,00,00,00,00,00, 0 
3490 DATA 00,00,00,00,00,00,00,00, 0 
3500 DATA 00,00,00,00,00,00,00,00, 0 
3510 DATA 00,00,00,00,00,00,00,00, 0 
3520 DATA 00,00,00,00,00,00,00,00, 0 
3530 DATA 00,00,00,00,00,00,00,00, 0 
3540 DATA 00,00,00,00,00,00,00,00, 0 
3550 DATA 00,00,00,00,00,00,00,00, 0 
3560 DATA 00,00,00,00,00,00,00,00, 0 
3570 DATA 00,00,00,00,01,01,01,01, 4 
3580 DATA 01,01,01,01,01,01,01,01, 8 
3590 DATA 02,02,02,02,02,02,02,02, 16 
3600 DATA 02,02,02,02,03,03,03,03, 20 
3610 DATA 03,03,03,03,03,03,03,03, 24 
3620 DATA 04,04,04,04,04,04,04,04, 32 
3630 DATA 04,04,04,04,05,05,05,05, 36 
3640 DATA 05,05,05,05,05,05,05,05, 40 
3650 DATA 06,06,06,06,06,06,06,06, 48 
3660 DATA 06,06,06,06,07,07,07,07, 52 
3670 DATA 07,07,07,07,07,07,07,07, 56 
3680 DATA 08,08,08,08,08,08,08,08, 64 
3690 DATA 08,08,08,08,09,09,09,09, 68 
3700 DATA 09,09,09,09,09,09,09,09, 72 
3710 DATA 0A,0A,0A,0A,0A,0A,0A,0A, 80 
3720 DATA 0A,0A,0A,0A,0B,0B,0B,0B, 84 
3730 DATA 0B,0B,0B,0B,0B,0B,0B,0B, 88 
3740 DATA 0C,0C,0C,0C,0C,0C,0C,0C, 96 
3750 DATA 0C,0C,0C,0C,0D,0D,0D,0D, 100 
3760 DATA 0D,0D,0D,0D,0D,0D,0D,0D, 104 
3770 DATA 0E,0E,0E,0E,0E,0E,0E,0E, 112 
3780 DATA 0E,0E,0E,0E,0F,0F,0F,0F, 116 
3790 DATA 0F,0F,0F,0F,0F,0F,0F,0F, 120 
3800 DATA 10,10,10,10,10,10,10,10, 128 
3810 DATA 10,10,10,10,11,11,11,11, 132 
3820 DATA 11,11,11,11,11,11,11,11, 136 
3830 DATA 12,12,12,12,12,12,12,12, 144 
3840 DATA 12,12,12,12,13,13,13,13, 148 
3850 DATA 13,13,13,13,13,13,13,13, 152 
3860 DATA 14,14,14,14,14,14,14,14, 160 
3870 DATA 14,14,14,14,15,15,15,15, 164 
3880 DATA 00,00,00,00,00,00,01,01, 2 
3890 DATA 01,01,01,01,02,02,02,02, 12 
3900 DATA 02,02,03,03,03,03,03,03, 22 
3910 DATA 04,04,04,04,04,04,05,05, 34 
3920 DATA 05,05,05,05,06,06,06,06, 44 
3930 DATA 06,06,07,07,07,07,07,07, 54 
3940 DATA 08,08,08,08,08,08,09,09, 66 
3950 DATA 09,09,09,09,0A,0A,0A,0A, 76 
3960 DATA 0A,0A,0B,0B,0B,0B,0B,0B, 86 
3970 DATA 0C,0C,0C,0C,0C,0C,0D,0D, 98 
3980 DATA 0D,0D,0D,0D,0E,0E,0E,0E, 108 
3990 DATA 0E,0E,0F,0F,0F,0F,0F,0F, 118 
4000 DATA 10,10,10,10,10,10,11,11, 130 
4010 DATA 11,11,11,11,12,12,12,12, 140 
4020 DATA 12,12,13,13,13,13,13,13, 150 
4030 DATA 14,14,14,14,14,14,15,15, 162 
4040 DATA 15,15,14,14,14,14,14,14, 162 
4050 DATA 13,13,13,13,13,13,12,12, 150 
4060 DATA 12,12,12,12,11,11,11,11, 140 
4070 DATA 11,11,10,10,10,10,10,10, 130 
4080 DATA 0F,0F,0F,0F,0F,0F,0E,0E, 118 
4090 DATA 0E,0E,0E,0E,0D,0D,0D,0D, 108 
4100 DATA 0D,0D,0C,0C,0C,0C,0C,0C, 98 
4110 DATA 0B,0B,0B,0B,0B,0B,0A,0A, 86 
4120 DATA 0A,0A,0A,0A,09,09,09,09, 76 
4130 DATA 09,09,08,08,08,08,08,08, 66 
4140 DATA 07,07,07,07,07,07,06,06, 54 
4150 DATA 06,06,06,06,05,05,05,05, 44 
4160 DATA 05,05,04,04,04,04,04,04, 34 
4170 DATA 03,03,03,03,03,03,02,02, 22 
4180 DATA 02,02,02,02,01,01,01,01, 12 
4190 DATA 01,01,00,00,00,00,00,00, 2
4200 DATA 00,00,00,00,00,00,00,00, 0 
4210 DATA 00,00,00,00,00,00,00,00, 0 
4220 DATA 01,01,01,01,01,01,01,01, 8 
4230 DATA 02,02,02,02,02,02,02,03, 17 
4240 DATA 03,03,03,03,04,04,04,04, 28 
4250 DATA 04,05,05,05,05,06,06,06, 42 
4260 DATA 06,07,07,07,07,08,08,08, 58 
4270 DATA 08,09,09,09,09,0A,0A,0A, 74 
4280 DATA 0A,0B,0B,0B,0B,0C,0C,0C, 90 
4290 DATA 0C,0D,0D,0D,0D,0E,0E,0E, 106 
4300 DATA 0E,0F,0F,0F,0F,10,10,10, 122 
4310 DATA 10,10,11,11,11,11,11,12, 135 
4320 DATA 12,12,12,12,12,13,13,13, 147 
4330 DATA 13,13,13,13,14,14,14,14, 156 
4340 DATA 14,14,14,14,14,14,14,14, 160 
4350 DATA 15,15,15,15,15,15,15,15, 168 
4360 DATA 15,15,15,15,15,15,15,15, 168 
4370 DATA 14,14,14,14,14,14,14,14, 160 
4380 DATA 14,14,14,14,13,13,13,13, 156 
4390 DATA 13,13,13,12,12,12,12,12, 147 
4400 DATA 12,11,11,11,11,11,10,10, 135 
4410 DATA 10,10,10,0F,0F,0F,0F,0E, 122 
4420 DATA 0E,0E,0E,0D,0D,0D,0D,0C, 106 
4430 DATA 0C,0C,0C,0B,0B,0B,0B,0A, 90 
4440 DATA 0A,0A,0A,09,09,09,09,08, 74 
4450 DATA 08,08,08,07,07,07,07,06, 58 
4460 DATA 06,06,06,05,05,05,05,04, 42 
4470 DATA 04,04,04,04,03,03,03,03, 28 
4480 DATA 03,02,02,02,02,02,02,02, 17 
4490 DATA 01,01,01,01,01,01,01,01, 8 
4500 DATA 00,00,00,00,00,00,00,00, 0 
4510 DATA 00,00,00,00,00,00,00,00, 0 
4520 DATA 00,00,00,00,00,00,00,00, 0 
4530 DATA 00,00,00,01,01,01,01,01, 5 
4540 DATA 02,02,02,02,03,03,03,04, 21 
4550 DATA 04,04,04,05,05,05,06,06, 39 
4560 DATA 07,07,07,08,08,08,09,09, 63 
4570 DATA 09,0A,0A,0A,0B,0B,0B,0C, 84 
4580 DATA 0C,0C,0C,0D,0D,0D,0E,0E, 103 
4590 DATA 0E,0E,0E,0F,0F,0F,0F,0F, 117 
4600 DATA 0F,10,10,10,10,10,10,10, 127 
4610 DATA 10,10,10,10,10,10,10,10, 128 
4620 DATA 10,10,10,10,10,10,0F,0F, 126 
4630 DATA 0F,0F,0F,0F,0E,0E,0E,0E, 116 
4640 DATA 0E,0E,0D,0D,0D,0D,0D,0D, 106 
4650 DATA 0C,0C,0C,0C,0C,0C,0B,0B, 94 
4660 DATA 0B,0B,0B,0B,0B,0B,0B,0A, 87 
4670 DATA 0A,0A,0A,0A,0A,0A,0A,0A, 80 
4680 DATA 0A,0A,0A,0A,0A,0A,0A,0A, 80 
4690 DATA 0A,0A,0B,0B,0B,0B,0B,0B, 86 
4700 DATA 0B,0B,0C,0C,0C,0C,0C,0C, 94 
4710 DATA 0D,0D,0D,0D,0D,0D,0E,0E, 106 
4720 DATA 0E,0E,0E,0E,0E,0F,0F,0F, 115 
4730 DATA 0F,0F,0F,0F,10,10,10,10, 124 
4740 DATA 10,10,10,10,10,10,10,10, 128 
4750 DATA 10,10,10,10,10,10,10,0F, 127 
4760 DATA 0F,0F,0F,0F,0F,0E,0E,0E, 117 
4770 DATA 0E,0E,0D,0D,0D,0D,0C,0C, 104 
4780 DATA 0C,0C,0B,0B,0A,0A,0A,09, 85 
4790 DATA 09,09,08,08,08,07,07,07, 63 
4300 DATA 06,06,06,05,05,05,04,04, 41 
4810 DATA 04,03,03,03,03,02,02,02, 22 
4820 DATA 01,01,01,01,01,00,00,00, 5 
4830 DATA 00,00,00,00,00,00,00,00, 0 
4840 DATA 00,00,00,00,00,00,00,00, 0 
4850 DATA 01,01,01,01,02,02,03,03, 14 
4860 DATA 03,04,04,05,05,05,06,06, 38 
4870 DATA 07,07,08,08,09,09,09,0A, 67 
4880 DATA 0A,0B,0B,0B,0C,0C,0C,0C, 91 
4890 DATA 0C,0D,0D,0D,0D,0D,0D,0D, 103 
4900 DATA 0D,0D,0D,0D,0D,0D,0C,0C, 102 
4910 DATA 0C,0C,0C,0B,0B,0B,0B,0A, 90 
4920 DATA 0A,0A,0A,09,09,09,09,08, 74 
4930 DATA 08,08,08,08,08,08,07,07, 62 
4940 DATA 07,07,07,07,07,08,08,08, 59 
4950 DATA 08,08,08,09,09,09,09,0A, 70 
4960 DATA 0A,0B,0B,0B,0C,0C,0D,0D, 93 
4970 DATA 0E,0E,0F,0F,0F,10,10,11, 122 
4980 DATA 11,11,12,12,13,13,13,13, 146 
4990 DATA 14,14,14,14,14,14,15,15, 162 
5000 DATA 15,15,15,14,14,14,14,14, 163 
5010 DATA 14,13,13,13,12,12,12,11, 148 
5020 DATA 11,10,10,10,0F,0F,0E,0E, 123 
5030 DATA 0D,0D,0D,0C,0C,0B,0B,0A, 95 
5040 DATA 05,0A,09,09,09,09,08,08, 67 
5050 DATA 08,08,08,07,07,07,07,07, 59 
5060 DATA 07,07,07,07,07,08,08,08, 59 
5070 DATA 08,08,09,09,09,09,0A,0A, 72 
5080 DATA 0A,0A,0B,0B,0B,0B,0C,0C, 88 
5090 DATA 0C,0C,0C,0D,0D,0D,0D,0D, 101 
5100 DATA 0D,0D,0D,0D,0D,0D,0D,0C, 103 
5110 DATA 0C,0C,0C,0C,0B,0B,0B,0A, 91 
5120 DATA 0A,0A,09,09,08,08,08,07, 69 
5130 DATA 07,06,06,05,05,04,04,04, 41 
5140 DATA 03,03,02,02,02,01,01,01, 15 
5150 DATA 01,00,00,00,00,00,00,00, 1 
5160 DATA 00,00,00,00,00,00,01,01, 2 
5170 DATA 01,02,02,03,03,04,04,05, 24 
5180 DATA 05,06,06,07,08,08,09,09, 58 
5190 DATA 0A,0A,0A,0B,0B,0B,0B,0C, 86 
5200 DATA 0C,0C,0C,0C,0C,0C,0B,0B, 94 
5210 DATA 0B,0B,0A,0A,0A,09,09,08, 78 
5220 DATA 08,08,07,07,07,06,06,06, 55 
5230 DATA 05,05,05,05,05,05,05,05, 40 
5240 DATA 05,05,05,05,06,06,07,07, 46 
5250 DATA 08,08,09,09,0A,0A,0B,0C, 77 
5260 DATA 0C,0D,0E,0E,0F,0F,10,10, 115 
5270 DATA 11,11,12,12,12,13,13,13, 145 
5280 DATA 13,13,13,13,13,13,13,13, 152 
5290 DATA 12,12,12,11,11,10,10,0F, 135 
5300 DATA 0F,0E,0E,0E,0D,0D,0C,0C, 107 
5310 DATA 0C,0B,0B,0B,0A,0A,0A,0A, 85 
5320 DATA 0A,0A,0A,0A,0B,0B,0B,0B, 84 
5330 DATA 0C,0C,0C,0D,0D,0E,0E,0F, 105 
5340 DATA 0F,0F,10,10,11,11,12,12, 132 
5350 DATA 12,12,13,13,13,13,13,13, 150 
5360 DATA 13,13,13,13,12,12,12,11, 147 
5370 DATA 11,10,10,0F,0E,0E,0D,0D, 118 
5380 DATA 0C,0B,0B,0A,09,09,08,08, 78 
5390 DATA 07,07,06,06,06,05,05,05, 47 
5400 DATA 05,05,05,05,05,05,05,05, 40 
5410 DATA 05,06,06,06,07,07,07,08, 52 
5420 DATA 08,09,09,09,0A,0A,0A,0B, 76 
5430 DATA 0B,0B,0B,0C,0C,0C,0C,0C, 93 
5440 DATA 0C,0B,0B,0B,0B,0A,0A,0A, 86 
5450 DATA 09,09,08,08,07,07,06,06, 60 
5460 DATA 05,05,04,03,03,02,02,02, 26 
5470 DATA 01,01,00,00,00,00,00,00, 2 
5480 DATA 00,00,00,00,00,01,01,02, 4 
5490 DATA 02,03,03,04,05,05,06,07, 35 
5500 DATA 07,08,09,09,0A,0A,0A,0B, 74 
5510 DATA 0B,0B,0B,0B,0B,0B,0B,0A, 87 
5520 DATA 0A,0A,09,09,08,08,07,07, 68 
5530 DATA 06,06,05,05,04,04,04,03, 37 
5540 DATA 03,03,03,03,03,04,04,04, 27 
5550 DATA 05,05,06,07,07,08,09,09, 56 
5560 DATA 0A,0B,0C,0C,0D,0E,0F,0F, 102 
5570 DATA 10,10,10,11,11,11,11,11, 133 
5580 DATA 11,11,11,10,10,10,0F,0F, 129 
5590 DATA 0E,0E,0D,0C,0C,0C,0B,0B, 99 
5600 DATA 0A,0A,09,09,09,09,09,09, 74 
5610 DATA 09,0A,0A,0A,0B,0B,0C,0C, 85 
5620 DATA 0D,0E,0E,0F,10,10,11,12, 123 
5630 DATA 12,13,13,14,14,14,14,15, 157 
5640 DATA 15,15,14,14,14,14,13,13, 160 
5650 DATA 12,12,11,10,10,0F,0E,0E, 128 
5660 DATA 0D,0C,0C,0B,0B,0A,0A,09, 88 
5670 DATA 09,09,09,09,09,09,0A,0A, 74 
5680 DATA 0A,0B,0B,0B,0C,0D,0D,0E, 95 
5690 DATA 0E,0F,0F,10,10,10,11,11, 126 
5700 DATA 11,11,11,11,11,11,10,10, 134 
5710 DATA 0F,0F,0E,0E,0D,0C,0C,0B, 106 
5720 DATA 0A,09,09,08,07,06,06,05, 60 
5730 DATA 05,04,04,04,03,03,03,03, 29 
5740 DATA 03,03,04,04,04,05,05,06, 34 
5750 DATA 06,07,07,08,08,09,09,0A, 64 
5760 DATA 0A,0A,0B,0B,0B,0B,0B,0B, 86 
5770 DATA 0B,0B,0A,0A,0A,09,08,08, 77 
5780 DATA 07,07,06,05,04,04,03,03, 39 
5790 DATA 02,01,01,01,00,00,00,00, 5 
5800 DATA 00,00,00,00,01,01,02,02, 6 
5810 DATA 03,04,05,05,06,07,08,08, 46 
5820 DATA 09,0A,0A,0A,0B,0B,0B,0B, 83 
5830 DATA 0B,0A,0A,0A,09,08,08,07, 73 
5840 DATA 06,06,05,04,04,03,03,03, 34 
5850 DATA 02,02,02,02,03,03,03,04, 21 
5860 DATA 05,05,06,07,08,09,09,0A, 59 
5870 DATA 0B,0C,0D,0D,0E,0F,0F,0F, 108 
5880 DATA 0F,10,10,0F,0F,0F,0E,0E, 120 
5890 DATA 0D,0D,0C,0B,0B,0A,09,09, 88 
5900 DATA 08,08,08,08,08,08,08,08, 64 
5910 DATA 08,09,09,0A,0B,0C,0C,0D, 84 
5920 DATA 0E,0F,10,11,11,12,12,13, 134 
5930 DATA 13,14,14,14,14,14,13,13, 157 
5940 DATA 13,12,11,11,10,0F,0F,0E, 131 
5950 DATA 0D,0D,0C,0B,0B,0B,0A,0A, 91 
5960 DATA 0A,0A,0A,0B,0B,0B,0C,0D, 88 
5970 DATA 0D,0E,0F,10,10,11,12,12, 127 
5980 DATA 13,13,14,14,14,14,14,14, 158 
5990 DATA 13,13,12,12,11,10,0F,0F, 137 
6000 DATA 0E,0D,0C,0B,0A,0A,09,09, 88 
6010 DATA 08,08,08,07,07,08,08,08, 62 
6020 DATA 08,09,09,0A,0B,0B,0C,0D, 83 
6030 DATA 0D,0E,0E,0F,0F,0F,0F,0F, 116 
6040 DATA 0F,0F,0F,0E,0E,0D,0D,0C, 111 
6050 DATA 0B,0A,09,08,07,07,06,05, 63 
6060 DATA 04,04,03,03,02,02,02,02, 22 
6070 DATA 02,03,03,03,04,05,05,06, 31 
6080 DATA 06,07,08,08,09,09,0A,0A, 67 
6090 DATA 0B,0B,0B,0B,0B,0A,0A,0A, 85 
6100 DATA 09,08,08,07,06,05,04,04, 51 
6110 DATA 03,02,01,01,00,00,00,00, 7 
6120 DATA 00,00,00,00,01,01,02,03, 7 
6130 DATA 04,05,06,07,08,08,09,0A, 57 
6140 DATA 0A,0A,0B,0B,0B,0A,0A,09, 82 
6150 DATA 09,08,07,06,05,05,04,03, 47 
6160 DATA 03,02,02,02,02,02,02,02, 17 
6170 DATA 03,04,04,05,06,07,08,09, 46 
6180 DATA 0A,0B,0C,0D,0D,0E,0E,0E, 101 
6190 DATA 0E,0E,0E,0D,0D,0C,0C,0B, 103 
6200 DATA 0A,09,09,08,07,07,06,06, 62 
6210 DATA 06,06,06,07,07,08,09,09, 58 
6220 DATA 0A,0B,0C,0D,0E,0F,10,11, 108 
6230 DATA 12,12,12,13,13,13,12,12, 147 
6240 DATA 12,11,10,10,0F,0E,0D,0C, 121 
6250 DATA 0C,0B,0A,0A,0A,0A,0A,0A, 83 
6260 DATA 0A,0B,0B,0C,0D,0E,0E,0F, 100 
6270 DATA 10,11,12,13,13,14,14,15, 150 
6280 DATA 15,15,14,14,13,13,12,11, 155 
6290 DATA 10,0F,0E,0D,0D,0C,0B,0B, 105 
6300 DATA 0A,0A,0A,0A,0A,0A,0A,0B, 81 
6310 DATA 0C,0C,0D,0E,0F,0F,10,11, 114 
6320 DATA 12,12,12,13,13,13,12,12, 147 
6330 DATA 11,11,10,0F,0E,0D,0C,0B, 115
6340 DATA 0A,09,08,07,07,06,06,06, 59 
6350 DATA 06,06,06,07,07,08,09,09, 58 
6360 DATA 0A,0B,0C,0C,0D,0D,0E,0E, 99 
6370 DATA 0E,0E,0E,0E,0D,0C,0C,0B, 104 
6380 DATA 0A,09,08,07,06,05,04,03, 52 
6390 DATA 03,02,02,02,01,02,02,02, 16 
6400 DATA 03,03,04,05,06,06,07,08, 42 
6410 DATA 09,09,0A,0A,0B,0B,0B,0A, 81 
6420 DATA 0A,0A,09,08,07,07,06,05, 62 
6430 DATA 04,03,02,01,01,00,00,00, 11 
6440 DATA 18,90,0D,80,00,00,00,00, 53 
6450 DATA 00,00,4C,4C,4C,4C,4C,4C, 200 
6460 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6470 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6480 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6490 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6500 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6510 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6520 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6530 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6540 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6550 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6560 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6570 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6580 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6590 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6600 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6610 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6620 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6630 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6640 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6650 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6660 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6670 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6680 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6690 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6700 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6710 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6720 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6730 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6740 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6750 DATA 4C,4C,4C,4C,4C,4C,4C,4C, 96 
6760 DATA F6,A0,00,C1,9F,26,01,39, 86 
6770 DATA 34,7F,10,FF,27,A8,86,20, 55 
6780 DATA 1F,8B,CE,A0,00,8E,A7,D0, 29 
6790 DATA 96,4E,03,4E,91,4E,26,0A, 68 
6800 DATA 86,60,1F,8B,CE,E0,00,8E, 204 
6810 DATA E7,D0,CC,00,4F,DD,4A,86, 127 
6820 DATA 40,97,48,AD,44,EC,C4,10, 208 
6830 DATA 83,4D,54,27,0A,A6,42,81, 190 
6840 DATA 44,10,27,00,68,20,62,86, 235 
6850 DATA 41,A7,02,CC,1F,22,A7,07, 165 
6860 DATA E7,01,86,01,A7,05,86,0A, 171 
6870 DATA A7,04,86,A1,A7,03,1A,50, 230 
6880 DATA C6,1B,E7,84,86,04,10,8E, 116 
6890 DATA 75,00,31,3F,27,3B,E6,84, 177 
6900 DATA C5,02,27,F6,E6,03,4A,27, 62 
6910 DATA 30,E6,84,2A,FC,E6,03,C1, 106 
6920 DATA FB,26,F3,10,8E,01,02,E6, 155 
6930 DATA 84,2A,FC,E6,03,31,3F,26, 41 
6940 DATA F6,10,8E,00,04,E6,84,2A, 44 
6950 DATA FC,E6,03,C1,F7,26,0A,31, 254 
6960 DATA 3F,26,F2,6F,84,8D,30,35, 60 
6970 DATA FF,34,76,20,FC,86,E0,A7, 210 
6980 DATA 84,8D,1D,1A,50,C6,0A,A6, 14 
6990 DATA 84,85,02,27,0D,A6,03,81, 105 
7000 DATA F7,26,F2,5A,26,F1,8D,0F, 28 
7010 DATA 35,FF,85,01,26,E9,20,D9, 194 
7020 DATA 8D,04,8D,02,8D,00,39,C6, 172 
7030 DATA 01,D7,48,6E,44,44,* 



Demo program :

Code : Tout sélectionner

1 REM ************************** 
2 REM * MUSICA A 3 VOCI 
3 REM * PROGRAMMA DIMOSTRATIVO * 
4 REM ************************** 
10 TEMPO 5:CANCELLA:DO 
20 READ A$,B$,C$:IF A$="*"THEN EXIT 
30 METTI A$,B$,C$ 
40 LOOP 
50 REGISTRI 1,1,2:SUONA 
60 DATA V48O3MIV24REFA,V48O2SIO3RE,V48O2SOV24FA#SI
70 DATA MIV48O2SIV24SI,V24O2SI,V72SOV24P
80 DATA O3SOV12SOSOV24FAV08LASOFA,V48O3MIV24RE#V08REMIFA,V48SIV24LASI
90 DATA V24SOV48MIV24MI,V24MI,SIV72SO
100 DATA V48SIV24LASO,V48MIV24RE#MI,V48SISI
110 DATA V48SOV24FAV12MIMI,V48MIV24RE#MI,V24O3DOO2SIBLASO
120 DATA V36O4DOV12DOV24O3LASO,V48DOMI,V48LAO3DO
130 DATA V72FAV24O2SI,V72RE#,V72O2SIV24P
140 DATA O3MIV12MIMIV24REFA,V48O2SIO3RE,V48SOV24FA#SI
150 DATA V72MIV24O2SI,V24O2MIV12MIFA#V24SOO1SI,SOV12SOLAV24SISO
160 DATA O3SOV12SOSOV24LAV12SOFA,V48O3MIV24MIRE#,V48SILA
170 DATA V24SOV72MI,MI,V24SIV12SOLAV24SISO
180 DATA V48SIV24LASO,V48MIV24RE#MI,V48SISI
190 DATA V72SOV12FAMI,V96MI,O3DOO2SIB
200 DATA V48FAV24SOLA,V48RE#V24MIRE,SISI
210 DATA V72SIV12MIMI,V72MI,V24SO#V12SOLAV48SI
220 DATA V24O4DODOO3FAFA,V48MIV12REMIFARE,LALA
230 DATA V12SISISISIV24MIMI,V24REREV12DOREMIDO,V24SOSOV48SO
240 DATA LALARE#RE,V48DOV12O2SIO3DOREO2SI,V24FA#FA#FA#FA#
250 DATA V12MIFASOLAV24SIMI,O3RE#MIREV24MIMI,V48SIV12MIFA#V24SI
260 DATA O4DODOO3FAFA,V48MIV12REMIFARE,LALALALA
270 DATA SIV12SISIV24MIMI,V48REV12DOREMIDO,SOSOSOSO
280 DATA LASOFAMI,,LASOFA#MI
290 DATA MIRE#V48MI,V24DOO2SIV48SI,V72LAV24SO#
300 DATA *,*,*


Now this always had my complete curiosity and i know the MO6 has no secrets for someone here, so i would ask you (Sam please? :D) to explain how the three channels are working from scratch, what adresses are involved and so on. I also found the SON1BIT made by Daniel and i was studying how it works.

Thank you as well ♥

__sam__
Messages : 4703
Enregistré le : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: 3 Voices Music on MO6

Message par __sam__ » 22 juin 2019 21:46

This is a fantastic program! Adding new tokens is a great idea. I've never seen this on TO8 or TO9, and I'm surprized it was documented on the PC128 machine. The asm engine is quite big, it'll take some time to reverse-engineer it, but this is fascinating...
Samuel.
A500 Vampire V2+ ^8^, A1200(030@50mhz/fpu/64mb/cf 8go),
GVP530 (MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.

Garland
Messages : 20
Enregistré le : 25 oct. 2018 19:40

Re: 3 Voices Music on MO6

Message par Garland » 23 juin 2019 00:06

Sam, do you have a link which can explain how to program the sound voices? I would start from theory before to have some pratice ...

__sam__
Messages : 4703
Enregistré le : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: 3 Voices Music on MO6

Message par __sam__ » 23 juin 2019 00:46

I do have a link, but it is in french :? : there

Basically the sound is produced by varying the voltage of the speaker. This is done by using a 6bits DAC coupled to the PIA of the game&music-interface (builtin MO6/TO8/TO9+ but external on MO5/TO7/TO9 btw). This way we can produce a single-voice sound by putting an unsigned 6 bit sample (i.e. a value between 0 and 63) at regular interval to the DAC via the PIA. This is what is done in the link just above.

To produce multivoice sound, you simply need to add together the samples of each of you channels before sending the result to the DAC. That is: the CPU does the mixing to emulate several independant samples. In order to avoid overflow in the summation (only 6 bits are available in the PIA), the result of the addition shall not be bigger than 63. So in the case of 3 channels (3 voices), this mean that each sample has a 0->21 range (3*21=63, perfect! :) ).

In the case of Musique3V and possibly the asm program in the beginning of this thread, the samples are not digitalized ones. This mean that in addition to mixing the channels, the CPU also has to generates the samples for each channels. To do so, it typically uses a built-in sine-wave that is read for each channel with an index whose increment speed depends on the channel frequency. Then the read value is multiplied by the channel volume. All the samples are then added together. The result is then normalized to fit into 0..63, and finally it is sent to the DAC. This whole process repeats over and over again at a regular pace producing the desired 3 voice tone. Typically this is done say 10 000 times a second.

To play a melody the frequency of each channel has to be modified every so often. To do so, the player reads the "score" in memory every 1/50 secs (typically every 200 produced samples) and adjusts the volume and frequency of each channel. This part can be implemented by and interrupt vector on the VBL for instance or it can be embedded within the loop that I described previousy.

To sum up: the player is typically organized as a giant loop running at 10khz producing the samples of each channels depending on its frequency & volume, then it mixes all the computed samples and sends the final 6 bit value to the DAC. In addition to this, every 20ms new notes & volumes are read from the score and the samples and volumes of each channel is modified accordingly.

Needless to say that this uses lots of CPU power and hardly nothing else can be performed by the CPU while the music is being played. That's why the SUONA command provided by the asm-code does not return to basic immediately (playing the music in the background), but blocks the execution of the program till the music is over.
Samuel.
A500 Vampire V2+ ^8^, A1200(030@50mhz/fpu/64mb/cf 8go),
GVP530 (MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.

Garland
Messages : 20
Enregistré le : 25 oct. 2018 19:40

Re: 3 Voices Music on MO6

Message par Garland » 23 juin 2019 19:41

Thanks sam, i can read french, nice and fun article :) very explicative as you as well :) how hard was to transcript the code from paper in those old days :D

Répondre