Prev: B4C2 Up: Map Next: B594
B52E: Routine at B52E
Used by the routine at AD36.
B52E DI Disable interrupts.
B52F LD DE,$BA2A DE=BA2A.
B532 CALL $B9BC Call B9BC.
B535 RST $38
B536 LD A,($611E)
B539 CALL Convert_Base10 Call Convert_Base10.
Here we alter "hits" to update with the number of hits.
B53C LD HL,$B660 HL=B660.
B53F LD C,A
B540 RRCA
B541 RRCA
B542 RRCA
B543 RRCA
B544 AND %00001111 Keep only bits 0-3.
B546 JR NZ,$B54A
B548 LD A,$F0
B54A ADD A,$30
B54C LD (HL),A
B54D INC HL
B54E LD A,C
B54F AND %00001111 Keep only bits 0-3.
B551 ADD A,$30
B553 LD (HL),A
B554 CALL $8BA5 Call 8BA5.
B557 LD B,$0C B=0C.
B559 PUSH BC Stash BC on the stack.
B55A CALL ControlsPause Call ControlsPause.
B55D CALL Message_MissileLaunch Call Message_MissileLaunch.
B560 LD C,$80 C=80 (pitch).
B562 LD D,$80 D=80 (duration).
B564 CALL PlaySquareWave Call PlaySquareWave.
B567 DEC D
B568 JR NZ,$B564
B56A LD A,$42
B56C LD ($B5DC),A
B56F CALL Message_MissileLaunch
B572 LD A,$56
B574 LD ($B5DC),A
B577 LD HL,$8000 HL=SecurityCheck.
B57A DEC HL
B57B LD A,L
B57C OR H
B57D JR NZ,$B57A
B57F POP BC Restore BC from the stack.
B580 DJNZ $B559
B582 LD DE,$B9DA DE=B9DA.
B585 CALL $B9BC Call B9BC.
B588 CALL $8BA5 Call 8BA5.
B58B CALL Handler_ResetLaserBeamSlots Call Handler_ResetLaserBeamSlots.
B58E CALL ResetAlienStates Call ResetAlienStates.
B591 JP $A2F5 Jump to A2F5.
Prev: B4C2 Up: Map Next: B594