Prev: 64829 Up: Map Next: 64878
64836: Select Magic Knight's room (cheat / debug routine)
Used by the routine at 38205.
64836 EX AF,AF' Switch AF and AF'
64837 LD A,(23728) If cheat-mode-enabled flag is set (see trivia)...
64840 OR A ...
64841 JR NZ,64845 ...then skip ahead to 64845
64843 EX AF,AF' Switch AF and AF'
64844 RET Return
64845 POP HL Remove return address from top of stack
64846 CALL 47989 Set parameters (for cheat routine sound) and play
This entry point is used by the routine at 64878.
64849 LD A,2 Set BORDER to red...
64851 OUT (254),A ...
64853 CALL 64034 Capture keyboard or joystick input loading result into A
64856 BIT 0,A If left pressed...
64858 JR NZ,64883 ...then jump to 64883 (decrease Magic Knight's current room index by 1, wrapping around to 51 if below zero)
64860 BIT 1,A If right pressed...
64862 JR NZ,64906 ...then jump to 64906 (increase Magic Knight's current room index by 1, wrapping around to zero if above 51)
64864 BIT 2,A If up pressed...
64866 JR NZ,64912 ...then jump to 64912 (increase Magic Knight's current room index by 8, wrapping around to zero if above 51)
64868 BIT 3,A If down pressed...
64870 JR NZ,64919 ...then jump to 64919 (decrease Magic Knight's current room index by 8, wrapping around to 51 if below zero)
64872 BIT 4,A If fire pressed...
64874 JR NZ,64926 ...then jump to 64926 (exit cheat / debug mode)
64876 JR 64849 Loop back to 64849
Prev: 64829 Up: Map Next: 64878