Please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

The Wizard's Warriors

From The Cutting Room Floor
Jump to navigation Jump to search
The Wizard's Warriors

Also known as: Wizard's Warrior (Mastertronic re-release)
Developer: John Jones-Steele
Publishers: Abersoft, Mastertronic (re-release)
Platform: ZX Spectrum
Released in EU: 1983


SourceIcon.png This game has uncompiled source code.


Source Code Fragment

A very large piece of the code remains intact. It can be seen in the .tzx dump starting at 1D27, taking up a little more than 30% of the game's data.

INC A
INC A
CP (IX+0)
JR NZ RND5
‚RND7  SUB 3
JR RND8
‚RND5  LD A,R
AND 3
LD (IX+2),A
LD (IX+3),A
RET
‚INMON LD DE,BSTDR
LD HL,MONTB
LD BC,+84
LDIR
LD IX,BSTDR
LD B,6
LD A,B
LD (BSLFT),A
‚INM1  PUSH BC
LD A,(IX+0)
LD (WHICH),A
LD (MX),A
LD A,(IX+1)
LD (MY),A
LD A,(IX+10)
LD (CFLAG),A
LD A,(IX+2)
LD (CHR),A
CALL PRNCH
LD DE,LNTAB
ADD IX,DE
POP BC
DJNZ INM1
RET
‚SBOXS CALL SET1
LD A,0
CALL 229B
LD A,7
LD (5C8D),A
LD A,2
CALL 1601
CALL 0D6B
LD A,2
CALL 1601
LD HL,SCTAB
LD B,+128
CALL PRNTAB
LD A,1
CALL 1601
LD HL,SCTB1
LD B,+32
CALL PRNTAB
LD A,2
CALL 1601
RET
‚SCTAB 16 12 0 10 5
84 8C 8C 8C 8C 8C
8C 8C 8C 8C 88
16 13 0
85 8B 83 83 83 83
83 83 83 87 8A
16 14 0
85 8A FD 10 7 "0000000"
10 5 FC 85
8A 16 15 0
85 8E 8C 8C 8C 8C
8C 8C 8C 8D 8A
16 12 15 10 2
84 8C 8C 8C 8C 8C
8C 8C 8C 8C 88
16 13 15
85 8B 83 83 83 83
83 83 83 87 8A
16 14 15
85 8A FD 10 7 "0000000"
10 2 FC 85
8A 16 15 15
85 8E 8C 8C 8C 8C
8C 8C 8C 8D 8A
‚SCTB1 16 0 0 10 5
81 83 83 83 83 83
83 83 83 83 82
16 0 15 10 2
81 83 83 83 83 83
83 83 83 83 82
‚CRGHT CALL SET5
LD A,1
CALL 1601
LD HL,CRTMS
LD B,+38
CALL PRNTAB
LD A,2
CALL 1601
RET
‚CRTMS 16 1 0 10 6
"WIZARD'S WARRIORS " 7F
"ABERSOFT " FD "1983"
‚MANML LD IX,MANX
LD A,(IX+5)
AND A
JR NZ MOVMS
LD A,(IX+10)
AND A
JR NZ MOVMS
RET
‚MOVMS LD A,(IX+5)
AND A
JR Z GENNW
LD C,(IX+7)
LD B,(IX+8)
PUSH HL
LD HL,+23697
SET 0,(HL)
LD HL,+23695
LD (HL),7
POP HL
CALL 22E5
LD A,(DELFG)
AND A
JR NZ ENDMS
LD A,(IX+6)
CP 0
JR NZ MV1
DEC (IX+7)
JR MV5
‚MV1   CP 1
JR NZ MV2
DEC (IX+8)
JR MV5
‚MV2   CP 2
JR NZ MV3
INC (IX+8)
JR MV5
‚MV3   CP 3
JR NZ MV5
INC (IX+7)
‚MV5   LD C,(IX+7)
LD B,(IX+8)
LD A,C
CP 9
JR C ENDMS
CP +248
JR NC ENDMS
LD A,B
CP +56
JR C ENDMS
CALL POINT
JR Z PLTMS
‚ENDMS LD (IX+9),1
LD (IX+5),0
XOR A
LD (DELFG),A
LD A,(CURSD)
LD (-17962),A
RET
‚PLTMS LD C,(IX+7)
LD B,(IX+8)
CALL 22E5
RET
‚GENNW LD A,1
LD (-17962),A
LD A,(IX+2)
CP 0
JR NZ GEN1
LD A,(IX+0)
RLCA
RLCA
RLCA
DEC A
LD (IX+7),A
LD A,(IX+1)
NEG
ADD A,+21
RLCA
RLCA
RLCA
LD (IX+8),A
JR GENDN
‚GEN1  CP 1
JR NZ GEN2
LD A,(IX+0)
RLCA
RLCA
RLCA
ADD A,8
LD (IX+7),A
LD A,(IX+1)
NEG
ADD A,+20
RLCA
RLCA
RLCA
DEC A
LD (IX+8),A
JR GENDN
‚GEN2  CP 2
JR NZ GEN3
LD A,(IX+0)
RLCA
RLCA
RLCA
ADD A,8
LD (IX+7),A
LD A,(IX+1)
NEG
ADD A,+22
RLCA
RLCA
RLCA
LD (IX+8),A
JR GENDN
‚GEN3  CP 3
JR NZ GENDN
LD A,(IX+0)
ADD A,2
RLCA
RLCA
RLCA
LD (IX+7),A
LD A,(IX+1)
NEG
ADD A,+21
RLCA
RLCA
RLCA
LD (IX+8),A
‚GENDN LD A,(IX+2)
LD (IX+6),A
LD C,(IX+7)
LD B,(IX+8)
PUSH BC
CALL POINT
POP BC
JP NZ ENDMS
CALL 22E5
LD (IX+5),1
RET
‚GETDR LD A,(STICK)
AND A
JR NZ KEMPS
LD BC,-2050
IN D,(C)
LD BC,-4098
IN E,(C)
XOR A
BIT 4,D
JR Z FNDDR
INC A
BIT 4,E
JR Z FNDDR
INC A
BIT 3,E
JR Z FNDDR
INC A
BIT 2,E
JR Z FNDDR
INC A
‚FNDDR LD (NEWDR),A
XOR A
BIT 0,E
JR NZ GUN
INC A
‚GUN   LD (FIRE),A
RET
‚KEMPS CP 1
JR NZ KEYS
LD BC,1F
IN D,(C)
XOR A
BIT 1,D
JR Z KEMDR
INC A
BIT 2,D
JR Z KEMDR
INC A
BIT 3,D
JR Z KEMDR
INC A
BIT 0,D
JR Z KEMDR
INC A
‚KEMDR LD (NEWDR),A
XOR A
BIT 4,D
JR NZ KEGUN
INC A
‚KEGUN LD (FIRE),A
RET
‚KEYS  LD HL,NEWDR
LD (HL),0
LD BC,FEFE
IN D,(C)
LD A,3
AND D
CP 3
JR NZ KEYDR
INC (HL)
LD BC,7FFE
IN A,(C)
AND 1F
CP 1F
JR N

