pvsnes lib two audiobanks question

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
pvsnes lib two audiobanks question
by on (#226062)
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
by on (#226264)
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
by on (#226270)
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...