For 8-Bit software Mix-ed is a program to load in, edit, play, alter and save mixes. RunBld is a program to build a machine code mix player routine to play the mix. For both programs PAGE is best at &E00. However it will be alright elsewhere. If using PAGE elsewhere, the only problem is likely to occur when using the example data lines I include. The main menu from which you no doubt loaded this help has a selection of mixes for you to listen to. The routinewhich runs the sample was written usingRunBld, some of the samples were edited using Mix-ed. Mix-ed presents you with a menu, the options from which are chosen by a single keypress highlighted in brackets(H)istory. Will display a history of load actions. When a program is loaded, the start and end addresses in memory to where it was loaded are remembered. Up to 55 loads are remembered After that, the memory is reset and a beep is sounded. (L)oad file from &<location>. A file will be loaded into memory from the location displayed. This location can be changed by the options listed below. (S)ave file from (B) to (E). A file is saved using the memory locations specified by BEGIN and END. It is saved with the reload address set to wherever HIMEM is. (B)egin at &<location>. Change the load and play start address. This figure will be used to start saves from and to start playing from using option (P). Two keypresses are required. Enter the MSB of the number only, ie for &6700 just press 6 then 7. Remember to check that you do not load data to below HIMEM. (E)nd at. &<location>. Change the load and play end address. This figure will be used to end saves at and to finish playing at. Again, enter only the MSB. (R)ate &<number>. Change the speed that the mix is played at. 0 is slow. 1 is fastest. &FF is slowest. &28 is about the usual. The program will allow you to select a rate in the range of &19 to &80 although any rate between 0 and &FF would work. (Z) Decrease begin address by &100 (X) Increase begin address by &100 (<) Decrease end address by &100 (>) Increase end address by &100 (P)lay mix. Plays mix from specified begin to end addresses. (*) Oscli. Issue a MOS command. Useful for changing filing systems etc. It is possible to select a shortsection of sound, save it back to disc,do this with other short sections from other samples, then load them all back in into different areas of memory by the use of the Begin option. Thenresave the whole thing. You can thenload the new mix into RunBld. To playeach section you must make a note of the start and end addresses of theseparate sections whilst using Mix-ed. After saving your own mix, you can thenrun it directly without using Mix-ed.(You can also use this program to build run routines for any other mix ). RunBld assembles a run routine for the mix. There are three things that the run routine needs to know before it can play a mix. The Most Significant Byte ( MSB ) of the start and finish address of the section of memory to be played, and the rate at which it is to be played. (The MSB of &1900 is &19).At the end of RunBld (line 260 onwards) are data lines. You write these data lines, when the play option is chosen the program reads the data to find out the three values it needs to play each section of mix. The data is entered in blocks of three. The first number is the MSB of the start address. The second number is the MSB of the end address. The third number is the speed at which the section is played. There can be a number of repeats of blocks. The start and end addresses are determined by you when listening to the mix using Mix-ed. You are presented with a menu, the options are as follows: (L)oad a mix Load a mix starting at HIMEM. Please see the note about HIMEM being at different values. (S)ave a mix player Save the mix player that you have assembled from &900 onwards. (P)lay the mix Plays the mix using the addresses that you have put into the DATA statements at the end of the program. (I)load in the data statements that you have previously saved. The data neededto tell the mix player what to play isstored in the lines from 260 onwards. It is possible to save just these linesto disc. I have included example datalines in directory D. Before loading aset of lines in, all the line numbersin the program from 260 onwards aredeleted first, this stops any mixing oflines. (O) Spool the lines containing the datastatements to disc. Lines 260 onwardsare the lines which hold theinformation the mix player needs. Afterentering a file name, the lines aresaved to disc. The data lines from theexamples are in directory D, they were saved using this option. (*) Enter an oscli command. Escape to list the data statements. The Data statements are read in blocks of three. The first number of the blockis the MSB of the start address. Thesecond number of the block is the MSBof the end address. The third number ofthe block is the rate at which the mixis played, 1 is the fastest &FF is theslowest, &10 to &20 is about the usualspeed. The data is terminated by threezeros. However only the first zero isneeded, if the second zero is changedto 1, then the mix will be played in anendless loop. If the third zero ischanged to 1, then the mix will be alsoplayed backwards. Remember that thestart address must then be higher thanthe end address! Here are a couple of examples of thedata lines: DATA&19,&80,&10,0,0,0 Will play the whole of the mix in memory (&1900 to &8000) at a rate of &10. DATA&19,&80,&10,&19,&80,&10,0,0,0 Will do the same again but twice. DATA&30,&40,&40,0,0,0 will play a small section of the mix slowly. DATA&80,&19,&20,0,0,1 will play the whole of memory but backwards note that the start address must be higher than the end address. DATA&80,&19,&20,0,1,1 will play the whole of memory, backwards and forever. Once you have saved the mix usingMix-ed and noted the start and endaddresses of each section in the mix,run RunBld. Load in the mix. Escape,list the program and then change thedata statements, each start and finishaddress followed by the speed it is tobe played at. Look at some of theexamples in directory D. Load in any ofthese programs using the (I) optionfrom RunBld, they are the data statements that I wrote to build themix player examples. Run the program again and listen to the mix by pressingP. When you are happy with the sound,use the save mix runner option (S). After naming the file, in future allyou have to do is *LOAD the mix, then *RUN the mix runner. If in doubt, examine the menu to see how I have done that. When loading a mix into RunBld, HIMEM is the address that it will be loaded to. This is to avoid the mix overwriting the program. Usually HIMEM will be at the same address for both Mix#ed and RunBld and no problem will occur. However, if you are using a model B with PAGE at &1900 and load in the example mixes, you will find thatif you then load in the example data lines that I include on the disc, thatthey will not run the mix as desired. This is because the mix will have beenre-loaded from a different address and therefore you will need to alter thedata statements, adding an offset. Themix should run from &1900. If you arerunning it from &2400 (which is whereit will be if page is at &1900) everyfirst and second data statement needs &B adding to it. The third value(pitch) does not need altering. One way to do this without spending ages converting hex numbers is to change line 160 of MixBld to: 160P%=P%+20:[OPTl%:.start:]:REPEAT:READa%,b%,c%:IF a%<>0:a%=a%+&B:b%=b%+&B:[:OPTl%:LDA#a%:STA&75:LDA#b%:STA&76:LDA#c%:STA&74:JSR&900:] Which will simply add the desiredoffset to the data as it is read in,thus allowing the data examples Iinclude to run correctly. Another solution is to *LOAD the mix inbefore CHAINing MixBld. However, thefirst bit of the mix will then be corrupted.