Skip to navigation
This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Code variation 1 of 3A variation in the comments only
Tap on a block to expand it, and tap it again to revert.
Code variation 2 of 3A variation in the comments only
Tap on a block to expand it, and tap it again to revert.
.NOISE
Code variation 3 of 3Related to the Master version
The Master supports a much more sophisticated interrupt-driven sound system rather than the standard sound envelope system that the other versions use.
Tap on a block to expand it, and tap it again to revert.
LDA DNOIZ
BNE SOUR1
LDA SFXBT,
Y
LSR A
CLV
LDX #0
BCS SOUS4
INX
LDA SOPR+1
CMP SOPR+2
BCC SOUS4
INX
.SOUS4
LDA SFXPR,
Y
.SOUS9
CMP SOPR,
X
BCC SOUR1
SEI
STA SOPR,
X
LSR A
AND #%00000111
STA SOVOL,
X
LDA SFXVC,
Y
STA SOVCH,
X
LDA SFXBT,
Y
STA SOCNT,
X
AND #%00001111
LSR A
STA SOFRCH,
X
LDA SFXFQ,
Y
BVC P%+3
ASL A
STA SOFRQ,
X
LDA #%10000000
STA SOFLG,
X
CLI
SEC
RTS