Fairlight 2 restart fix

In the 48K version of Fairlight II, it's not possible to complete the game if you die and restart during part 2. This fixes that (see below for more details). Upload a working 48K TZX file and download a patched copy. (Everything runs in your browser and the file is not uploaded anywhere.)

Download patched TZX

What it fixes

When you reach the end of part 1, the game hands the objects you are carrying to part 2. Part 2 gives each carried object a new item id from 07 to 0B, and the door from room 50 to room 51 is locked to the magic wand's new id.

Part 2 also saves a copy of the carried objects, which it restores whenever you lose a life and restart. It makes that copy before the objects get their new ids. After your first death the wand goes back to its part 1 id, so the door never opens and part 2 can't be finished.

The patch moves the copy so that it runs after the renumbering, and it now copies from the live records instead of the handover block.

Template code before and after
Before:
dd8a: fe fe 0f 5b fe 00 fa ff 64  ; copy FA00 -> 5B0F (restart backup)
dd93: ...                         ; unpack inventory, counts, energy
de02: d6 ff 8b                    ; include 8B (renumber carried objects)

After:
dd8a: ...                         ; unpack inventory, counts, energy
ddf9: d6 ff 8b                    ; include 8B (renumber carried objects)
ddfc: fe fe 0f 5b fe a4 9d ff 64  ; copy 9DA4 -> 5B0F (restart backup)