I want to play two samples in sequence (I'm using Famitone2), so I did an attempt with irq this way:
The sample1 plays fine but sample2 don't.
I'm doing something wrong, there's another way to achieve this?
Thanks in advance.
Code:
somewhere:
cli ; enable irq
lda #sample1
jsr FamiToneSamplePlay
...
irq:
pha
txa
pha
tya
pha
bit $4015 ; ack irq
lda #sample2
jsr FamiToneSamplePlay
pla
tay
pla
tax
pla
rti
nmi:
...
jsr FamiToneUpdate
...
rti
cli ; enable irq
lda #sample1
jsr FamiToneSamplePlay
...
irq:
pha
txa
pha
tya
pha
bit $4015 ; ack irq
lda #sample2
jsr FamiToneSamplePlay
pla
tay
pla
tax
pla
rti
nmi:
...
jsr FamiToneUpdate
...
rti
The sample1 plays fine but sample2 don't.
I'm doing something wrong, there's another way to achieve this?
Thanks in advance.