For the last 2 weeks I've been trying to figure out why my game (Tyre Trax) is misbehaving.
I didn't realise that I had a real problem until I got my Harmony Cartridge and was able to test on real hardware. After completing every 2nd race (without fail) the program either resets (back to the title screen - game 1, not the last game executed) or crashes. In Stella it usually just "resets" back to the title screen so I had it as a minor bug I need to look into as I finish up. In reality, on real hardware (for me at least) it crashes every 2nd play through.
I thought it might be something in my latest version, but no, it's in every version I've compiled going back to September or so.
I added a skip function so I can jump to the end of the race, receive the trophy and back to the title screen. No problems.
Play through 1 race : no problem
Play through 2nd race, issue seems to be on transition from the end (trophy) screen to the title screen. (it resets the cart like it was just inserted and switched on, or it freezes up).
I've rebuilt the titlescreen thinking that I'd maybe introduced some bug along the way, no joy. I've even gone back to a plain default out of the box titlescreen, no joy.
I've removed the custom sound driver, no effect.
I've removed the custom score graphics file used in the timer, no effect.
Only time anything changes is if I remove the title-screen kernel call, then problem goes away and the game plays flawlessly every time (but no title screen obviously..)
I'm pointing the finger at titlescreen kernal by process of elimination, but I understand its likely something my code is doing to upset it, and it's not really the title screen at fault all, I just don't know enough about what to look for in Stella's debugger to know what could be causing a problem that I can identify.
If anyone here with more experience can help I'd appreciate it. I've attached my last binary. If anyone wants to check the bB code, let me know.
The binary attached has the detection removed for hitting the river so you can just drive in the water and zoom to the end of the level for testing.
I hope someone can guide me on the problem otherwise I'll end up having to scrap the title screen and code something simple in it's place to get the game completed.