Prev: D892 Up: Map Next: D97E
D894: Routine at D894
Used by the routine at D97E.
D894 LD HL,$D83A HL=Time.
D897 RES 0,(HL) Reset bit 0 of *HL.
D899 LD HL,$D839 HL=D839.
D89C SET 7,(HL) Set bit 7 of *HL.
D89E CALL Colourise_PreviewGrid Call Colourise_PreviewGrid.
D8A1 LD HL,$5825 HL=5825 (attribute buffer location).
D8A4 LD B,$04 B=04.
D8A6 PUSH BC Stash BC on the stack.
D8A7 LD B,$10 B=10.
D8A9 LD (HL),$00 Write 00 to *HL.
D8AB INC HL Increment HL by one.
D8AC DJNZ $D8A9 Decrease counter by one and loop back to D8A9 until counter is zero.
D8AE LD DE,$0010 HL+=0010.
D8B1 ADD HL,DE
D8B2 POP BC Restore BC from the stack.
D8B3 DJNZ $D8A6 Decrease counter by one and loop back to D8A6 until counter is zero.
D8B5 LD BC,$00FA BC=00FA.
D8B8 DI Disable interrupts.
D8B9 LD D,$0E D=0E.
D8BB LD A,$05 A=05.
D8BD OUT ($FE),A Send to the speaker.
D8BF XOR %00010000 Flip bit 4.
D8C1 LD E,C E=C.
D8C2 DEC E Decrease E by one.
D8C3 JR NZ,$D8C2 Jump to D8C2 if E is not zero.
D8C5 DEC D Decrease D by one.
D8C6 JR NZ,$D8BD Jump to D8BD if D is not zero.
D8C8 DEC BC Decrease BC by one.
D8C9 LD A,B Jump to D8B9 if BC is not zero.
D8CA OR C
D8CB JR NZ,$D8B9
D8CD EI Enable interrupts.
D8CE CALL $E9BF Call E9BF.
D8D1 LD B,$64 B=64.
D8D3 HALT Halt operation (suspend CPU until the next interrupt).
D8D4 DJNZ $D8D3 Decrease counter by one and loop back to D8D3 until counter is zero.
D8D6 DI Disable interrupts.
D8D7 LD HL,$D83A HL=Time.
D8DA LD (HL),$80 Write 80 to *HL.
D8DC CALL $FC6D Call FC6D.
D8DF LD A,($D85E) A=*D85E.
D8E2 INC A Increment A by one.
D8E3 LD D,A D=A.
D8E4 LD E,$7D E=7D.
D8E6 LD H,$01 H=01.
D8E8 LD A,(HL) A=*HL.
D8E9 AND %00011000 Keep only bits 3-4.
D8EB OR %00000101 Set bits 0, 2.
D8ED OUT ($FE),A Set border to the colour held by A.
D8EF INC HL Increment HL by one.
D8F0 LD B,D B=D.
D8F1 DJNZ $D8F1 Decrease counter by one and loop back to D8F1 until counter is zero.
D8F3 DEC E Decrease E by one.
D8F4 JP NZ,$D8E8 Jump to D8E8 if E is not zero.
D8F7 LD HL,$D83A HL=Time.
D8FA BIT 4,(HL) Test bit 4 of *HL.
D8FC JR NZ,$D918 Jump to D918 if E is not zero.
D8FE LD A,($D840) A=*D840.
D901 AND A Set flags.
D902 INC A Increment A by one.
D903 DAA DAA.
D904 LD ($D840),A Write A to *D840.
D907 JR NC,$D912 Jump to D912 if A is higher.
D909 LD A,($D83F) A=*D83F.
D90C CCF Invert the carry flag.
D90D INC A Increment A by one.
D90E DAA DAA.
D90F LD ($D83F),A Write A to *D83F.
D912 CALL Print_Bonus Call Print_Bonus.
D915 JP $D8DC Jump to D8DC.
D918 LD HL,$D841 HL=D841.
D91B LD A,($D876) A=*Score_Digit_03.
D91E AND A Set flags.
D91F ADD A,(HL) A+=*HL.
D920 DAA DAA.
D921 LD ($D876),A Write A to *Score_Digit_03.
D924 LD (HL),$00 Write 00 to *HL.
D926 DEC HL Decrease HL by one.
D927 LD A,($D875) A=*Score_Digit_02.
D92A ADC A,(HL) A+=*HL.
D92B DAA DAA.
D92C LD ($D875),A Write A to *Score_Digit_02.
D92F LD (HL),$00 Write 00 to *HL.
D931 DEC HL Decrease HL by one.
D932 LD A,($D874) A=*Score_Digit_01.
D935 ADC A,(HL) A+=*HL.
D936 DAA DAA.
D937 LD ($D874),A Write A to *Score_Digit_01.
D93A LD (HL),$00 Write 00 to *HL.
D93C LD HL,$F0EA HL=F0EA.
D93F LD B,$23 B=23.
D941 CALL $EF4A Call EF4A.
D944 CALL Print_Bonus Call Print_Bonus.
D947 CALL Print_Score Call Print_Score.
D94A LD A,($D86D) Jump to D96A if *D86D is not equal to 00.
D94D CP $00
D94F JR NZ,$D96A
D951 LD A,($D874) A=*Score_Digit_01.
D954 AND %11110000 Keep only bits 4-7.
D956 RRCA RRCA.
D957 RRCA
D958 RRCA
D959 RRCA
D95A CP $01 Jump to D96A if A is lower than 01 (unsigned comparison).
D95C JP M,$D96A
D95F LD A,$01 Write 01 to *D86D.
D961 LD ($D86D),A
D964 CALL $E9BF Call E9BF.
D967 CALL $E9DA Call E9DA.
D96A LD A,$80 Write 80 to *Bomb.
D96C LD ($D838),A
D96F CALL Handler_PlayerInput Call Handler_PlayerInput.
D972 CP $00 Jump back to D96F until there's any player input.
D974 JR Z,$D96F
D976 XOR A Write 00 to *Bomb.
D977 LD ($D838),A
D97A CALL $EE61 Call EE61.
D97D RET Return.
Prev: D892 Up: Map Next: D97E