I was working on Frank the Fruit Fly making sure the passwords worked right. I tried level 3. I got four screens in when it started acting weird:
So I went through the code and determined that the cause was code placement. I tried for about an hour trying to move code and stuff. I then remembered about the .orgfill statement. Perhaps that could help. So I tried putting that in the code in various spots. It worked. It also made my code 40kb larger. When I get all done adding levels, I will go back and test levels to make sure everything in the game works.
pm_align_spr player2: .incbin frankspriteslevel2m.bin player3: .incbin frankspriteslevel3f.bin player0: .incbin frankspriteslevel1b.bin player4: .incbin frankspriteslevel4h.bin player5: .incbin frankspriteslevel5g.bin .orgfill 0x10000
The statement is at line 1,622. There are 16,603 lines in the whole code. I have no other .orgfill statements. The player statements store the sprites I use for each level. I am worried that this might just be a temporary fix though. I have no idea where one bunch of code stops and where another one starts. So right now I'm hoping that this holds together well.