During reset, this is being done:
LDX #$40
STX $4017
LDX #$00
STX $4010
$4016 & $4017 are manipulated during controller reads.
And when I'm ready for sound code, I do the following, which I expected to give a length to a note in SQ1:
LDA #$0F
STA $4015
LDA #%00011111
STA $4000
LDA #$F8
STA $4002
LDA #$03
ORA #$C0
STA $4003
Maybe my expectation is wrong? I was expecting a note to play for a short time, and then stop.
And this was how I was trying to get decay working:
LDA #$0F
STA $4015
LDA #%00101111
STA $4000
LDA #$F8
STA $4002
LDA #$03
STA $4003
Also not working - I was expecting a note to start, and then get quieter an quieter until it was silent.
Perhaps it's something obvious to an experienced sound programmer. If it's not, maybe someone can tell me exactly how their code decays notes & gives them length, so I can give that a try.
Thanks
LDX #$40
STX $4017
LDX #$00
STX $4010
$4016 & $4017 are manipulated during controller reads.
And when I'm ready for sound code, I do the following, which I expected to give a length to a note in SQ1:
LDA #$0F
STA $4015
LDA #%00011111
STA $4000
LDA #$F8
STA $4002
LDA #$03
ORA #$C0
STA $4003
Maybe my expectation is wrong? I was expecting a note to play for a short time, and then stop.
And this was how I was trying to get decay working:
LDA #$0F
STA $4015
LDA #%00101111
STA $4000
LDA #$F8
STA $4002
LDA #$03
STA $4003
Also not working - I was expecting a note to start, and then get quieter an quieter until it was silent.
Perhaps it's something obvious to an experienced sound programmer. If it's not, maybe someone can tell me exactly how their code decays notes & gives them length, so I can give that a try.
Thanks