Prev: 76D3 Up: Map Next: 77DB
76D7: Routine at 76D7
Used by the routines at 716E and 7311.
76D7 CALL $692C Call 692C.
76DA LD A,($7825) Return if *7825 is zero.
76DD AND A
76DE RET Z
76DF XOR A Write 00 to *7825.
76E0 LD ($7825),A
76E3 LD A,($782A) Return if *Action is not zero.
76E6 AND A
76E7 RET NZ
76E8 EXX Switch to the shadow registers.
76E9 LD A,C A=C'.
76EA EXX Switch back to the normal registers.
76EB CP $44 Jump to 7744 if A is lower than 44.
76ED JR C,$7744
76EF JR NZ,$7729 Jump to 7729 if A is not equal to 44.
76F1 LD HL,$7840 HL=7840.
76F4 LD A,(HL) Jump to EC2A if *HL is not zero.
76F5 AND A
76F6 JP NZ,$EC2A
76F9 LD (HL),$01 Write 01 to *HL.
76FB CALL $EC0F Call EC0F.
76FE NOP No operation.
76FF LD HL,($7844) HL=*Score+01F4.
7702 LD DE,$01F4
7705 ADD HL,DE
7706 LD ($7844),HL Write HL to *Score.
Print the "THE RACE IS ON!" messaging in the footer.
race-is-on
7709 LD A,$96 A=96 (INK: YELLOW, PAPER: RED FLASH: ON).
770B LD HL,$BAA6 HL=Messaging_RaceIsOn.
770E CALL PrintFooterColourString Call PrintFooterColourString.
7711 CALL Sounds_TheRaceIsOn Call Sounds_TheRaceIsOn.
7714 CALL PrintDemoMode Call PrintDemoMode.
7717 XOR A Write 00 to *7824.
7718 LD ($7824),A
771B INC A Write 01 to *781A.
771C LD ($781A),A
771F LD HL,$0B6E Write 0B6E to *7841.
7722 LD ($7841),HL
7725 NOP No operation.
7726 CALL $6D49 Call 6D49.
7729 CP $46 Jump to 7742 if A is higher than 46.
772B JR NC,$7742
772D LD DE,$0032 HL=*Score+0032.
7730 LD HL,($7844)
7733 ADD HL,DE
7734 LD ($7844),HL Write HL to *Score.
7737 POP HL Restore HL and DE from the stack.
7738 POP DE
7739 PUSH DE Stash DE and HL on the stack.
773A PUSH HL
773B LD HL,$FFFA HL=FFFA.
773E ADD HL,DE HL+=DE.
773F SET 7,(HL) Set bit 7 of *HL.
7741 RET Return.
7742 JR NZ,$77A2 Jump to 77A2 if {} is not zero.
7744 NOP No operation.
7745 NOP
7746 NOP
7747 NOP
7748 NOP
7749 NOP
774A POP HL Restore HL and DE from the stack.
774B POP DE
774C LD HL,($783E) HL=*783E.
774F LD BC,$0008 BC=0008.
7752 LD A,C A=C.
7753 SET 7,(HL) Set bit 7 of *HL.
7755 ADD HL,BC HL+=BC.
7756 DEC A Decrease A by one.
7757 JR NZ,$7753 Jump to 7753 until A is zero.
7759 LD HL,$FFFA HL=FFFA.
775C ADD HL,DE HL+=DE.
775D RES 7,(HL) Reset bit 7 of *HL.
This entry point is used by the routine at EC2A.
775F PUSH HL Stash HL on the stack.
7760 LD B,$06 B=06.
7762 PUSH BC Stash BC on the stack.
7763 CALL RemoveSprite Call RemoveSprite.
7766 CALL $6B2D Call 6B2D.
7769 LD C,$28 C=28.
776B LD HL,$0800 HL=0800.
776E LD A,$02 A=02.
7770 OUT ($FE),A OUT FE
7772 XOR %00010000 Flip bit 4.
7774 LD D,A D=A.
7775 LD B,C B=C.
7776 DJNZ $7776 Decrease counter by one and loop back to 7776 until counter is zero.
7778 DEC HL Decrease HL by one.
7779 LD A,H Is HL zero?
777A OR L
777B LD A,D A=D.
777C JR NZ,$7770 Jump to 7770 if HL is not zero.
777E CALL RemoveSprite Call RemoveSprite.
7781 CALL $7314 Call 7314.
7784 LD C,$14 C=14.
7786 LD HL,$1000 HL=1000.
7789 LD A,$06 A=06.
778B OUT ($FE),A OUT FE
778D XOR %00010000 Flip bit 4.
778F LD D,A D=A.
7790 LD B,C B=C.
7791 DJNZ $7791 Decrease counter by one and loop back to 7791 until counter is zero.
7793 DEC HL Decrease HL by one.
7794 LD A,H Is HL zero?
7795 OR L
7796 LD A,D A=D.
7797 JR NZ,$778B Jump to 778B if HL is not zero.
7799 POP BC Restore BC from the stack.
779A DJNZ $7762 Decrease counter by one and loop back to 7762 until counter is zero.
779C POP HL Restore HL from the stack.
779D SET 7,(HL) Set bit 7 of *HL.
779F JP $6ED4 Jump to 6ED4.
77A2 NOP No operation.
77A3 NOP
77A4 NOP
77A5 NOP
77A6 NOP
77A7 NOP
77A8 LD DE,$03E8 HL=*Score+03E8.
77AB LD HL,($7844)
77AE ADD HL,DE
77AF LD ($7844),HL Write HL to *Score.
77B2 CALL $7420 Call 7420.
77B5 CALL RemoveSprite Call RemoveSprite.
77B8 NOP No operation.
77B9 NOP
77BA NOP
77BB NOP
77BC LD HL,$7839 HL=Lives.
77BF LD (HL),$05 Write 05 to *HL.
77C1 CALL GetLevelPassword Call GetLevelPassword.
Print the "NEW CODE ABCDE-PRESS KEY TO PLAY" messaging in the footer.
new-code
77C4 LD A,$9F A=9F (INK: WHITE, PAPER: MAGENTA FLASH: ON).
77C6 LD HL,$BAC6 HL=Messaging_NewCode.
77C9 CALL PrintFooterColourString Call PrintFooterColourString.
77CC CALL Sounds_LevelComplete Call Sounds_LevelComplete.
LevelComplete_Input 77CF CALL KeyboardInput Call KeyboardInput.
77D2 AND A Jump to LevelComplete_Input until any key is pressed.
77D3 JR Z,LevelComplete_Input
77D5 CALL PrintDemoMode Call PrintDemoMode.
77D8 JP GameInitialisation_0 Jump to GameInitialisation_0.
Prev: 76D3 Up: Map Next: 77DB