ORG 70DB
‚CLEAN=63E4
‚SCHI= 6191
‚OPSHT=6188
‚LNTAB=+14
‚BSTDR=6198
‚DEDFG=6176
‚MANX= 6165
‚MANY= 6166
‚MOVMS=690F
‚ROUND=6173
‚TITLE=6F14
‚SET1S=6B60
‚SET2S=6B72
‚WHICH=6171
‚MX=   6164
‚MY=   6163
‚PRNCH=705A
‚MENLF=6174
‚STICK=6181
‚ODSCR=6185
‚NWDSR=6186
‚SCNOW=618A
‚CFLAG=6172
‚MESS= 6184
PRMES
SCORE
RAD1
RAD2
DRAW
ENDRD
GAME
JOYST
INST
DISLF
MVMOL
INST1
000
000
000
‚PRMES PUSH HL
PUSH DE
PUSH BC
CALL SETIT
LD HL,MESTB
LD DE,+12
LD A,(MESS)
LD B,A
LD A,16
RST 10
LD A,+16
RST 10
LD A,+10
RST 10
XOR A
SBC HL,DE
‚PRT1  ADD HL,DE
DJNZ PRT1
LD B,+12
LD A,(MESS)
CP 1
JR NZ PRT2
LD B,6
‚PRT2  LD A,(HL)
RST 10
INC HL
DJNZ PRT2
LD A,(MESS)
CP 1
JR NZ PRT3
LD HL,MESTB+6
LD B,6
‚PRT4  LD A,(HL)
CP +48
JR C PRT5
CALL SET4
JR PRT6
‚PRT5  CALL SET5
‚PRT6  RST 10
INC HL
DJNZ PRT4
‚PRT3  POP BC
POP DE
POP HL
RET
‚SET5  PUSH HL
LD HL,-13487
LD (+23606),HL
POP HL
RET
‚SET4  PUSH HL
LD HL,-14255
LD (+23606),HL
POP HL
RET
‚MESTB " CRYPT   1  "
" THE EAGLE  "
" THE WIZARD "
" THE ABYSS  "
"  COLISEUM  "
"DOUBLE SCORE"
"  ESCAPED   "
‚DRAW  EXX
PUSH HL
EXX
LD HL,+23697
RES 0,(HL)
LD (IY+67),+102
LD (IY+68),0
LD BC,0033
LD DE,0101
CALL 24BA
LD BC,1B00
LD DE,0101
CALL 24BA
LD BC,0033
LD DE,FFFF
CALL 24BA
LD BC,1B00
LD DE,FFFF
CALL 24BA
EXX
POP HL
EXX
LD A,(NEWST)
LD (STICK),A
RET
‚RAD1  
‚RAD2  LD A,(CFLAG)
AND A
RET Z
LD HL,+23697
SET 0,(HL)
LD HL,+23695
LD (HL),7
LD A,(IX+0)
ADD A,A
ADD A,+97
LD C,A
LD A,(IX+1)
ADD A,A
NEG
ADD A,+28
LD B,A
PUSH BC
CALL 22E5
POP BC
INC C
PUSH BC
CALL 22E5
POP BC
DEC B
PUSH BC
CALL 22E5
POP BC
DEC C
CALL 22E5
RET
‚SCORE PUSH HL
PUSH DE
PUSH BC
LD A,(IX+10)
CP 1
JR NZ SCOR1
LD E,1
LD HL,SCNOW+4
JR SCORA
‚SCOR1 CP 2
JR NZ SCOR2
LD E,2
LD HL,SCNOW+4
JR SCORA
‚SCOR2 CP 3
JR NZ SCOR3
LD E,5
LD HL,SCNOW+4
JR SCORA
‚SCOR3 CP 4
JR NZ SCOR4
LD E,1
LD HL,SCNOW+3
JR SCORA
‚SCOR4 LD E,2
LD HL,SCNOW+3
‚SCORA LD A,(NWDSR)
AND A
JR Z SCORB
LD A,E
ADD A,A
LD E,A
CP +10
JR NZ SCORB
LD E,1
DEC HL
‚SCORB LD A,(HL)
ADD A,E
CP +58
JR NC SCORC
LD (HL),A
JR SCORD
‚SCORC SUB +10
LD (HL),A
DEC HL
LD E,1
JR SCORB
‚SCORD LD A,16
RST 10
LD A,14
RST 10
LD A,17
RST 10
LD HL,+23697
RES 0,(HL)
LD HL,SCNOW
LD B,7
‚SCORF LD A,(HL)
RST 10
INC HL
DJNZ SCORF
POP BC
POP DE
POP HL
RET
‚JOYST LD A,6
CALL 229B
LD A,31
LD (5C8D),A
LD A,2
CALL 1601
CALL 0D6B
LD A,2
CALL 1601
LD A,8
LD (+23658),A
CALL SET5
LD HL,JOYTB
‚JOYS1 LD A,(HL)
CP FF
JR Z JOYS2
RST 10
INC HL
JR JOYS1
‚JOYS2 CALL GTKEY
CP "A"
JR C JOYS2
CP "D"
JR NC JOYS2
SUB "A"
LD (NEWST),A
LD A,2
CALL 1601
CALL 0D6B
LD A,2
CALL 1601
LD A,(NEWST)
CP 2
JR NZ JOYS7
LD HL,KEYTB
JR JOYS4
‚JOYS7 LD HL,KYTB2
‚JOYS4 LD A,(HL)
CP FF
JR Z JOYS5
RST 10
INC HL
JR JOYS4
‚JOYS5 LD BC,8
‚JOYS6 DJNZ JOYS6
DEC C
JR NZ JOYS6
CALL GTKEY
‚JOYS3 RET
‚GTKEY CALL 028E
LD C,0
JR NZ GTKEY
CALL 031E
JR NC GTKEY
DEC D
LD E,A
CALL 0333
RET
‚NEWST 0

