So this is a really weird problem I've ran into. I was trying to play a Beepola ROMBeep tune from my 48K unit and this is what happens:
- The tune starts 1 or 2 patterns into the song data instead of the first pattern.
- Pressing a key to stop the tune (or letting the tune stop on its own if configured) causes the system to bug out. I've seen corrupted screen writes, unusual BASIC errors, and even uncommanded resets.
It plays perfectly fine on Fuse and BizHawk. I've already eliminated the "tape interface" from the equation as I've tried playing audio from my PC using a tape2wav conversion.
I've narrowed down the BASIC loader to these lines for the simplest possible way to break it (VAL "" statements can be swapped with plain numbers):
Code: Select all
10 CLEAR VAL "39999": LOAD ""CODE
20 RANDOMIZE USR VAL "40000"
The issue mysteriously goes away if I do this instead:
Code: Select all
10 LOAD ""CODE
20 RANDOMIZE USR VAL "40000"
So my question is: Why does the CLEAR command break things in this specific scenario? Is it my hardware or the ROMBeep engine at fault here? Or is there some behaviour which emulators aren't emulating correctly?