TRACKERS MOONBLASTER EN 08

From MSX MUSIC WIKI
Revision as of 20:57, 6 March 2018 by Kumokosi (talk | contribs) (Created page with "[en]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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

[en]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 to load a MoonBIaster song. This song is loaded at the set address in the set memory bank. Note that only USER files will be loaded and played correctly.
CALL 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 MBBANK (bank number) 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 to which a song is to be loaded. Make sure that the entire song between the addresses & H8000 and & HC000 steel works only if no music is playing.
CALL MBPLAY Plays 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.