pvsnes lib two audiobanks question

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
odelot
Posts: 6
Joined: Mon Aug 27, 2018 7:33 am

pvsnes lib two audiobanks question

Post 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!
odelot
Posts: 6
Joined: Mon Aug 27, 2018 7:33 am

Re: pvsnes lib two audiobanks question

Post 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
KungFuFurby
Posts: 275
Joined: Wed Jul 09, 2008 8:46 pm

Re: pvsnes lib two audiobanks question

Post 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...
Post Reply