Further Update: I have also fixed the problem described here:
Update: for an optimised solution, see this post on page 3 of this thread:
Here is a patch for the bug that is seen in Jet Set Willy in non-Black rooms, if a Guardian is present that has a different Brightness setting to the Air cells in that room. e.g. The Flying Pig in Emergency Generator.
The following 'new' code should be added - I suggest you locate it between #96f4 and #970b:
7e e6 38 c2 f1 91 dd 7e 01 e6 0f c6 38 e6 47 4f 7e e6 38 a9 4f c3 fd 91
Then the existing code at #91ee to #91fc should be edited as follows (this is based on the suggested starting address for the new code listed above):
c3 f4 96 dd 7e 01 e6 07 4f 7e e6 78 a9 4f 00
(The last byte is a NOPped out spare byte in the guardian-drawing routine.)
The above patch is an amalgamation of two routines in the original Jet Set Willy code (one of which was previously unused, except in Manic Miner). It eliminates the 'Guardian Halo/Shadow' bug in non-Black rooms, whilst allowing a wider range of guardian colours (Bright and non-Bright) in rooms with Black screens).
N.B. There is a simpler fix for the Guardian Halo/Shadow Bug that uses fewer bytes, but it would limit the colour palette of guardians throughout the game. i.e. with the simpler fix in place, all guardians on a given screen must be either Bright or non-Bright - even on Black screens where the Guardian Halo/Shadow Bug doesn't manifest itself. So for example, you would no longer see a Bright Red AND a non-Bright Red Monk in The Forgotten Abbey.
Note also that the way the alternative guardian-drawing routine (a remnant from the Manic Miner code) is implemented, avoids the following bug from occurring:
So the above fix really provides the 'best of both worlds'!
Edited by IRF, 06 March 2018 - 11:29 PM.