.JumpToPreview EQUB &4C \ This byte is never executed, as the stack modification \ in the SmoothTileData routine sets the return address \ on the stack to JumpToPreview, and the RTS instruction \ will therefore jump to JumpToPreview+1 (as that's how \ the RTS instruction works) \ \ This byte is the opcode for a JMP instruction, so this \ makes it look like there is a JumpToPreview routine \ that contains the following: \ \ &4C &30 &3F JMP &3F30 \ \ as the BMI instruction below assembles into &30 &3F \ \ This would jump to a valid instruction halfway through \ the ConfigureMachine routine, so this byte, although \ unused, is presumably a JMP opcode to confuse any \ crackers who have reached this point in their analysis BMI PreviewLandscape \ We only get here if the stack has been modified by the \ SmoothTileData routine, which makes the RTS at the end \ end of the GenerateLandscape routine jump here \ \ The penultimate instruction in GenerateLandscape is a \ call to the ProcessTileData routine, which happens to \ set the N flag, so when the RTS instruction jumps here \ using the modified return address, this BMI branch is \ taken, so this instruction is effectively a JMP to the \ PreviewLandscape routineName: JumpToPreview [Show more] Type: Subroutine Category: Cracker protection Summary: An intentionally confusing jump point for controlling the main title loop flow when returning from the GenerateLandscape routineContext: See this subroutine in context in the source code References: This subroutine is called as follows: * SmoothTileCorners (Part 2 of 4) calls JumpToPreview
[X]
Subroutine PreviewLandscape (category: Landscape)
Draw an aerial preview of the landscape