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 version to expand it, and tap it again to show to all variations.
LDA DNOIZ
BNE SRTS
LDA SFX2,
Y
LSR A
CLV
LDX #0
BCS NS1
INX
LDA SBUF+13
CMP SBUF+14
BCC NS1
INX
.NS1
LDA SFX1,
Y
CMP SBUF+12,
X
BCC SRTS
SEI
STA SBUF+12,
X
LSR A
AND #%00000111
STA SBUF+6,
X
LDA SFX4,
Y
STA SBUF+9,
X
LDA SFX2,
Y
STA SBUF+3,
X
AND #%00001111
LSR A
STA SBUF+15,
X
LDA SFX3,
Y
BVC P%+3
ASL A
STA SBUF+18,
X
LDA #%10000000
STA SBUF,
X
CLI
SEC
RTS