Login
Back to forumSee the full topicGo to last reply

Posted By

Luca
on 2015-09-29
08:00:51
 Re: Myriad crashes

RĂ¼diger has saved a .FRE snapshot file in which if you die (wave 2.7) due to the only one enemy present, it crashes for sure, 100%. This means that something wrong has just happened to the code in that precise condition, and that's weird, because the fault comes out from a bad IRQ clearing, sometimes and somewhere

The game continuously swap SEI and CLI, ans sometimes weird kernel calls are used too, like the tape IRQ or the RS232 one... While playing, your ship's movement is $DB11 driven (SEI), all the rest is IRQ driven (set at $1A2F and called once every two frames:
LDA $FF09
AND #$02
BNE *+5
JMP $FCC3

while the main code simply stays in idle:
.2AA4 CLI
.2AA5 JMP $2AA5

The same occurs when your ship collides, then the IRQ is cleared and the main code jumps to a simple time loosing code. Once finished, a terrible series of JSRs takes the code to reactivate the CLI and to JMP to $E3E4 taking advantage of the tape's IRQ.

If the game crashes, it can be fixed by calling a CLI, the best way to perform this with G 2AA4 of course.



Back to top


Copyright © Plus/4 World Team, 2001-2024