Tons of music/sfx issues

CutterCross

Active member
jorotroid said:
I found it! Oh my god, I found it!

Ok. So there is a SongToPlay and a songToPlay variable being defined in the code. The capital one is defined in ZP_and_vars.asm and the lower case one is defined in SystemVariables.asm. I'm not sure if this was a typo or if it was intentional to have two variables with similar names. I also don't know if this was specifically causing the problem because there is another issue. I'm not sure if I personally added more variables to ZP_and_vars, but in my export, SongToPlay ends up getting assigned to address 0101 which is also where a stream_flags variable gets declared in ggsound_ram.inc.

Nevertheless, I commented out SongToPlay in ZP_and_vars, and changed all other instances of it to songToPlay. Now the second pulse channel works fine and all songs I have play fine (not taking into account my music composition skills). Here's where you will find those instances:
  • 2 instances in LoadScreenData.asm
  • 1 instance in HandleScreenLoads.asm

I wasn't even looking for this. I was just seeing what more I could do with my label extracting script when I noticed the overlap. Though I was hoping the label extractor could help find this problem, so mission accomplished, I guess.


Dude, you are my hero. I thought I'd have to redo my whole project for 4.1.0 just to get my music playing correctly. Not anymore!
 

jorotroid

Member
CutterCross said:
Dude, you are my hero. I thought I'd have to redo my whole project for 4.1.0 just to get my music playing correctly. Not anymore!

You're welcome! Glad that your awesome music won't missing a piece anymore.
 

CutterCross

Active member
jorotroid said:
You're welcome! Glad that your awesome music won't missing a piece anymore.

I made a new update video for my NESmaker project and the music FINALLY sounds right! Thanks again!

Video: https://www.youtube.com/watch?v=Q8HkEnGoUM0&t=1s
 

DanielT1985

Member
jorotroid said:
I found it! Oh my god, I found it!

Ok. So there is a SongToPlay and a songToPlay variable being defined in the code. The capital one is defined in ZP_and_vars.asm and the lower case one is defined in SystemVariables.asm. I'm not sure if this was a typo or if it was intentional to have two variables with similar names. I also don't know if this was specifically causing the problem because there is another issue. I'm not sure if I personally added more variables to ZP_and_vars, but in my export, SongToPlay ends up getting assigned to address 0101 which is also where a stream_flags variable gets declared in ggsound_ram.inc.

Nevertheless, I commented out SongToPlay in ZP_and_vars, and changed all other instances of it to songToPlay. Now the second pulse channel works fine and all songs I have play fine (not taking into account my music composition skills). Here's where you will find those instances:
  • 2 instances in LoadScreenData.asm
  • 1 instance in HandleScreenLoads.asm

I wasn't even looking for this. I was just seeing what more I could do with my label extracting script when I noticed the overlap. Though I was hoping the label extractor could help find this problem, so mission accomplished, I guess.

I tried doing that, but it caused an (Unknown Label) Error.
 

jorotroid

Member
DanielT1985 said:
I tried doing that, but it caused an (Unknown Label) Error.

Making an educated guess, I think what most likely happened is that a SongToPlay was missed, so now that the variable doesn't exist it will give you that error. Fortunately, when the console gives you an error like that, it will also tell you which file it is in and which line it is on. Let me know if it ended up not being one of the 3 that I mentioned and I will update my post.
 

Scottdanoob

New member
i have the same problem on mine it just freezes(working on my lst bit in my 4.0 project which is sound) i just want to it to stop restarting every time i enter a new screen, but dont know exactly what to change in the scripts to stop that.
 

CutterCross

Active member
Scottdanoob said:
i have the same problem on mine it just freezes(working on my lst bit in my 4.0 project which is sound) i just want to it to stop restarting every time i enter a new screen, but dont know exactly what to change in the scripts to stop that.

The sound issues in this topic pertain to 4.0.11 only, so these solutions won't really help you here.

I'd personally recommend you start over and redo your project using 4.0.6 or 4.0.11, since you'll receive FAR more help and support from the tutorials and on this forum.
 

nroflmao

New member
OMG I tried this and it worked!
Thanks so much for the specific instructions @jorotroid! Brilliant debugging work!
Finally i can go back to developing in 4.0.11!
I couldn't deal with it dropping the pulse track i went back and re-imported my stuff into 4.0.6 to avoid it lol.

Thanks @dale_coop for pointing me to this thread, i would have never found it!
 
Top Bottom