Prev: 5E68 Up: Map Next: 5F6C
5F00: Security Check
Used by the routine at GameEntry.
SecurityCheck 5F00 DI Disable interrupts.
5F01 LD A,($5C79) A=FRAMES+01.
5F04 CP $58 Return if A is not 58.
5F06 RET NZ
Blank the 1UP, 2UP and HI scores.
GameInitialisation 5F07 LD HL,$5E00 Write 00 to A3 bytes starting from 5E00.
5F0A LD DE,$5E01
5F0D LD BC,$00A3
5F10 LD (HL),$00
5F12 LDIR
5F14 LD HL,$FFFF Write FFFF to 5E00.
5F17 LD ($5E00),HL
This entry point is used by the routine at 625C.
SecurityCheck_0 5F1A LD HL,$FFFF Write FFFF to 5E34.
5F1D LD ($5E34),HL
5F20 LD SP,$5E00 Set the stack pointer to 5E00.
5F23 CALL $6175 Call 6175.
5F26 CALL $68A0 Call 68A0.
SecurityCheck_1 5F29 CALL $5F6C Call 5F6C.
5F2C LD A,($5E03) If 5E03 is not zero, call 6483.
5F2F AND A
5F30 CALL NZ,$6483
5F33 LD A,($5E3E) D=5E3E.
5F36 LD D,A
5F37 LD A,$F7 Read from the keyboard;
Port Number Bit
0 1 2 3 4
F7 1 2 3 4 5
5F39 OUT ($FD),A
5F3B IN A,($FE)
5F3D CPL Flip the bits.
Handle 1UP selection.
5F3E BIT 0,A Has key "1" been pressed? ("1 PLAYER GAME").
5F40 JR Z,GameSelect_CheckP2 If not jump to GameSelect_CheckP2.
5F42 RES 1,D
Handle 2UP selection.
GameSelect_CheckP2 5F44 BIT 1,A Has key "2" been pressed? ("2 PLAYER GAME").
5F46 JR Z,GameSelect_CheckKeyboard If not jump to GameSelect_CheckKeyboard.
5F48 SET 1,D
Handle Keyboard selection.
GameSelect_CheckKeyboard 5F4A BIT 2,A Has key "3" been pressed? ("KEYBOARD").
5F4C JP NZ,$5FEF If it has then jump to 5FEF.
5F4F LD A,D Retrieve the original value of 5E3E.
5F50 LD ($5E3E),A Write it to 5E3E.
5F53 LD HL,$5FA8 HL=5FA8.
5F56 LD A,($5E3E) C=5E3E.
5F59 LD C,A
5F5A BIT 1,C
5F5C JR NZ,SecurityCheck_2
5F5E SET 7,(HL)
5F60 INC HL
5F61 RES 7,(HL)
5F63 JR SecurityCheck_1 Jump to SecurityCheck_1.
SecurityCheck_2 5F65 RES 7,(HL)
5F67 INC HL
5F68 SET 7,(HL)
5F6A JR SecurityCheck_1 Jump to SecurityCheck_1.
Prev: 5E68 Up: Map Next: 5F6C