Prev: AF27 Up: Map Next: AFDA
AF36: Routine at AF36
Used by the routines at Demo_Mode and Start_1UP_Game.
AF36 LD A,($AA08) Jump to AF7D if P1_Points_Awarded is zero.
AF39 CP $00
AF3B JP Z,$AF7D
AF3E LD HL,$B00B HL=B00B
AF41 LD A,($AA3F) BC=AA3F.
AF44 LD C,A
AF45 LD B,$00
AF47 ADD HL,BC
AF48 LD B,(HL)
AF49 LD A,($AA08)
AF4C CP $01
AF4E JR NZ,$AF52
AF50 SRL B
This entry point is used by the routine at Start_1UP_Game.
AF52 LD A,B fff
AF53 LD HL,$AA02 HL=AA02
AF56 ADD A,(HL)
AF57 LD (HL),A
AF58 LD DE,$B02D $B02D.
AF5B CALL $AFC2 Call AFC2.
AF5E XOR A Write 00 to;
AF5F LD ($AA08),A
AF62 LD A,($9C2C) Return if Num_Players is zero.
AF65 CP $00
AF67 RET Z
Player 1 display score.
AF68 LD HL,$B02F Point to Score_P1.
AF6B LD B,$03 Set a counter of 03.
AF6D CALL Populate_Score_Buffer Call Populate_Score_Buffer.
AF70 CALL Write_00 Call Write_00.
AF73 LD DE,$B024 Point to Score_Buffer and call Print_String.
AF76 LD HL,$0100
AF79 CALL Print_String
AF7C RET Return.
AF7D LD A,($AA48)
AF80 CP $00
AF82 RET Z
AF83 LD HL,$B00B
AF86 LD A,($AA3F)
AF89 LD C,A
AF8A LD B,$00
AF8C ADD HL,BC
AF8D LD B,(HL)
AF8E LD A,($AA48)
AF91 CP $01
AF93 JR NZ,$AF97
AF95 SRL B
This entry point is used by the routine at Start_1UP_Game.
AF97 LD A,B
AF98 LD HL,$AA42
AF9B ADD A,(HL)
AF9C LD (HL),A
AF9D LD DE,$B030
AFA0 CALL $AFC2
AFA3 XOR A
AFA4 LD ($AA48),A
AFA7 LD A,($9C2C)
AFAA CP $02
AFAC RET NZ
Player 2 display score.
AFAD LD HL,$B032 Point to Score_P2.
AFB0 LD B,$03 Set a counter of 03.
AFB2 CALL Populate_Score_Buffer Call Populate_Score_Buffer.
AFB5 CALL Write_00 Call Write_00.
AFB8 LD DE,$B024 Point to Score_Buffer and call Print_String.
AFBB LD HL,$1600
AFBE CALL Print_String
AFC1 RET Return.
Calculate score.
AFC2 LD A,B
AFC3 CP $0A
AFC5 JR NZ,$AFC9
AFC7 LD B,$10
AFC9 LD A,(DE)
AFCA ADD A,B
AFCB DAA
AFCC LD (DE),A
AFCD INC DE
AFCE LD A,(DE)
AFCF ADC A,$00
AFD1 DAA
AFD2 LD (DE),A
AFD3 INC DE
AFD4 LD A,(DE)
AFD5 ADC A,$00
AFD7 DAA
AFD8 LD (DE),A
AFD9 RET Return.
Prev: AF27 Up: Map Next: AFDA