Changes

TRACKERS MOONBLASTER EN 08

2 bytes added, 19:15, 7 March 2018
no edit summary
[en]8== 8.USE IN OWN PROGRAM ==
=== Use in BASIC ===
In order to use the MoonBIaster music in BASIC, it is essential that the BASIC driver is loaded first. This driver is on the Music disk under the name MBDRV.BIN. It is started with the command BLOAD MBDRV.BIN, R. Because the driver uses the storage area above & HDAOO, the command CLEAR 200 ?? C & HD9FF must be given to start up the driver to ensure that the BASIC program does not exceed this limit. If this has happened you have some extra BASIC commands at your disposal. Below an overview
:;CALL MBKLOAD ("sample kit name") This command causes a sample kit to be loaded and put into the MSX-AUDIO RAM. Note: this command uses the memory bank with the song as a buffer, so the contents will be erased
:CALL MBMLOAD ("song name") This allows you command causes a sample kit to load a MoonBIaster song. This song is be loaded at and put into the set address in MSX-AUDIO RAM. Note: this command uses the set memory bank. Note that only USER files with the song as a buffer, so the contents will be loaded and played correctly.erased
:;CALL MBCHIP MBMLOAD (chipnr) Sets the desired sound chip where the music should be played on: 0 MSX AUDIO 1 MSX-MUSIC 2 or higher STEREO (MSX-AUDIO and MSX-MUSIC) CALL MBBANK (bank number"song name") Sets the memory bank of the memory mapper that contains the song to be played back, or in which a song is to be loaded. Only works if no music is playing. A memory bank of the memory mapper is 16 kB. Usually the value 3 will be taken for bank number. The maximum bank number depends on the amount of memory in your computer.
:CALL MBADDR (address) Sets the memory address where the song is or This allows you to which load a MoonBIaster song. This song is to be loadedat the set address in the set memory bank. Make sure Note that the entire song between the addresses & H8000 only USER files will be loaded and & HC000 steel works only if no music is playingplayed correctly.
:;CALL MBPLAY Plays a song on the set sound chip. The location of the song in the memory is determined with the above commands.MBCHIP (chipnr)
Sets the desired sound chip where the music should be played on:0 MSX AUDIO 1 MSX-MUSIC 2 or higher STEREO (MSX-AUDIO and MSX-MUSIC) CALL MBSTOP Stops playing MBBANK (bank number) Sets the memory bank of the memory mapper that contains the song to be played back, or in which a songis to be loaded. Only works if no music is playing. A memory bank of the memory mapper is 16 kB. Usually the value 3 will be taken for bank number. The maximum bank number depends on the amount of memory in your computer.
:;CALL MBCONT Continues to play a song after a pause. Only works correctly after an MBHALT command. MBADDR (address)
:CALL MBHALT Pauses Sets the memory address where the song is or to which a song. This is useful, for example, when loadingto be loaded. Give a _MBHALT before loading, and when Make sure that the loading is finished you can continue entire song between the addresses & H8000 and & HC000 steel works only if no music with a _MBCONTis playing.
:;CALL MBVER Displays the current version number of the BASIC driver on the screen. In addition, various memory addresses can also be read by the BASIC programmer: PEEK (& HDA00) = Set sound chip with MBCHIP command. PEEK (& HDA01) = Status: 0 = does not play, 255 = does play. PEEK (& HDA02) = Set memory bank with MBBANK command. PEEK (& HDA03) + 256 * PEEK (& HDA04> = Set memory address with MBADDR command. To ensure that the commands are working properly, there is a sample program on the Music Disk under the name "BASIC.BAS." In this program, all commands will be used with the exception of the MBVER command.MBPLAY
[en]8Plays a song on the set sound chip. The location of the song in the memory is determined with the above commands. ;CALL MBSTOP Stops playing a song.  ;CALL MBCONT Continues to play a song after a pause. Only works correctly after an MBHALT command.  ;CALL MBHALT Pauses a song. This is useful, for example, when loading. Give a _MBHALT before loading, and when the loading is finished you can continue the music with a _MBCONT.  ;CALL MBVER Displays the current version number of the BASIC driver on the screen. In addition, various memory addresses can also be read by the BASIC programmer: PEEK (& HDA00) = Set sound chip with MBCHIP command. PEEK (& HDA01) = Status: 0 = does not play, 255 = does play. PEEK (& HDA02) = Set memory bank with MBBANK command. PEEK (& HDA03) + 256 * PEEK (& HDA04> = Set memory address with MBADDR command. To ensure that the commands are working properly, there is a sample program on the Music Disk under the name "BASIC.BAS." In this program, all commands will be used with the exception of the MBVER command.2 === Use 8.2Use in machine language ===
There are two source codes for the machine language programmers on the Music disk. These are MBPLAY.SRC and MBLOADER.SRC. The first of the two is the actual play routine and the second is a program to load the MoonBIaster songs and drum kits and to see which sound chips are present in the computer and to initialise them if necessary. The sources are written for the DevPac-80 assembler (GEN80), but can also be easily loaded into other assemblers. Some labels are used in all sources. Here, of course, the same memory? address, so when merging these must be removed. Some brief remarks that are of interest to ML programmers: