If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Guardian II: Revenge of the Mutants (ZX Spectrum)

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Guardian II: Revenge of the Mutants

Developer: Citizen Software
Publisher: Hi-Tec Software
Platform: ZX Spectrum
Released in EU: 1990


SourceIcon.png This game has uncompiled source code.


Source Code Fragments

A few sections of the code are left in the game. The code seen below can be seen with a hex editor at the addresses below in the .tap dump of the game.

38DD:

C D:INC D:JR A2
RT CP 20:JR Z,A2:DEC D:DEC D
A2 LD (SY),DE:LD A,(IVF):OR A:JR NZ,AA5:LD A,(YD):LD (LYD),A:LD C,7:CALL PSPRIT
LD A,(CNT):AND 1:JR Z,AA5:CALL TYHIT:JP FX
AA5 LD HL,(YSC):LD (HL),0:INC H:LD (HL),0
LD H,#EF:LD A,(LCX+1):LD D,A:LD A,(YLX+1):SUB D:ADD 112:LD L,A:LD D,(HL)
LD A,(SY):LD L,A:LD H,#EE:LD E,(HL):CALL XYCO:LD A,D:AND 3:CP 2
LD A,240:JR C,JJ7:LD A,15
JJ7 LD (YSC),HL:LD (HL),A:INC H:LD (HL),A
CALL ATXY:LD (HL),71:JP FX

INVISO
DEC A:LD (IVF),A:AND 31:JR NZ,AA7
LD HL,#463F:LD A,(SCAD):SRL A:SRL A:ADD L:LD L,A:LD A,(IVT):ADD L:LD L,A
LD A,(HL):SLA A:LD (HL),A:INC H:LD (HL),A:OR A:JR NZ,AA7
LD HL,IVT:DEC (HL):JR NZ,AA7
XOR A:LD (IVF),A:AA7 CALL TYHIT:JP AA6

TINV
LD A,(IVT):OR A:JP Z,C9:LD A,(IVF):OR A:JP NZ,C9:LD A,(KEYS):AND 128:JP Z,C9
LD DE,(SY):LD A,(LYD):CALL CSPRIT:LD A,250:LD (IVF),A:RET

THREV
LD A,(DFL):OR A:RET NZ
LD A,(CNT):AND 1:JR Z,TINV:LD A,(KEYS):AND 64:JR Z,C9
CALL RND:LD (YLX+1),A:LD A,128:HSG LD (DFL),A:LD DE,(SY):LD A,(LYD):CALL CSPRIT
LD A,40:LD (HB),A:LD BC,0:LD (YSP),BC
LD DE,#1450:LD (SY),DE:XOR A:LD (YD),A:JP WFX
C9 LD BC,#1004:LD A,(YD):OR A:JR NZ,THRI:LD BC,#410
THRI LD A,(KEYS):AND B:LD HL,TST:LD A,(YD):JR Z,A3:BIT 0,(HL):JR NZ,A4
XOR 1:LD (YD),A:SET 0,(HL):JR A4:A3 RES 0,(HL):A4 LD A,(KEYS):AND C
LD HL,(YSP):JR Z,FRIC:LD A,(YD):OR A:LD A,H
JR Z,ACR:CP 254:JR Z,FRIC:LD DE,-8:ADD HL,DE:JR FRIC
ACR CP 1:JR Z,FRIC:LD DE,8:ADD HL,DE
FRIC BIT 7,H:JR NZ,A5:LD A,H:OR L:JR Z,A6:DEC HL:DEC HL:A6 LD (YSP),HL:RET
A5 INC HL:INC HL:LD (YSP),HL:R

40DD:

D (IX),3:LD (IX+12),4
CALL RND:AND 15:SUB 8:ADD (IY+2):LD (IX+2),A
LD A,(IY+4):LD (IX+4),A:CALL RND:AND 7:SUB 4:ADD (IY+5):LD (IX+5),A:LD (IX+3),-1
LD (IX+8),0:LD A,(SX):CP (IX+3):LD A,(SSP):JR C,Z7:NEG:Z7 SRA A:LD (IX+9),A
LD HL,TOT:INC (HL):DEC C:JR

43DD:

8:JP Z,CHUM:CP 7:JP Z,CFBL:CP 12:JP Z,CMCH
NXAL LD DE,16:ADD IX,DE:POP BC:DJNZ LC:JP FX
B5 LD A,40:JR B7:B6 LD A,183:JR B7
OFF LD (IX+3),255:JR NXAL

PAL EXX:LD D,(IX+3):BIT 7,D:JR NZ,NPOS:LD E,(IX+2):LD A,(IX+14):CALL CSPRIT
NPOS LD L,(IX+1):LD H,(I