Prev: A4C8 Up: Map Next: A6FE
A59D: Run the game
Used by the routines at A410 and A4C8.
A59D LD IXh,$02
A5A0 CALL $A929
A5A3 LD HL,$4000
A5A6 LD BC,$1800
A5A9 LD (HL),$00
A5AB INC HL
A5AC DEC BC
A5AD LD A,B
A5AE OR C
A5AF JR NZ,$A5A9
A5B1 LD IXh,$01
A5B4 CALL $A929
A5B7 LD C,$E8
A5B9 LD DE,$AD21
A5BC LD B,$01
A5BE DJNZ $A5CA
A5C0 LD A,(DE)
A5C1 INC DE
A5C2 LD HL,$0C1E
A5C5 CALL $9C40
A5C8 LD B,$08
A5CA LD HL,$4861
A5CD CALL $AB7B
A5D0 DEC C
A5D1 JR NZ,$A5BE
A5D3 LD A,$F7
A5D5 IN A,($FE)
A5D7 AND $0F
A5D9 CP $0F
A5DB JR Z,$A5D3
A5DD LD B,$00
A5DF INC B
A5E0 SRL A
A5E2 JR C,$A5DF
A5E4 LD L,B
A5E5 LD H,$01
A5E7 LD ($733A),HL
A5EA LD B,$F0
A5EC LD HL,$4861
A5EF CALL $AB7B
A5F2 DJNZ $A5EC
A5F4 LD A,$05
A5F6 LD DE,$61A8
A5F9 LD BC,$02A0
A5FC LD HL,$B3B0
A5FF LDIR
A601 DEC A
A602 JR NZ,$A5F9
Initialize the scores
A604 LD HL,$6EC8
A607 LD B,$1E
A609 LD (HL),$00
A60B INC HL
A60C DJNZ $A609
A60E LD B,$05
A610 LD (HL),$0C
A612 INC HL
A613 DJNZ $A610
A615 LD B,$05
A617 LD (HL),$00
A619 INC HL
A61A DJNZ $A617
A61C LD B,$04
A61E LD (HL),$05
A620 INC HL
A621 DJNZ $A61E
A623 LD HL,$9F9E
A626 LD ($AD58),HL
A629 CALL $A960
This entry point is used by the routine at A6FE.
A62C LD A,($733A)
A62F DEC A
A630 JR Z,$A653
A632 LD A,($733B)
A635 ADD A,$19
A637 CALL $9CEB
A63A LD BC,$AD49
A63D LD A,($733B)
A640 ADD A,$30
A642 LD ($AD50),A
A645 LD C,$08
A647 LD DE,$AD49
A64A CALL $A9CE
A64D LD BC,$0000
A650 CALL $A921
Start this level
A653 CALL $AE9C
A656 CALL $A960
A659 LD BC,$0006
A65C LD HL,$6EC8
A65F LD A,($733B)
A662 ADD HL,BC
A663 DEC A
A664 JR NZ,$A662
A666 EX DE,HL
A667 LD HL,$6EC8
A66A LDIR
A66C IM 2
Level has had to end. If there are eggs left, lose a life
A66E LD A,($6EE6)
A671 AND A
A672 JP NZ,$A6FE
A675 LD A,($7347)
A678 AND A
A679 JR Z,$A68D
Level complete - give a bonus
A67B LD B,$00
A67D CALL $A1B8
A680 LD B,$01
A682 CALL $A3A7
A685 LD HL,$1E04
A688 CALL $9CA4
A68B JR $A675
A68D LD D,$02
A68F LD BC,$0000
A692 CALL $A921
A695 DEC D
A696 JR NZ,$A68F
A698 CALL $A968
A69B LD BC,$0006
A69E LD HL,$6EC8
A6A1 LD A,($733B)
A6A4 ADD HL,BC
A6A5 DEC A
A6A6 JR NZ,$A6A4
A6A8 EX DE,HL
A6A9 LD HL,$6EC8
A6AC LDIR
A6AE LD HL,$6EEB
A6B1 INC (HL)
A6B2 LD A,(HL)
A6B3 INC A
A6B4 CP $C8
A6B6 JR C,$A6BC
A6B8 SUB $C8
A6BA JR $A6C2
A6BC CP $64
A6BE JR C,$A6C2
A6C0 SUB $64
A6C2 LD B,$00
A6C4 SUB $0A
A6C6 JR C,$A6CB
A6C8 INC B
A6C9 JR $A6C4
A6CB ADD A,$A8
A6CD LD ($AD59),A
A6D0 LD A,B
A6D1 AND A
A6D2 JR Z,$A6D6
A6D4 ADD A,$9E
A6D6 LD ($AD58),A
A6D9 LD DE,$AD52
A6DC LD C,$08
A6DE CALL $A9CE
A6E1 LD DE,$61A8
A6E4 LD BC,$02A0
A6E7 LD HL,$B110
A6EA LD A,($6EEB)
A6ED AND $07
A6EF INC A
A6F0 ADD HL,BC
A6F1 DEC A
A6F2 JR NZ,$A6F0
A6F4 LDIR
A6F6 LD A,$0C
A6F8 LD ($6EE6),A
A6FB JP $A653
Prev: A4C8 Up: Map Next: A6FE