Figure 65 - The Sound1Cnt_H Register - Nintendo GAME BOY ADVANCE Programming Manual

Hide thumbs Also See for GAME BOY ADVANCE:
Table of Contents

Advertisement

74
SOUND1CNT_L [d02 - 00] Number of Sweep Shifts
Specifies the number of sweeps.
The frequency data with a single shift are determined according to the following formula, with f 
fying the frequency after a shift and f 
Equation 2 - Determining Single-Shift Frequency Data
If the addition according to this formula produces a value consisting of more than 11 bits, sound output
is stopped and the Sound 1 ON flag (bit 0) of NR52 is reset.
With subtraction, if the subtrahend is less than 0, the pre-subtraction value is used. However, if the
specified setting is 0, shifting does not occur and the frequency is unchanged.
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
 Address
Register 
SOUND1
062h
CNT_H
SOUND1CNT_H [d15 - 12] Envelope Initial-Value
 Allows specification of any of 16 levels ranging from maximum to mute.
SOUND1CNT_H [d11] Envelope Increase/Decrease
Specifies whether to increase or decrease the volume.
SOUND1CNT_H [d10 - 08] Number of Envelope Steps
Sets the length of each step of envelope amplification or attenuation.
With n the specified value, the length of 1 step (steptime) is determined by the following formula.
Equation 3 - Determining the Length of 1 Step (steptime)
When n = 0, the envelope function is turned off.
 AGB-06-0001-002-B13
Released: May 27, 2005
Game Boy Advance Programming Manual
the frequency before the shift.
(t-1)
Figure 65 - The SOUND1CNT_H Register 
NR12
No. of Envelope Steps
0-7
Envelope Increase/Decrease
0: Attenuate
1: Amplify
Envelope initial value
 Attributes
NR11
R/W
Sound Length
0-63
Waveform duty cycle
© 1999-2005 NINTENDO
May 25, 2005
signi-
(t)
Initial Value
0000h

Advertisement

Table of Contents
loading

Table of Contents