home *** CD-ROM | disk | FTP | other *** search
- -------------------------------------------------------------------------------
- GAMEGEAR MUSIC DRIVER - (c) Martin Walker 1993/1994
- -------------------------------------------------------------------------------
-
- DEVELOPERS MANUAL - UPDATED:
-
- 25/07/94 - Driver updated to version 3.0/ RAM usage 226 bytes
- 09/07/93 - Driver updated to version 1.7
-
-
-
-
- ------------------------------------------------------------------------------
- DEMOING THE MUSIC/ EFFECTS
- ------------------------------------------------------------------------------
-
- To help test the music files, a file named 'GEARMUS.ROM' may be supplied.
- You can download this to the GAMEGEAR for a demo of the music and effects.
- The GAMEGEAR keys to use are as follows:
-
- UP/DOWN Increment/Decrement current call number.
- LEFT/RIGHT Stop all sound/Re-Initialise sound driver
- 1 Start music.
- 2 Start effect.
-
-
-
-
- ------------------------------------------------------------------------------
- OVERVIEW & CONTENTS OF DRIVER FILE
- -------------------------------------------------------------------------------
-
- The players and self contained music/effect data are in the form of pure
- object code with no headers (for minimum size and maximum portability). They
- are assembled to any address specified by the customer. The driver and data
- will start at MUSTABLE, and the ram variables will start at MUSVARS. Each
- driver has a jumptable of calls at the beginning, as follows:
-
-
- START OF ROM (CARTRIDGE) DATA:
- INITSND equ MUSTABLE+0
- INTSND equ MUSTABLE+3
-
-
- START OF RAM (WORKSPACE) DATA: (CURRENT USAGE 224 BYTES)
- SFXNO equ MUSVARS+0
- TUNENO equ MUSVARS+1
- STATUS equ MUSVARS+2
- EFFECTVOL equ MUSVARS+3 ;default setting 0Fh (maximum)
- MUSICVOL equ MUSVARS+4 ;default setting 0Dh (to balance effects)
- FADEVOL equ MUSVARS+5
-
-
-
-
- INITIALISATION:
- ---------------
- The player needs to be initialised once only on starting the game. This sets
- up the sound chip and the initial values of all RAM variables. The music
- master volume defaults to 0Dh and the effect master volume defaults to maximum
- (0Fh) during this routine. It is done using:
-
- CALL INITSND ;Initialise driver
-
-
-
- The music player needs to be added to an existing interrupt routine, as
- follows:
-
- CALL INTSND ;Sound Interrupt Routine every 60Hz
-
-
-
-
- MUSIC CALLS:
- ------------
- STRTUNE: LD A,00h ;Desired value (see PROJECT.DOC)
- LD (TUNENO),A
-
- Values are: 000h-07Fh ;Music tracks
- 080h ;Stop Music immediately
- 081h-0FEh ;Fade Music (Typical speed 084h)
-
-
- During a fade,the value of STATUS will change from 0FFh (music active) to 00h
- (music stopped) at the instant the fade has finished.
-
- CHKFADE: LD A,(STATUS)
- BIT 7,A
- RET NZ ;Music still playing
-
-
- If desired, the master volume setting for the music can be changed from the
- default value set by INITSND (0Dh) to a different value if a different balance
- between sound effects and music is required. The default value is already
- optimised for most cases.
-
- MUSVOL: LD A,0Dh ;00h-0Fh
- LD (MUSICVOL),A
-
-
-
-
- EFFECT CALLS:
- -------------
- STRTFX: LD A,01h ;Desired value (see PROJECT.DOC)
- LD (SFXNO),A
-
-
- If desired, the master volume setting for the effects can be changed from the
- default maximum value set by INITSND (0Fh) to a lower value.
-
- FXVOL: LD A,0Dh ;00h-0Fh
- LD (EFFECTVOL),A
-
-
- The music fade is designed to affect the music only - if you require to fade
- sound effects simultaneously, simply copy the current FADEVOL to EFFECTVOL
- after each call to INTSND.
-
-