Prev: 7125 Up: Map Next: 721A
7130: New Actor
Input
IX Item object
NewActor 7130 LD HL,$5E19 Increment RandomNumber by one.
7133 INC (HL)
7134 LD DE,$0008 Set offset.
7137 ADD IX,DE Set IX to next group of bytes.
7139 PUSH IX Copy IX to HL using the stack.
713B POP HL
The self-modifying code routines change the address here to be either;
Altering Routine Alteration
ResetModifiedCode 5EEC
713C LD BC,$5EEC BC=5EEC.
713F AND A Clear the carry flag
7140 SBC HL,BC
7142 JP C,MainLoop
Holding "SHIFT" pauses the game.
Pause_Loop 7145 LD A,$FE Read from the keyboard;
Port Number Bit
0 1 2 3 4
FE SHIFT Z X C V
7147 OUT ($FD),A
7149 IN A,($FE)
714B BIT 0,A Has the "SHIFT" key been pressed?
714D JR Z,Pause_Loop If it has then jump to Pause_Loop.
714F LD HL,($5E17) HL=see 711E.
7152 INC HL
7153 LD ($5E17),HL
7156 LD H,$00
7158 LD A,R
715A LD C,A
715B LD A,($5E19)
715E ADD A,(HL)
715F ADD A,C
7160 LD ($5E19),A
7163 EX AF,AF'
7164 LD A,($5E16)
7167 CP $03
7169 JR C,NewActor_0
716B LD A,($5E37)
716E CP $06
7170 JR NC,NewActor_0
7172 EX AF,AF'
7173 AND $1F
7175 JR NZ,NewActor_3
7177 LD A,($5E16)
717A CP $06
717C JR NC,NewActor_3
NewActor_0 717E LD A,($5E22)
7181 AND A
7182 JR NZ,NewActor_3
7184 LD A,($5E17)
7187 AND $0F
7189 CP $0A
718B JR NC,NewActor_3
718D LD C,A
718E LD B,$00
7190 LD HL,$5E23
7193 ADD HL,BC
7194 LD A,(HL)
7195 AND A
7196 JR NZ,NewActor_3
7198 LD A,($5E8C)
719B CP $13
719D JR Z,NewActor_3
719F LD A,C
71A0 LD ($5E13),A
71A3 LD A,($5E6C)
71A6 AND $3F
71A8 DEC A
71A9 JR Z,NewActor_1
71AB DEC A
71AC JR NZ,NewActor_3
NewActor_1 71AE LD HL,$5EB4
71B1 LD B,$06
71B3 LD DE,$0008
NewActor_2 71B6 LD A,(HL)
71B7 AND A
71B8 JP Z,$7262
71BB ADD HL,DE
71BC DJNZ NewActor_2
This entry point is used by the routine at 7262.
NewActor_3 71BE LD A,($5E3C)
71C1 AND A
71C2 JP NZ,$721A
71C5 LD A,($5E19)
71C8 AND A
71C9 JP NZ,Message_SprayBugs_0
71CC LD A,($5E17)
71CF AND $0F
71D1 CP $0A
71D3 JP NC,Message_SprayBugs_0
71D6 LD C,A
71D7 LD B,$00
71D9 LD HL,$5E23
71DC ADD HL,BC
71DD LD A,(HL)
71DE AND A
71DF JP NZ,Message_SprayBugs_0
71E2 LD (HL),$FF
71E4 LD IX,$5E3C
71E8 LD A,C
71E9 CP $05
71EB JR NC,$725A
71ED LD (IX+$01),$08
This entry point is used by the routine at 7249.
NewActor_4 71F1 RRCA
71F2 RRCA
71F3 RRCA
71F4 AND $E0
71F6 ADD A,$37
71F8 LD (IX+$02),A
71FB LD A,R
71FD AND $03
71FF CP $03
7201 JR NZ,NewActor_5
7203 XOR A
NewActor_5 7204 ADD A,$0B
7206 LD (IX+$04),$FF
720A LD (IX+$00),A
720D LD (IX+$03),$43
7211 LD (IX+$05),C
This entry point is used by the routine at 7249.
NewActor_6 7214 CALL $64E7
7217 JP Message_SprayBugs_0
Prev: 7125 Up: Map Next: 721A