This should be useful for anyone designing games based on the Manic Miner game engine, who wish to have the option of Willy jumping up beyond the top of caverns (appearing at the bottom), or falling off the bottom of caverns (appearing at the top) - without fear of causing corruption of the game code.
(In the original Bug Byte MM release, this bug affects the layout data of Cavern 07).
Fixing the bug can be achieved using five POKES. Three contiguous spare bytes at #841C-1E are used for this. (Note that the other spare byte at #841B should retain its original value of #30, or else be NOPped out.)
POKE #8405, #1C
POKE #8406 #84
POKE #841C, #C3
POKE #841D, #CC
POKE #841E, #85
POKE 33797, 28
POKE 33798, 132
POKE 33820, 195
POKE 33821, 204
POKE 33822, 133
I've tested these out and they do the job. See the attached files - one is original Manic Miner (Bug Byte version), with a hole created in the floor of the Central Cavern. Drop Willy through the hole [
he dies], then teleport him to 'Miner Willy Meets the Kong Beast' [type 6031769, then press 1+2+3+6 simultaneously] to see the corruption in action.
EDIT: You can also see what happens when Willy jumps up off the top of the screen, thanks to an additional platform placed four cell-rows below the top of the Central Cavern. I've also changed the Air INK in Central Cavern to Yellow - note the brief, temporary & harmless graphical glitch below Willy (in pixel-row 1 of cell-row 10), just as he passes the top of the screen. (N.B. This only occurs when Willy jumps up from the new platform located four rows below the top, not from the platform located three rows below the top - I only added the latter platform in order to break Willy's fall, so that the top-left of the cavern can be accessed quickly and safely by dropping down from the start position at the bottom-left.)
Then the second file is the same as the first, but with the above POKES applied. Repeat the exercise (fall through the hole, then make your way to Kong Beast), and Hey Presto! - there is no screen corruption [EDIT: other than the temporary, harmless effect noted above] and the bug has been fixed!
I'll provide an explanation of how this works when I have more time.
UPDATE: For the Software Projects version of the game, the bug causes corruption of the horizontal guardians in Room 8, which can soon prove to be fatal and prevent the game being completed. This variant of the bug can also be fixed, but one of the POKES is slightly different - swap the fourth POKE above for this one:
POKE #841D, #D2
POKE 33821, 210
Edited by IRF, 01 August 2017 - 11:24 AM.