There is a random bug in the game. It appears maybe 10% of the time.
Some printf statements revealed the random bug is caused by
isOverlayTileNotBlank[0] wrongly being set to 1.
Well this array is only write accessed 2 places in the whole program so its easy to look at and see that the written code is ok. So its some -other- something that is illegally writing a 1 here, probably a bad subscript error somewhere.
So I logically decided to run the game under the debugger like this:
> run cpr chaos
then I typed:
> d isOverlayTileNotBlank[0]
0
so it starts at the correct value
then I put a watch break on that var so the prog will stop and put the cursor on the offending line of code.
> wb isOverlayTileNotBlank[0]
> g
At this point 1 of 2 things randomly happens:
A: Ramlib gurus with an #80000004
B: cpr reports a bizarre "unknown signal 19", displays some
asm code and locks up the computer.
I tried several times and I also tried:
> wb *isOverlayTileNotBlank
All attempts resulted in crashes.
I haven't used a watch break in years but last time I did, it worked perfectly.
So what is causing watch breaks to fail?
A: My elbox mediator?
B: My elbox/p96/cgx S3 Virge gfx driver?
C: My code is too large? (157000+ lines)
D: I am using the patched version of cpr from aminet which removes those dreadful enforcer hits from the original sasc cpr?
E: Other?
Yes I am using SASC v6.58 which I have used for 512 years or since the 1990s, whichever is less.
I have Apollo 060/50Mhz, 32 megs ram
The only hack I have on my Amiga1200 is the elbox stuff and
MagicMenu. I do not run crazy stuff like Executive or MCP.