C0E1: Tunnel setup?
tunnel_setup |
C0E1 |
LD A,($C161) |
|
C0E4 |
AND A |
|
C0E5 |
LD A,($C890) |
|
C0E8 |
JR NZ,tunnel_setup_1 |
no_tunnel |
C0EA |
AND A |
|
C0EB |
JR NZ,yes_a_tunnel |
|
C0ED |
XOR A |
|
C0EE |
LD ($A23B),A |
|
C0F1 |
LD H,A |
|
C0F2 |
LD L,A |
|
C0F3 |
LD ($8F82),A |
|
C0F6 |
LD ($8F83),HL |
|
C0F9 |
LD ($8FA7),A |
|
C0FC |
LD ($8FA8),HL |
|
C0FF |
RET |
yes_a_tunnel |
C100 |
LD A,$05 |
|
C102 |
LD ($A23B),A |
|
C105 |
LD HL,$EAF3 |
|
C108 |
LD B,(HL) |
|
C109 |
DEC L |
|
C10A |
LD C,(HL) |
|
C10B |
DEC L |
|
C10C |
DEC L |
|
C10D |
DEC L |
|
C10E |
EXX |
|
C10F |
LD HL,$EAF1 |
|
C112 |
LD D,(HL) |
|
C113 |
DEC L |
|
C114 |
LD E,(HL) |
|
C115 |
DEC L |
|
C116 |
DEC L |
|
C117 |
DEC L |
tunnel_loop |
C118 |
EXX |
|
C119 |
LD D,(HL) |
|
C11A |
DEC L |
|
C11B |
LD E,(HL) |
|
C11C |
PUSH DE |
|
C11D |
DEC L |
|
C11E |
DEC L |
|
C11F |
DEC L |
|
C120 |
EX DE,HL |
|
C121 |
SBC HL,BC |
|
C123 |
POP BC |
|
C124 |
JR C,tunnel_setup_0 |
|
C126 |
EX DE,HL |
|
C127 |
EXX |
|
C128 |
LD B,(HL) |
|
C129 |
DEC L |
|
C12A |
LD C,(HL) |
|
C12B |
DEC L |
|
C12C |
DEC L |
|
C12D |
DEC L |
|
C12E |
EX DE,HL |
|
C12F |
SBC HL,BC |
|
C131 |
JR C,tunnel_setup_0 |
|
C133 |
EX DE,HL |
|
C134 |
LD D,B |
|
C135 |
LD E,C |
|
C136 |
DEC A |
|
C137 |
JR NZ,tunnel_loop |
tunnel_setup_0 |
C139 |
CPL |
|
C13A |
ADD A,$0A |
|
C13C |
LD ($C15E),A |
|
C13F |
LD A,$02 |
|
C141 |
LD ($C161),A |
tunnel_setup_1 |
C144 |
XOR $01 |
|
C146 |
LD ($C2B9),A |
|
C149 |
LD HL,$C15B |
|
C14C |
LD A,$CD |
|
C14E |
LD ($8F82),A |
|
C151 |
LD ($8F83),HL |
|
C154 |
LD ($8FA7),A |
|
C157 |
LD ($8FA8),HL |
|
C15A |
RET |