Prev: 757E Up: Map Next: 763B
75AA: Print Game Display
game-display
Used by the routine at GameInitialisation.
PrintGameDisplay 75AA CALL ClearScreen Call ClearScreen.
75AD LD A,$05 Write 05 to *Lives.
75AF LD ($7839),A
Set the attributes for the "ground".
75B2 LD H,$5A H=5A.
75B4 LD B,$40 B=40 (counter; two full rows).
GameDisplay_GreenBarLoop 75B6 LD (HL),$04 Write 04 (INK: GREEN, PAPER: BLACK ) to *HL.
75B8 INC L Increment L by one.
75B9 DJNZ GameDisplay_GreenBarLoop Decrease counter by one and loop back to GameDisplay_GreenBarLoop until counter is zero.
Draw the "ground".
75BB LD C,$04 C=04 (counter; how many times to write the byte).
75BD LD HL,$5000 HL=5000 (screen buffer location).
DrawGround_Loop 75C0 LD B,$40 B=40 (counter; two full rows).
DrawGround_WriteLoop 75C2 LD (HL),$55 Write 55 to *HL.
75C4 INC L Increment L by one.
75C5 DJNZ DrawGround_WriteLoop Decrease counter by one and loop back to DrawGround_WriteLoop until counter is zero.
75C7 INC H Increment H by two.
75C8 INC H
75C9 LD L,$00 L=00.
75CB DEC C Decrease C by one.
75CC JR NZ,DrawGround_Loop Jump to DrawGround_Loop until C is zero.
75CE LD C,$03 C=03.
75D0 LD HL,$5A41 HL=5A41 (attribute buffer location).
PrintGameDisplay_0 75D3 LD B,$04 B=04.
PrintGameDisplay_1 75D5 LD (HL),$07 Write 07 (INK: WHITE, PAPER: BLACK ) to *HL.
75D7 INC L Increment L by one.
75D8 DJNZ PrintGameDisplay_1 Decrease counter by one and loop back to PrintGameDisplay_1 until counter is zero.
75DA LD A,L A=L.
75DB ADD A,$1C A+=1C.
75DD LD L,A L=A.
75DE DEC C Decrease C by one.
75DF JR NZ,PrintGameDisplay_0 Jump to PrintGameDisplay_0 until C is zero.
75E1 LD L,$C0 L=C0.
75E3 LD B,$20 B=20.
PrintGameDisplay_2 75E5 LD (HL),$07 Write 07 (INK: WHITE, PAPER: BLACK ) to *HL.
75E7 INC L Increment L by one.
75E8 DJNZ PrintGameDisplay_2 Decrease counter by one and loop back to PrintGameDisplay_2 until counter is zero.
Handles printing "MPH, FUEL, RPM" (bike stats) to the display.
75EA LD C,$03 C=03 (counter; three strings).
75EC LD HL,$C3E0 HL=Messaging_MPH.
75EF EXX Switch to the shadow registers.
75F0 LD DE,$5041 DE'=5041 (screen buffer location).
75F3 EXX Switch back to the normal registers.
GameDisplay_StatsLoop 75F4 LD B,$04 B=04 (counter; number of characters in each string).
75F6 CALL Print_Loop Call Print_Loop.
At the end of each string there are two more bytes which build the up/ down arrow shown above "TARGET". This is hidden by the attributes until it's shown in-game by setting the appropriate attribute values.
75F9 LD A,(HL) A=*HL.
75FA EXX Switch to the shadow registers.
75FB LD L,A L'=A.
75FC LD A,E E'+=0E.
75FD ADD A,$0E
75FF LD E,A
7600 CALL PrintGraphic Call PrintGraphic.
7603 INC L Increment L by one.
7604 EXX Switch back to the normal registers.
7605 CALL PrintGraphic Call PrintGraphic.
7608 INC L Increment L by one.
7609 EXX Switch to the shadow registers.
760A LD A,E E'+=0C.
760B ADD A,$0C
760D LD E,A
760E EXX Switch back to the normal registers.
760F DEC C Decrease C by one.
7610 JR NZ,GameDisplay_StatsLoop Jump to GameDisplay_StatsLoop until C is zero.
Set the screen buffer position.
7612 EXX Switch to the shadow registers.
7613 LD E,$C0 E'=C0.
7615 EXX Switch back to the normal registers.
7616 LD B,$06 B=06 (counter; number of characters in the "SCORE-" string).
7618 CALL Print_Loop Call Print_Loop.
Set the screen buffer position.
761B EXX Switch to the shadow registers.
761C LD E,$D4 E'=D4.
761E EXX Switch back to the normal registers.
761F LD B,$07 B=07 (counter; number of characters in the "TARGET-" string).
7621 CALL Print_Loop Call Print_Loop.
7624 LD HL,$0000 Write 0000 to *Score.
7627 LD ($7844),HL
762A CALL $742C Call 742C.
762D LD HL,($7848) HL=*7848.
7630 EXX Switch to the shadow registers.
7631 LD DE,$51DB DE'=51DB (screen buffer location).
7634 EXX Switch back to the normal registers.
7635 CALL $7434 Call 7434.
7638 JP InitialiseNewGame Jump to InitialiseNewGame.
Prev: 757E Up: Map Next: 763B