Prev: 9000 Up: Map Next: 909E
900E: Yin-yang Controller
Used by the routines at Game_Over, ABC8 and Start_1UP_Game.
Player 1 yin-yang functionality.
Yin_Yang_1UP 900E LD A,($AA08) If P1_Points_Awarded is 00 then no point was awarded for 1UP. Jump forward to Yin_Yang_2UP.
9011 AND A
9012 JP Z,Yin_Yang_2UP
Update 1UP yin-yang total.
9015 LD HL,$AA01 Add P1_Points_Awarded to P1_Yin_Yang and update the new total at P1_Yin_Yang.
9018 ADD A,(HL)
9019 LD (HL),A
Check if 1UP yin-yang total is now 01.
901A CP $01 If the total is not 01 then skip forward to Yin_Yang_1UP_2.
901C JR NZ,Yin_Yang_1UP_2
901E LD DE,$92AA Call Yin_Yang_Copy using Yin_Yang_UDG_Half.
9021 LD HL,$0408
9024 CALL Yin_Yang_Copy
9027 RET Return.
Check if 1UP yin-yang total is now 02.
Yin_Yang_1UP_2 9028 CP $02 If the total is not 02 then skip forward to Yin_Yang_1UP_3.
902A JR NZ,Yin_Yang_1UP_3
902C LD DE,$928A Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
902F LD HL,$0408
9032 CALL Yin_Yang_Copy
9035 RET Return.
Check if 1UP yin-yang total is now 03.
Yin_Yang_1UP_3 9036 CP $03 If the total is not 03 then skip forward to Yin_Yang_1UP_4.
9038 JR NZ,Yin_Yang_1UP_4
903A LD DE,$928A Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
903D LD HL,$0408
9040 CALL Yin_Yang_Copy
9043 LD DE,$92AA Call Yin_Yang_Copy using Yin_Yang_UDG_Half.
9046 LD HL,$0108
9049 CALL Yin_Yang_Copy
904C RET Return.
1UP yin-yang total is 04.
Yin_Yang_1UP_4 904D LD DE,$928A Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
9050 LD HL,$0108
9053 CALL Yin_Yang_Copy
9056 RET Return.
Player 2 yin-yang functionality.
Yin_Yang_2UP 9057 LD A,($AA48) If P2_Points_Awarded is 00 then no point was awarded for 2UP, if so then return.
905A AND A
905B RET Z
Update 2UP yin-yang total.
905C LD HL,$AA41 Add P2_Points_Awarded to P2_Yin_Yang and update the new total at P2_Yin_Yang.
905F ADD A,(HL)
9060 LD (HL),A
Check if 2UP yin-yang total is now 01.
9061 CP $01 If the total is not 01 then skip forward to Yin_Yang_2UP_2.
9063 JR NZ,Yin_Yang_2UP_2
9065 LD DE,$92AA Call Yin_Yang_Copy using Yin_Yang_UDG_Half.
9068 LD HL,$1A08
906B CALL Yin_Yang_Copy
906E RET Return.
Check if 2UP yin-yang total is now 02.
Yin_Yang_2UP_2 906F CP $02 If the total is not 02 then skip forward to Yin_Yang_2UP_3.
9071 JR NZ,Yin_Yang_2UP_3
9073 LD DE,$928A Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
9076 LD HL,$1A08
9079 CALL Yin_Yang_Copy
907C RET Return.
Check if 2UP yin-yang total is now 03.
Yin_Yang_2UP_3 907D CP $03 If the total is not 03 then skip forward to Yin_Yang_2UP_4.
907F JR NZ,Yin_Yang_2UP_4
9081 LD DE,$928A Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
9084 LD HL,$1A08
9087 CALL Yin_Yang_Copy
908A LD DE,$92AA Call Yin_Yang_Copy using Yin_Yang_UDG_Half.
908D LD HL,$1D08
9090 CALL Yin_Yang_Copy
9093 RET Return.
2UP yin-yang total is 04.
Yin_Yang_2UP_4 9094 LD DE,$928A Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
9097 LD HL,$1D08
909A CALL Yin_Yang_Copy
909D RET Return.
Prev: 9000 Up: Map Next: 909E