Prev: 93C2 Up: Map Next: 954D
93F8: Routine at 93F8
Used by the routines at 926B and StartGame.
93F8 LD HL,$0000 Write 0000 to 938A.
93FB LD ($938A),HL
93FE CALL DrawFrame Call DrawFrame.
9401 LD HL,$BF00 HL=BF00 (screen co-ordinates).
9404 LD DE,$922B DE=922B.
9407 CALL $B61C Call B61C.
940A LD HL,$B708 HL=B708 (screen co-ordinates).
940D LD DE,$9387 DE=9387.
9410 CALL $B61C Call B61C.
9413 LD HL,$4718 HL=4718 (screen buffer location).
9416 LD DE,$938C DE=938C.
9419 CALL PrintLine_15 Call PrintLine_15.
941C LD HL,$47C8 HL=47C8 (screen buffer location).
941F LD DE,$93C2 DE=93C2.
9422 CALL PrintLine_15 Call PrintLine_15.
9425 LD HL,$B7EE HL=B7EE.
9428 LD DE,$9561 DE=9561.
942B CALL $92A3 Call 92A3.
942E LD HL,$B7F6 HL=B7F6.
9431 LD DE,$956B DE=956B.
9434 CALL $92A3 Call 92A3.
9437 LD DE,$954D DE=Messaging_1UP.
943A LD B,$0F B=0F.
943C CALL $B796 Call B796.
943F LD HL,($92BD) HL=*92BD.
9442 LD DE,$92C1 DE=92C1.
9445 CALL PrintLine_15 Call PrintLine_15.
9448 LD HL,($92BF) HL=*92BF.
944B LD DE,$9303 DE=9303.
944E CALL PrintLine_15 Call PrintLine_15.
9451 LD HL,($8D46) HL=*8D46.
9454 INC HL Increment HL by one.
9455 LD ($8D46),HL Write HL to *8D46.
9458 BIT 6,H Jump to 927F if bit 6 of H is set.
945A JP NZ,$927F
945D CALL $8EB4 Call 8EB4.
9460 LD DE,($B7E5) DE=*GameMode.
9464 LD A,$F7 A=F7.
9466 CALL $97A7 Call 97A7.
9469 BIT 0,A Jump to 9478 if bit 0 of A is not set.
946B JR Z,$9478
946D LD A,E Jump to 94B1 if E is zero.
946E AND A
946F JR Z,$94B1
9471 LD E,$00 E=00.
9473 LD HL,$9571 HL=Messaging_1Player.
9476 JR $9494 Jump to 9494.
9478 BIT 2,A Jump to 9488 if bit 2 of A is not set.
947A JR Z,$9488
947C LD A,E A=E.
947D CP $02 Jump to 94B1 if A is equal to 02.
947F JR Z,$94B1
9481 LD E,$02 E=02.
9483 LD HL,$9592 HL=Messaging_DoublePlay.
9486 JR $9494 Jump to 9494.
9488 BIT 1,A Jump to 94B1 if bit 1 of A is not set.
948A JR Z,$94B1
948C DEC E Decrease E by one.
948D JR Z,$94B1 Jump to 94B1 until E is zero.
948F LD E,$01 E=01.
9491 LD HL,$9581 HL=Messaging_2Players.
9494 LD A,E Write E to *GameMode.
9495 LD ($B7E5),A
9498 ADD A,A E=2F+E*10.
9499 ADD A,A
949A ADD A,A
949B ADD A,A
949C ADD A,$2F
949E LD E,A
949F LD D,$00 D=00.
94A1 LD ($9618),DE Write DE to *9618.
94A5 PUSH HL Stash HL on the stack.
94A6 LD DE,($9614) DE=*9614.
94AA CALL PrintLine Call PrintLine.
94AD POP HL Restore HL from the stack.
94AE LD ($9614),HL Write HL to *9614.
94B1 LD A,($938A) A=*938A.
94B4 AND A Set flags.
94B5 JR Z,$94BD Jump to 94BD if {} is zero.
94B7 DEC A Decrease A by one.
94B8 LD ($938A),A Write A to *938A.
94BB JR $94F6 Jump to 94F6.
94BD LD A,$FD A=FD.
94BF CALL $97A7 Call 97A7.
94C2 RRA RRA.
94C3 JR NC,$94F6 Jump to 94F6 if {} is higher.
94C5 LD A,($B7EF) A=*B7EF.
94C8 INC A Increment A by one.
94C9 AND %00000011 Keep only bits 0-1.
94CB LD ($B7EF),A Write A to *B7EF.
94CE LD HL,($92BD) HL=*92BD.
94D1 LD DE,$9345 DE=9345.
94D4 CALL PrintLine_15 Call PrintLine_15.
94D7 LD A,($92BE) A=*92BE.
94DA ADD A,$10 A+=10.
94DC CP $A0 Jump to 94E2 if A is lower than A0.
94DE JR C,$94E2
94E0 LD A,$6C A=6C.
94E2 LD ($92BE),A Write A to *92BE.
94E5 LD HL,($92BD) HL=*92BD.
94E8 LD DE,$92C1 DE=92C1.
94EB CALL PrintLine_15 Call PrintLine_15.
94EE LD A,$FF A=FF.
94F0 LD ($938A),A Write A to *938A.
94F3 CALL $C143 Call C143.
94F6 LD A,($938B) Jump to 9502 if *938B is zero.
94F9 AND A
94FA JR Z,$9502
94FC DEC A Decrease A by one.
94FD LD ($938B),A Write A to *938B.
9500 JR $953C Jump to 953C.
9502 LD A,$7F A=7F.
9504 CALL $97A7 Call 97A7.
9507 AND %00010000 Keep only bits 4.
9509 JR Z,$953C Jump to 953C if the result is zero.
950B LD A,($B7F7) A=*B7F7.
950E INC A Increment A by one.
950F AND %00000011 Keep only bits 0-1.
9511 LD ($B7F7),A Write A to *B7F7.
9514 LD HL,($92BF) HL=*92BF.
9517 LD DE,$9345 DE=9345.
951A CALL PrintLine_15 Call PrintLine_15.
951D LD A,($92C0) A=*92C0.
9520 ADD A,$10 A+=10.
9522 CP $A0 Jump to 9528 if A is lower than A0.
9524 JR C,$9528
9526 LD A,$6C A=6C.
9528 LD ($92C0),A Write A to *92C0.
952B LD HL,($92BF) HL=*92BF.
952E LD DE,$9303 DE=9303.
9531 CALL PrintLine_15 Call PrintLine_15.
9534 LD A,$FF A=FF.
9536 LD ($938B),A Write A to *938B.
9539 CALL $C143 Call C143.
953C LD DE,$9618 DE=9618.
953F CALL $961C Call 961C.
9542 LD A,$EF A=EF.
9544 CALL $97A7 Call 97A7.
9547 AND %00000001 Keep only bits 0.
9549 RET NZ Return if the result is not zero.
954A JP $9451 Jump to 9451.
Prev: 93C2 Up: Map Next: 954D