Jump to content

Photo

Can I store audio in another bank?


2 replies to this topic

#1 pacgreg OFFLINE  

pacgreg

    Chopper Commander

  • 199 posts
  • Location:Florida

Posted Tue Jan 2, 2018 3:07 PM

Trying to do audio for the first time, I guess my real question would be can you gosub jump to another bank and still use sread normally?  Can you use two sdata groupings at the same time for different sounds and music playing at the same time? Attached is the code I was trying to play with to use music and bankswitching.

 Thanks

Attached Files


Edited by pacgreg, Tue Jan 2, 2018 3:07 PM.


#2 Gemintronic ONLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,911 posts

Posted Tue Jan 2, 2018 3:28 PM

I usually have the least amount of weirdness if I put the VisualbB generated sound engine and music data in the last bank.  Same thing goes for the titlescreen kernel data and titlescreen loop.

 

Technically you can call the routines from anywhere but, yeah.  Personal preference and experience.

 

 

UPDATE:   Sorry, it's a little more than personal preference.  It seems keeping the data and the routines that use it close is a real good idea.  I experience the same phenomenon in sega genesis programming.  Dunno the exact reason in assembly it works that way.



#3 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,682 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Jan 2, 2018 4:33 PM

I usually have the least amount of weirdness if I put the VisualbB generated sound engine and music data in the last bank.  Same thing goes for the titlescreen kernel data and titlescreen loop.
 
Technically you can call the routines from anywhere but, yeah.  Personal preference and experience.
 
 
UPDATE:   Sorry, it's a little more than personal preference.  It seems keeping the data and the routines that use it close is a real good idea.  I experience the same phenomenon in sega genesis programming.  Dunno the exact reason in assembly it works that way.

 
Since a bunch of things already go in the last bank, it might be better to stick sound in a different one (if you are using more than two banks).
 
 
 

Trying to do audio for the first time, I guess my real question would be can you gosub jump to another bank and still use sread normally?  Can you use two sdata groupings at the same time for different sounds and music playing at the same time? Attached is the code I was trying to play with to use music and bankswitching.
 Thanks

 
This example program uses sdata:
 
randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_sound_with_bg_music

 

Looks like I forgot to mention on the bB page that it uses sdata. I'll fix that now and I'll also add a link to the example from the sdata section.


  • Gemintronic likes this




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users