Check your .cfg file and see if your data segment is getting too big. There's some alias on Intellivision memorymap that you can't put ROM data on. So at default your game is mapped to $5000-$6FFF. To get around that is to use 'asm org $C100' directive to map the data after this line on to this segment, this segment is the longest memory segment, so you have $C100-$FFFF. There are 4 other segments you can place data on to.
Information here: http://wiki.intelliv...?title=Cart.mac
Other reason for the crashing that your stack might be overflowing. So inserting, 'STACK_CHECK' will stop your program and print stack overflow when the stack is too high. The cause for that is goto-ing out of a gosub, which doesn't pop the data off the stack.
The game is looking really good. Keep up the good work.
Wow! You guys are aware that a lot of people jump to BASIC to get away from convoluted arcana like that?
That's not to say that Vetea can't do it, but perhaps it's time for IntyBASIC to support some simple interface to define ROM segments and switching between them. It doesn't have to be something fancy -- even something like what "Cart.mac" does, which is handled by the assembler instead of the compiler.
I mean, rather than having everyone adding "ASM ORG" statements all over the place, include a way to define a memory map (and include a good default, like "Cart.mac"), and then let programmers use "ROMSEG 0" and "ROMSEG 1" to switch. Even that, with no boundary checks underneath, would be an improvement to the current state of affairs, where most IntyBASIC programmers don't even know what the memory map of the Intellivision is.