‚JOYTB "WHICH METHOD OF CONTROL"
" OF"
0D 0D
"YOUR WARRIOR DO YOU "
"WISH TO USE" 0D 0D 0D 0D
" A  AGF JOYSTICK" 0D 0D
" B  KEMPSTON JOYSTICK"
0D 0D
" C  THE KEYBOARD"
0D 0D 0D
" PRESS A B OR C" FF
‚KEYTB "TO MOVE LEFT USE EITHER"
" THE" 0D 0D
"CAPS SHIFT OR Z KEY" 0D
0D
"TO MOVE RIGHT USE X OR "
"C" 0D 0D
"TO MOVE DOWN USE KEYS "
"FROM " 0D 0D
"B TO SPACE" 0D 0D
"TO MOVE UP USE KEYS "
"FROM " 0D 0D
"H TO ENTER" 0D 0D
"TO FIRE THE GUN USE KEY"
"S FROM" 0D 0D
"Y TO P" 0D 0D 0D
‚KYTB2 "   PRESS ANY KEY TO "
"CONTINUE" FF
‚DISLF LD A,(MENLF)
AND A
JR Z DISL2
DEC A
‚DISL2 CP 6
JR C DISLC
LD A,5
‚DISLC LD E,A
LD D,0
LD HL,+23697
RES 0,(HL)
LD HL,+23695
LD (HL),7
LD B,5
LD A,+30
LD (MX),A
LD A,+15
LD (MY),A
LD A,3
LD (WHICH),A
LD A,0
LD (CFLAG),A
CALL SET2
‚DISL1 CALL SET1S
LD A,B
CP 1
JR NZ DISL9
LD A,"^"
JR DISLA
‚DISL9 LD A," "
‚DISLA RST 10
LD A," "
RST 10
CALL SET2S
LD A," "
RST 10
LD A," "
RST 10
LD A,(MY)
SUB 2
LD (MY),A
DJNZ DISL1
LD A,+15
LD (MY),A
LD A,E
AND A
JR Z DISL8
LD B,E
‚DISL4 PUSH BC
CALL PRNCH
POP BC
LD A,(MY)
SUB 2
LD (MY),A
‚DISL3 INC D
DJNZ DISL4
‚DISL8 RET
‚SET2  PUSH HL
LD HL,-15791
LD(+23606),HL
POP HL
RET
‚ENDRD LD A,(ODSCR)
LD (NWDSR),A
XOR A
LD (ODSCR),A
LD A,(-17962)
CP 2
JR NZ YENDR
LD E,5
LD BC,+576
CALL SETAT
JR QENDR
‚YENDR LD A,0
LD (-17962),A
‚QENDR LD E,5
‚XENDR LD BC,0
‚ZENDR DEC BC
LD A,B
OR C
JR NZ ZENDR
DEC E
JR NZ XENDR
LD A,0
LD (-17962),A
LD HL,MESTB+9
‚ENDR2 LD A,(HL)
CP " "
JR NZ ENDR3
LD A,"0"
‚ENDR3 INC A
CP +58
JR NZ ENDR1
LD (HL),+48
DEC HL
JR ENDR2
‚ENDR1 LD (HL),A
LD E,0
LD BC,+576
CALL SETAT
CALL CLTOP
CALL TITLE
LD E,3
LD BC,+576
CALL SETAT
LD E,5
‚ENDRA LD BC,0
‚ENDRB DEC BC
LD A,B
OR C
JR NZ ENDRB
DEC E
JR NZ ENDRA
LD BC,+576
CALL SETAT
CALL CLTOP
LD B,+52
LD HL,CLRTB
‚ENDRZ LD A,(HL)
RST 10
INC HL
DJNZ ENDRZ
CALL SET5
LD A,(NWDSR)
AND A
JR Z ENDRY
LD B,+26
LD HL,DBSMS
‚ENDRX LD A,(HL)
INC HL
RST 10
DJNZ ENDRX
‚ENDRY LD A,(ROUND)
INC A
CP 4
JR Z ENDRW
AND F
CP 0D
JR NZ ENDRS
‚ENDRW LD HL,MENLF
INC (HL)
LD HL,BONMS
LD B,+23
‚ENDRK LD A,(HL)
INC HL
RST 10
DJNZ ENDRK
‚ENDRS LD HL,REDMS
LD B,+21
‚ENDRP LD A,(HL)
INC HL
RST 10
DJNZ ENDRP
LD E,4
LD BC,+576
CALL SETAT
LD E,5
‚ENDRI LD BC,0
‚ENDRQ DEC BC
LD A,B
OR C
JR NZ ENDRQ
DEC E
JR NZ ENDRI
LD BC,+576
CALL SETAT
CALL CLTOP
XOR A
LD (OPSHT),A
RET
‚DBSMS 16 4 4
"THIS CRYPT DOUBLE SCORE"
‚BONMS 16 0F 6
"BONUS PLAYER AWARDED"
‚REDMS 16 9 7
"PREPARE FOR BATTLE"
‚CLTOP LD A,16
RST 10
LD A,0
RST 10
LD A,0
RST 10
LD HL,+23697
RES 0,(HL)
CALL SET2
LD BC,+576
‚CLTO1 LD A," "
RST 10
DEC BC
LD A,B
OR C
JR NZ CLTO1
RET
‚SETAT LD HL,+22528
‚SETA1 LD (HL),E
INC HL
DEC BC
LD A,B
OR C
JR NZ SETA1
RET
‚CLRTB 16 12 0B
"          "
16 13 0B
"          "
16 14 0B
"          "
16 15 0B
"          "
‚MVMOL LD IX,BSTDR
LD DE,LNTAB
LD B,6
‚MVMO4 LD A,(IX+5)
AND A
JR NZ MVMO3
LD A,(IX+0)
AND A
JP Z MVMO2
LD A,(IX+11)
AND A
JP NZ MVMO2
LD A,(IX+10)
CP 4
JP Z MVMO2
CP 8
JR Z MVMO3
LD A,(MANX)
CP (IX+0)
JR NZ MVMOZ
LD A,(IX+2)
CP 0
JR Z MVMO2
CP 3
JR Z MVMO2
JR MVMO1
‚MVMOZ LD A,(MANY)
CP (IX+1)
JR NZ MVMO2
LD A,(IX+2)
CP 1
JR Z MVMO2
CP 2
JR Z MVMO2
‚MVMO1 LD A,R
AND 3F
JR NZ MVMO2
‚MVMO3 PUSH BC
CALL MOVMS
POP BC
LD A,(IX+9)
AND A
JR Z MVMOO
LD (IX+9),0
LD A,(IX+7)
AND 7
JR Z MVMOA
CP 7
JR NZ MVMOB
‚MVMOA LD A,(IX+8)
AND 7
JR Z MVMOO
CP 7
JR Z MVMOO
‚MVMOB LD L,(IX+7)
SRL L
SRL L
SRL L
LD C,(IX+8)
SRL C
SRL C
SRL C
LD A,+21
SUB C
LD C,A
LD A,(MANX)
CP L
JR Z MVMOC
INC A
CP L
JR NZ MVMOO
‚MVMOC LD A,(MANY)
CP C
JR Z MVMOD
INC A
CP C
JR Z MVMOD
JR MVMOO
‚MVMO2 ADD IX,DE
DEC B
JP NZ MVMO4
‚MVMOO RET
‚MVMOD LD A,1
LD (DEDFG),A
RET
‚SETIT CALL SET5
LD HL,+23697
RES 0,(HL)
RET
‚OVEMS 16 5 0A
"GAME OVER"
16 0F 2
"PRESS ANY KEY TO PLAY"
" AGAIN"
‚GAME  LD E,5
‚GAMEA LD BC,0
‚GAMEB DEC BC
LD A,B
OR C
JR NZ GAMEB
DEC E
JR NZ GAMEA
‚GAME  LD E,0
LD BC,+576
CALL SETAT
CALL CLTOP
CALL SET5
LD A,0
LD (-17962),A
LD A,16
RST 10
LD A,14
RST 10
LD A,2
RST 10
LD HL,+23697
RES 0,(HL)
LD HL,+23695
LD (HL),7
CALL SET4
LD DE,SCNOW
LD HL,SCHI
LD B,7
PUSH DE
PUSH HL
‚GAME2 LD A,(DE)
CP (HL)
JR C GAME3
JR NZ GAME4
INC DE
INC HL
DJNZ GAME2
‚GAME4 POP HL
POP DE
PUSH DE
PUSH HL
LD B,7
‚GAME5 LD A,(DE)
LD (HL),A
RST 10
INC HL
INC DE
DJNZ GAME5
‚GAME3 POP HL
POP DE
CALL SET5
LD HL,OVEMS
LD B,+42
‚GAME1 LD A,(HL)
RST 10
INC HL
DJNZ GAME1
CALL GTKEY
LD HL,MESTB+9
LD (HL),"1"
DEC HL
LD (HL)," "
DEC HL
LD (HL)," "
CALL SET4
LD HL,SCNOW
LD A,16
RST 10
LD A,14
RST 10
LD A,17
RST 10
LD B,7
‚GAME9 LD A,"0"
LD (HL),A
RST 10
INC HL
DJNZ GAME9
CALL SET5
CALL CLTOP
LD B,+52
LD HL,CLRTB
‚GAMER LD A,(HL)
RST 10
INC HL
DJNZ GAMER
LD A,(+23728)
CP +27
RET NZ
POP HL
JP CLEAN
‚SET1  PUSH HL
LD HL,+15360
LD (+23606),HL
POP HL
RET
‚QUEST "DO YOU WANT INSTRUCTION"
"S (Y/N)?"
‚INST  LD A,5
CALL 229B
LD A,29
LD (5C8D),A
LD A,8
LD (+23658),A
LD A,2
CALL 1601
CALL 0D6B
LD A,2
CALL 1601
CALL SET1
LD HL,QUEST
LD B,+31
‚INSTA LD A,(HL)
RST 10
INC HL
DJNZ INSTA
CALL GTKEY
CP "Y"
RET NZ
LD A,2
CALL 1601
CALL 0D6B
LD A,2
CALL 1601
LD HL,-9472
‚INST1 LD A,(HL)
CP FF
RET Z
CP FE
JR NZ INST2
PUSH HL
LD HL,KYTB2
LD A,0D
RST 10
LD A,0D
RST 10
‚INST3 LD A,(HL)
CP FF
JR Z INST4
RST 10
INC HL
JR INST3
‚INST4 POP HL
‚TEMP  LD BC,0
‚TEMP1 DEC BC
LD A,B
OR C
JR NZ TEMP1
PUSH HL
CALL GTKEY
LD A,2
CALL 1601
CALL 0D6B
LD A,2
CALL 1601
POP HL
INC HL
JR INST1
‚INST2 RST 10
INC HL
JR INST1