Page 1 of 1

pvsnes lib two audiobanks question

Posted: Tue Sep 18, 2018 8:23 pm
by odelot
Hi!

I've converted a IT file and it generate two banks...

Do I need to control how to change between them or is it automatic?

Thank you guys!

Re: pvsnes lib two audiobanks question

Posted: Sat Sep 22, 2018 2:27 pm
by odelot
hi guys,

I asked to alekmaul (the pvsneslib creator) and he said that it goes throug banks automatically.

You just need to set them in the beginning of the code... example:

if your song was converted in two banks, like this:

.bank 5
.section "SOUNDBANK0" ; need dedicated bank(s)

__SOUNDBANK__0:
.incbin "soundbank.bnk" read $8000
.ends

.bank 6
.section "SOUNDBANK1" ; need dedicated bank(s)

__SOUNDBANK__1:
.incbin "soundbank.bnk" skip $8000
.ends

you need to set the banks like this:

spcSetBank(&__SOUNDBANK__1);
spcSetBank(&__SOUNDBANK__0);

more details here: https://github.com/alekmaul/pvsneslib/i ... -423726329

Re: pvsnes lib two audiobanks question

Posted: Sat Sep 22, 2018 3:11 pm
by KungFuFurby
WLA-DX has support for a kind of section that WLALink will not drop later on if it has no references to it, citing line 2180 of https://github.com/alekmaul/pvsneslib/b ... readme.txt . I think it may be useful in this case if you don't want to call spcSetBank for each ROM bank of your soundbank, although I haven't actually tested it myself...