Good gravy, am I pulling my hair out.
I'm trying to add audio code to a game I've created. The audio code itself works as its own 4k game, playing the tune. The game code works as its own 8k game (it's a skydiving thing). When I change the romsize to 16k, I've been getting all sorts of weird errors.
In the attached version, I'm told "=" is an illegal keyword. In other iterations as I've been attempting to isolate the problem, I've been told there's been an error (illegal address, I think) with "sta". Sometimes "FASTFETCH" is unrecognized. Nothing seems consistent or enlightening to me. The common denominator is that bank 3 makes things screwy.
I have a feeling this has to do with bankswitching and/or the kernel options, but the options should be valid together. When I cut the audio code entirely from the file, the game compiles and the kernel options behave as expected. But if I add the audio code back in, I get an error at the "musiccounter = musiccounter + 1" line (which, again, works normally in a standalone program). Right now, no code even switches banks explicitly. The audio isn't called by anything yet, and the game code is self-contained in bank 2.
Maybe I'm missing something super-obvious because I've been staring at it for too long. But I'd really appreciate some review. I've tried compiling on two separate machines, current bB software, same result.
Thanks for any advice.
EDIT: In the attached file, the first set of commands in bank 3 (under the "nextline" heading) might be overindented, though I've never had that as an issue before. But, trying some other fixes, here's the other error I get if the compilation doesn't crash upon hitting bank 3:
--- Unresolved Symbol List
FASTFETCH 0000 ???? (R )
3185 bytes of ROM space left in bank 1
684 bytes of ROM space left in bank 2
2275 bytes of ROM space left in bank 3
1879 bytes of ROM space left in bank 4
C:\Documents and Settings\Desktop\bB\fall\fall12.bas.asm (5084): error: Illegal Addressing mode 'sta '.
Edited by bjbest60, Sat Dec 8, 2018 6:26 PM.