49
edits
(Document ROM and Speedlock core loops.) |
(Document Alkatraz loading routine(s).) |
||
Line 35: | Line 35: | ||
This is essentially identical to the ROM loader, but just without the <code>RET NC</code> which aborts if space is pressed during the ROM loading routine. | This is essentially identical to the ROM loader, but just without the <code>RET NC</code> which aborts if space is pressed during the ROM loading routine. | ||
=== Alkatraz === | |||
The Alkatraz loader, used in games like [https://spectrumcomputing.co.uk/index.php?cat=96&id=41 720°] and [https://spectrumcomputing.co.uk/index.php?cat=96&id=996 Cobra]. | |||
LD-SAMPLE INC B | |||
JR NZ,LD-SAMPLE2 | |||
JP <somewhere else> | |||
LD-SAMPLE2 IN A,(FE) | |||
RRA | |||
RET Z | |||
XOR C | |||
AND 20 | |||
JR Z,LD-SAMPLE | |||
This again isn't that different from the ROM loader; the minor changes are: | |||
* Inverting the "no edge found" condition | |||
* Using a <code>JP</code> if an edge is not found rather than a <code>RET</code> | |||
* Not setting the high byte of the <code>IN</code> - this isn't critical as it affects only which keyboard half-rows are scanned | |||
* Replacing the RET NC with a RET Z. I ''think'' this makes it essentially a no-op unless lots of keys are pressed at once. | |||
==== "Variant" Alkatraz ==== | |||
A very close variant of the Alkatraz loader, seen only in three late era Spectrum games: [https://spectrumcomputing.co.uk/index.php?cat=96&id=1993 Gauntlet III], [https://spectrumcomputing.co.uk/index.php?cat=96&id=3567 Out Run Europa] and [https://spectrumcomputing.co.uk/index.php?cat=96&id=4421 Shadow Dancer]. | |||
LD-SAMPLE INC B | |||
JR NZ,LD-SAMPLE2 | |||
RET | |||
LD-SAMPLE2 IN A,(FE) | |||
RRA | |||
RET Z | |||
XOR C | |||
AND 20 | |||
JR Z,LD-SAMPLE | |||
This actually makes the Alkatraz routine closer to the original ROM code as it now uses a <code>RET</code> to exit in the "no edge found" case. |
edits