I'm messing around with the APU, and I'm running into a problem.
I wrote / stole this little macro to play notes out of a note table:
The only problem is after the note plays it seems to play again over and over
kind of like this:
beeeeeeeeeeeeep [nothing] beep [nothing] beep
So what am I failing to understand about the APU?
Thanks
I wrote / stole this little macro to play notes out of a note table:
Code:
.macro play_note note
.local @play_note_end
lda note_countdown
bne @play_note_end
lda #80
sta note_countdown
lda #%00000001
sta $4015 ;enable square 1
lda note
tay
lda note_table, y
sta $4002
iny
lda note_table, y
sta $4003
@play_note_end:
.endmacro
.local @play_note_end
lda note_countdown
bne @play_note_end
lda #80
sta note_countdown
lda #%00000001
sta $4015 ;enable square 1
lda note
tay
lda note_table, y
sta $4002
iny
lda note_table, y
sta $4003
@play_note_end:
.endmacro
The only problem is after the note plays it seems to play again over and over
kind of like this:
beeeeeeeeeeeeep [nothing] beep [nothing] beep
So what am I failing to understand about the APU?
Thanks