AGB Programming Manual
Sound
©1999 - 2001 Nintendo of America Inc.
88
D.C.N. AGB-06-0001-002B4
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
(t)
signifying the frequency after a shift and f
(t-1)
the
frequency before the shift.
data
frequency
Initial
2
)
0
(
)
1
(
)
1
(
)
(
=
±
=
−
−
f
f
f
f
n
t
t
t
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
SOUND1
CNT_H
062h
0000h
R/W
Address
Register
Attributes
Initial Value
NR11
NR12
Sound Length
0-63
Waveform duty cycle
Envelope Increase/Decrease
0: Attenuate
1: Amplify
No. of Envelope Steps
0-7
Envelope initial value
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.