Prev: AC05 Up: Map Next: AEBF
AC3E: Routine at AC3E
Used by the routine at Main_Game.
fff
Start_1UP_Game AC3E XOR A Write 00 to;
AC3F LD ($AA80),A
AC42 LD ($B05F),A
AC45 LD ($AA06),A
AC48 LD ($AA08),A
AC4B LD ($AA48),A
AC4E INC A Write 01 to;
AC4F LD ($AF35),A
AC52 LD ($AA46),A
AC55 INC A Write 02 to;
AC56 LD ($AA3C),A
AC59 LD ($AF34),A
AC5C CALL Reset_Score Call Reset_Score.
Start_1UP_Game_0 AC5F LD A,($AF35) If AF35 is zero, jump to Start_1UP_Game_1.
AC62 AND A
AC63 JR Z,Start_1UP_Game_1
AC65 DEC A Decrease A by one.
AC66 LD ($AF35),A Write A to AF35.
AC69 CALL Intro_Music Call Intro_Music.
AC6C LD A,($AF34) A=AF34.
AC6F CALL $9200 Call 9200.
AC72 LD B,$00 B=00.
AC74 CALL $AF52 Call AF52.
AC77 CALL Game_Over_13 Call Game_Over_13.
AC7A LD HL,$B035 Point to Hi_Score and call Print_HighScore.
AC7D CALL Print_HighScore
AC80 LD A,($B05F)
AC83 AND $1F
AC85 LD HL,$AF33
AC88 LD (HL),A
AC89 LD B,$01
AC8B CALL Populate_Score_Buffer
AC8E CALL Zero_To_Space
AC91 LD HL,$0022 Point to Score_Buffer and call Print_String.
AC94 LD DE,$B024
AC97 CALL Print_String
AC9A CALL Show_Rank Call Show_Rank.
Start_1UP_Game_1 AC9D CALL New_Round
ACA0 CALL Init_Time
ACA3 CALL Start_1UP_Game_8
ACA6 AND A
ACA7 JP M,Start_1UP_Game_2
ACAA JR Z,Start_1UP_Game_3
ACAC LD HL,$AA3C
ACAF DEC (HL)
ACB0 JR NZ,Start_1UP_Game_0
ACB2 LD (HL),$02
ACB4 CALL $AF27
ACB7 LD A,$01
ACB9 LD ($AF35),A
ACBC LD HL,$B05F
ACBF LD A,(HL)
ACC0 CP $10
ACC2 JR Z,Start_1UP_Game_4
ACC4 ADD A,$01
ACC6 DAA
ACC7 LD (HL),A
ACC8 LD HL,$AA80
ACCB INC (HL)
ACCC JP Start_1UP_Game_0
Start_1UP_Game_2 ACCF CP $81
ACD1 JR NZ,Start_1UP_Game_3
ACD3 CALL Start_1UP_Game_5
ACD6 JP Start_1UP_Game_0
Start_1UP_Game_3 ACD9 XOR A
ACDA RET
Start_1UP_Game_4 ACDB CALL Random_Number
ACDE AND $03
ACE0 ADD A,$07
ACE2 LD ($AA80),A
ACE5 JP Start_1UP_Game_0
Start_1UP_Game_5 ACE8 LD A,$19 Write 19 to;
ACEA LD ($AA0C),A
ACED LD ($AA4C),A
Start_1UP_Game_6 ACF0 XOR A Write 00 to;
ACF1 LD ($AA0D),A
ACF4 LD ($AA0B),A
ACF7 LD ($AA4B),A
ACFA LD ($AA16),A
ACFD LD ($AA56),A
AD00 LD ($AA0D),A
AD03 LD A,$7A Write 7A to;
AD05 LD ($AA18),A
AD08 LD ($AA58),A
Start_1UP_Game_7 AD0B CALL $95D4 Call 95D4.
AD0E CALL $BF13 Call BF13.
AD11 LD A,($AA0D)
AD14 AND A
AD15 JR Z,Start_1UP_Game_7
AD17 RET
Start_1UP_Game_8 AD18 CALL Start_1UP_Game_24
AD1B AND A
AD1C RET M
AD1D CALL $AF01
AD20 JR Z,Start_1UP_Game_10
AD22 CALL Yin_Yang_1UP
AD25 CALL $AF36
AD28 LD A,($AA01)
AD2B CP $04 Check if player 1 has 4 points.
This entry point is used by the routine at B2FB.
Start_1UP_Game_9 AD2D JR NC,Start_1UP_Game_12
AD2F LD A,($AA41)
AD32 CP $04 Check if player 2 has 4 points.
AD34 JP NC,Start_1UP_Game_16
Start_1UP_Game_10 AD37 XOR A
AD38 LD ($AA08),A
AD3B LD ($AA48),A
AD3E LD A,($9C2B)
AD41 AND A
AD42 JR Z,Start_1UP_Game_8
AD44 LD A,($AA01)
AD47 LD HL,$AA41
AD4A CP (HL)
AD4B JR C,Start_1UP_Game_16
AD4D JR Z,Start_1UP_Game_11
AD4F JR Start_1UP_Game_12
Start_1UP_Game_11 AD51 LD A,($AA02)
AD54 LD HL,$AA42
AD57 CP (HL)
AD58 JR C,Start_1UP_Game_15
AD5A JR Z,Start_1UP_Game_17
AD5C CALL Start_1UP_Game_29
Start_1UP_Game_12 AD5F CALL Start_1UP_Game_30
AD62 LD A,($9CA5)
AD65 AND A
AD66 JR Z,Start_1UP_Game_14
AD68 LD BC,$F000
AD6B CALL $AF1D
Start_1UP_Game_13 AD6E LD B,$01
AD70 CALL $AF52
AD73 CALL Time_Tick
AD76 CALL Print_Time
AD79 LD BC,$F000
AD7C CALL $AF1D
AD7F LD A,($9CA5)
AD82 AND A
AD83 JR NZ,Start_1UP_Game_13
AD85 CALL Print_Time
AD88 CALL $AF1A
Start_1UP_Game_14 AD8B CALL Init_Time
AD8E LD A,$01
AD90 RET
Start_1UP_Game_15 AD91 CALL Start_1UP_Game_32
Start_1UP_Game_16 AD94 CALL Start_1UP_Game_33
AD97 XOR A
AD98 RET
Start_1UP_Game_17 AD99 LD A,$81
AD9B RET
This entry point is used by the routine at Main_Game.
Start_2UP_Game AD9C XOR A Write 00 to;
AD9D LD ($B05F),A
ADA0 LD ($AA06),A
ADA3 LD ($AA46),A
ADA6 LD ($AA08),A
ADA9 LD ($AA48),A
ADAC LD A,$02 Write 02 to;
ADAE LD ($AF34),A
ADB1 CALL Intro_Music
ADB4 CALL New_Round
ADB7 CALL Reset_Score
Start_1UP_Game_18 ADBA LD A,($AF34)
ADBD CALL $9200
ADC0 CALL Game_Over_13
ADC3 LD B,$00
ADC5 CALL $AF52
ADC8 LD B,$00
ADCA CALL $AF97
ADCD LD HL,$B038
ADD0 CALL Print_HighScore
ADD3 CALL Game_Over_13
ADD6 CALL Init_Time
ADD9 XOR A
ADDA LD ($9C2B),A
ADDD CALL Start_1UP_Game_23
ADE0 AND A
ADE1 RET M
ADE2 CALL $AF27
ADE5 CALL Intro_Music
ADE8 LD HL,$B05F
ADEB INC (HL)
ADEC LD A,(HL)
ADED CP $04
ADEF JR Z,Start_1UP_Game_19
ADF1 JR Start_1UP_Game_18
Start_1UP_Game_19 ADF3 CALL Check_HighScore
ADF6 LD A,($A6B6)
ADF9 AND A
ADFA JR Z,Start_1UP_Game_20
ADFC DEC A
ADFD JR NZ,Start_1UP_Game_21
ADFF CALL Start_1UP_Game_29
AE02 CALL Start_1UP_Game_30
AE05 JR Start_1UP_Game_22
Start_1UP_Game_20 AE07 CALL Start_1UP_Game_5
AE0A JR Start_1UP_Game_22
Start_1UP_Game_21 AE0C CALL Start_1UP_Game_32
AE0F CALL Start_1UP_Game_33
Start_1UP_Game_22 AE12 XOR A
AE13 RET
Start_1UP_Game_23 AE14 CALL Start_1UP_Game_24
AE17 AND A
AE18 RET M
AE19 CALL New_Round
AE1C CALL $AF36
AE1F LD A,($9C2B)
AE22 AND A
AE23 JR Z,Start_1UP_Game_23
AE25 RET
This entry point is used by the routine at Demo_Mode.
Start_1UP_Game_24 AE26 CALL $9CA8
Start_1UP_Game_25 AE29 CALL Game_Over
AE2C AND A
AE2D RET M
AE2E LD A,($AA44)
AE31 CP $11
AE33 JR Z,Start_1UP_Game_26
AE35 LD A,($AA04)
AE38 CP $11
AE3A JR Z,Start_1UP_Game_27
AE3C LD HL,$A90D
AE3F ADD A,L
AE40 LD L,A
AE41 LD A,(HL)
AE42 AND A
AE43 JR NZ,Start_1UP_Game_26
AE45 LD A,($AA44)
AE48 LD HL,$A90D
AE4B ADD A,L
AE4C LD L,A
AE4D LD A,(HL)
AE4E AND A
AE4F JR NZ,Start_1UP_Game_27
Start_1UP_Game_26 AE51 XOR A Write 00 to;
AE52 LD ($C427),A
AE55 JR Start_1UP_Game_28 Jump to Start_1UP_Game_28.
Start_1UP_Game_27 AE57 LD A,$01 Write 01 to;
AE59 LD ($C427),A
Start_1UP_Game_28 AE5C LD A,($9C28) Return if 9C28 is not zero.
AE5F AND A
AE60 RET NZ
AE61 LD A,($9C2B) Jump to Start_1UP_Game_25 if 9C2B is not zero.
AE64 AND A
AE65 JR Z,Start_1UP_Game_25
AE67 LD A,$1C Write 1C to;
AE69 LD ($AA0C),A
AE6C LD ($AA4C),A
AE6F CALL Start_1UP_Game_6 Call Start_1UP_Game_6.
AE72 CALL $AF1A Call AF1A.
AE75 CALL $AF1A Call AF1A.
Start_1UP_Game_29 AE78 RET Return.
AE79 RET
This entry point is used by the routine at Demo_Mode.
Start_1UP_Game_30 AE7A LD A,$19
AE7C LD ($AA0C),A
AE7F LD A,$7A
AE81 LD ($AA18),A
AE84 XOR A
AE85 LD ($AA0B),A
AE88 LD ($AA16),A
AE8B LD ($C427),A
Start_1UP_Game_31 AE8E CALL $95D4
AE91 CALL $BF13
AE94 LD A,($AA0D)
AE97 AND A
AE98 JR Z,Start_1UP_Game_31
AE9A RET
Start_1UP_Game_32 AE9B RET
AE9C RET
This entry point is used by the routine at Demo_Mode.
Start_1UP_Game_33 AE9D LD A,$19
AE9F LD ($AA4C),A
AEA2 LD A,$7A
AEA4 LD ($AA58),A
AEA7 XOR A
AEA8 LD ($AA4B),A
AEAB LD ($AA56),A
AEAE INC A
AEAF LD ($C427),A
Start_1UP_Game_34 AEB2 CALL $95D4
AEB5 CALL $BF13
AEB8 LD A,($AA4D)
AEBB AND A
AEBC JR Z,Start_1UP_Game_34
AEBE RET
Prev: AC05 Up: Map Next: AEBF