Sound Control Registers; Sound 1 Mode Registers - Nintendo GAME BOY Programming Manual

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

2. SOUND CONTROL REGISTERS

2.1 Sound 1 Mode Registers

Sound 1 is a circuit that generates a rectangle waveform with sweep and envelope functions.
It is set by registers NR10, NR11, NR12, NR13, and NR14.
♦ ♦ ♦ ♦ Sweep Shift Number
Name
Address
Bit
7
FF10
NR10
♦ ♦ ♦ ♦ Sweep Shift Number
The frequency with one shift (NR13 and NR14) is determined by the following formula.
X (t) = X (t - 1) + X (t - 1) / 2 n = 0 to 7
X (0) = default data
If the result of this formula is a value consisting of more than 11 bits, sound output is stopped
and the Sound 1 ON flag of NR52 (bit 0) is reset.
In a subtraction operation, if the subtrahend is less than 0, the result is the pre-calculation
value X (t ) = X ( t -1). However, if n = 0, shifting does not occur and the frequency is
unchanged.
♦ ♦ ♦ ♦ Sweep time (ts)
Frequency varies with each value of ts.
000: Sweep OFF
001: ts=1/f128 (7.8ms)
010: ts=2/f128 (15.6ms)
011: ts=3/f128 (23.4ms)
100: ts=4/f128 (31.3ms)
101: ts=5/f128 (39.1ms)
110: ts=6/f128 (46.9ms)
111: ts=7/f128 (54.7ms)
6
5
4
3
2
1
f128=128Hz
0
R/W(Only the shaded portion
(
)
can be read.)
Sweep Shift Number n(n=0 to 7)
Sweep Increase/Decrease
0: Addition(frequency increases)
1: Subraction(frequency decreases)
Sweep Time, ts
X (t-1) is the previous output frequency
81
Chapter 3: Sound Functions

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents