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!