Nintendo GAME BOY Programming Manual page 197

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

bgm1_block3_0:
db sno,$1a,pv1,200,pan,012,tun,050
db • • • • • • • • • • • • • • • • • •
db 00
Description of Example 1
(a) The score data map to memory addresses 2B00h-4AFFh in the APU.
If this area is exceeded, a portion of the sound program will be destroyed.
(b) gft: is the starting address of the entire tune table.
dw, bgm1, and bgm2... are the tune labels and the starting addresses of the score data items.
(c) The tune label.
The order in which the blocks are played is defined following the tune label.
The dotted frame encloses the data for one tune, bgm1.
(d) Data for each block.
(e) 01h-7Fh (01-127) is the number of loops (repetitions); 82h-FFh (130-255) is an endless loop.
If repetition is not needed, set the end code (0x00) instead of a loop code.
(f) Block definition end code.
(g) Location where the parts of each block are indicated and the part labels are defined.
Defines the part labels for parts 0, 1, 2, . . . 7 in ascending order from top to bottom. 0x00 should be
written for unused parts. Even if some parts are unused, always define 8 parts.
(h) The performance data for each part.
Play Data Overview
Parameters such as temp, volume, pan, source number, echo, velocity, interval, and sound length are
set here.
For specific descriptions, see Section 3.6.4, Code Summaries.
First set are the effects parameters – such as main volume, ramp, and echo – for Part 0 of the first
block. Once these are set, they need not be set again (for other blocks or parts) as long as they are not
changed.
Next the parameters such as part volume, pan, source number, and tuning are set for each part.
Then the sound length, velocity + gate time, and interval are set in that order. Be careful to ensure that
sound length is always set first, followed by velocity + gate item, then the interval.
If the next sound is the same as the previous sound, the sound length, velocity, and gate time need not
be set again.
Finally, a data end code of 00 is set for Part 0 of each block.
Settings for parts 1-7 are not required.
Block03 (h) Part 0 performance data
197
Chapter 7: Super Game Boy Sound

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents