spacewar 2b auto-restart patch (extended, nl 30/3/2016) / requires the hyperspace 85 patch / based on a disassembly of the binary tape files / spacewAutoRestartPatch.bin and spaceWarRstrt.bin // patched to limit number of consec explosion frames // patch adds 11 instructions and at least 50 microseconds runtime per frame / locations in spacewar 2b a3=1464 / start of a new game ml1=1540 / property linking to an object's handling routine mtb=3103 / start address of the objects table ntr=3543 / property for the number of torpsedos remaining mex=1703 / address of explosion routine / locations in hyperspace85 (Hyperspace VIci, 2 May 1962) hml=5530 hmx=hml+14 / (5544) / patches into hyperspace85 hmx/ jmp rs0 / replaces "jmp ml1" / start of patch 5610/ rs0, lac mtb / control word of first spaceship sza i / is it not empty? jmp rs1 / empty, restart lac mtb 1 / check second spaceship sza i jmp rs1 lac ntr / add number of remaining torpedoes add ntr 1 / sum them up sza i / any left? jmp rs1 / no, restart scr 440 / operand is 440, 2 high bits, same as "2s" dac rsc / reset rsc to torps remaining / 4 / jmp ml1 / return to main // patch to limit number of consec. explosion frames (nl, 30/3/2016) law mex sas mtb jmp rs3 sas mtb 1 jmp rs3 isp mec / count up explosion frames as in "count mec, ml1" jmp ml1 rs2, dzm mtb / force spaceships to zero state dzm mtb 1 rs3, law i 70 / reset max frames of exploding ships dac mec jmp ml1 mec, 0 // end of infinite explosions fix rs1, isp rsc / count up on rsc jmp ml1 / jump to ml1, if still counting jmp a3 / finished, start a new game (orig. "jmp a", a = 1462) rsc, 0 start 0