Created
April 9, 2020 08:56
-
-
Save darrylsloan/614adec99090dde6f16253e5c85c58b9 to your computer and use it in GitHub Desktop.
Puzzle game for the Sinclair ZX Spectrum (Z80 assembly language)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; KNIGHTS by Darryl Sloan, 16 May 2018 | |
; Enhanced version: https://spectrumcomputing.co.uk/index.php?cat=96&id=32308 | |
ORG 43000 | |
LASTK EQU 23560 | |
START LD A, 0 ; border black | |
CALL 8859 | |
LD A, 2 ; select upper screen | |
CALL 5633 | |
LD A, 8 ; caps lock on | |
LD (23658), A | |
; fill screen with paper black | |
LD HL, 22528 | |
LD BC, 768 | |
CLSLP LD (HL), 0 | |
INC HL | |
DEC BC | |
LD A, B | |
OR C | |
JR NZ, CLSLP | |
; set up udgs | |
LD HL, UDGS | |
LD (23675), HL | |
; print intro messages | |
LD DE, INTRO1 | |
LD BC, EOINTR1-INTRO1 | |
CALL PRTMSG | |
LD DE, INTRO2 | |
LD BC, EOINTR2-INTRO2 | |
CALL PRTMSG | |
LD DE, INTRO3 | |
LD BC, EOINTR3-INTRO3 | |
CALL PRTMSG | |
CODEENT LD DE, INTRO4 | |
LD BC, EOINTR4-INTRO4 | |
CALL 8252 | |
; player inputs passcode | |
LD DE, CURSPOS ; set print position | |
LD BC, EOCURSP-CURSPOS | |
CALL 8252 | |
; loop 4 times for 4 digits | |
LD B, 4 | |
INPLOOP PUSH BC | |
LD DE, CURFLAS ; print cursor | |
LD BC, EOCURFL-CURFLAS | |
CALL 8252 | |
LD DE, CURSPOS ; retrace 1 step (to allow cursor overwrite) | |
LD BC, EOCURSP-CURSPOS | |
CALL 8252 | |
; scan for keypress | |
LD HL, LASTK ; clear last keypress | |
LD (HL), 0 | |
PAUSE XOR A ; clear carry flag | |
LD A, (LASTK) | |
CP 65 ; if keypress < "A", repeat | |
JR C, PAUSE | |
CP 91 ; if keypress > "Z", repeat | |
JR NC, PAUSE | |
; print keypress | |
RST 16 | |
; store keypress in pcode | |
LD HL, PCODE | |
KSLOOP LD A, (HL) ; scan through pcode until empty slot found | |
CP 0 | |
JR Z, KSTORE | |
INC HL | |
JR KSLOOP | |
KSTORE LD A, (LASTK) | |
LD (HL), A | |
; shift cursor position right by 1 | |
LD A, (CURSPOS+4) | |
INC A | |
LD (CURSPOS+4), A | |
POP BC | |
DJNZ INPLOOP ; repeat until 4 digits entered | |
; locate desired level | |
; copy currently scanned data into lcode | |
CPCODE LD HL, (LEVRES) | |
INC HL | |
LD DE, LCODE | |
LD BC, 4 | |
LDIR | |
; compare pcode with lcode | |
LD A, (LCODE) | |
LD D, A | |
LD A, (PCODE) | |
CP D | |
JR NZ, NEXTLEV | |
LD A, (LCODE+1) | |
LD D, A | |
LD A, (PCODE+1) | |
CP D | |
JR NZ, NEXTLEV | |
LD A, (LCODE+2) | |
LD D, A | |
LD A, (PCODE+2) | |
CP D | |
JR NZ, NEXTLEV | |
LD A, (LCODE+3) | |
LD D, A | |
LD A, (PCODE+3) | |
CP D | |
JR NZ, NEXTLEV | |
JR SETUPLV ; code accepted, jump to setupbg | |
DJNZ CPCODE | |
; scan forward until next 0 marker in data | |
NEXTLEV LD HL, (LEVRES) | |
SCANFWD INC HL | |
LD A, (HL) | |
CP 255 ; end of data marker met, error in player's code entry | |
JR Z, CODEERR | |
CP 0 | |
JR NZ, SCANFWD | |
LD (LEVRES), HL ; store new data restore point | |
LD A, (LEVEL) ; increase level count | |
INC A | |
LD (LEVEL), A | |
JR CPCODE ; jump back to scan new level code | |
; when user enters a wrong code | |
CODEERR LD A, 1 ; reset level variables | |
LD (LEVEL), A | |
LD HL, LEVDAT | |
LD (LEVRES), HL | |
LD A, 28 | |
LD (CURSPOS+4), A | |
LD A, 0 | |
LD (PCODE), A | |
LD (PCODE+1), A | |
LD (PCODE+2), A | |
LD (PCODE+3), A | |
LD DE, BADCODE | |
LD BC, EOBADCO-BADCODE | |
CALL PRTMSG | |
JP CODEENT | |
; set data restore point to start of level data | |
SETUPLV LD (LEVRES), HL | |
; if level>9 then stage=2, width=4, height=3 | |
XOR A ; reset flags | |
LD A, (LEVEL) | |
CP 9 | |
JR Z, SETUPBG ; if level=9, exit | |
JR C, SETUPBG ; if level<9, exit | |
LD A, 2 ; else make changes | |
LD (STAGE), A | |
LD A, 4 | |
LD (WIDTH), A | |
LD A, 10 | |
LD (LSTART), A | |
LD A, 21 | |
LD (LFIN), A | |
; if level>21 then stage=3, width=4, height=4 | |
XOR A ; reset flags | |
LD A, (LEVEL) | |
CP 21 | |
JR Z, SETUPBG ; if level=21, exit | |
JR C, SETUPBG ; if level<21, exit | |
LD A, (STAGE) ; else make changes | |
LD A, 3 | |
LD (STAGE), A | |
LD A, 4 | |
LD (HEIGHT), A | |
LD A, 22 | |
LD (LSTART), A | |
LD A, 37 | |
LD (LFIN), A | |
; if level>37 then stage=4, width=5, height=4 | |
XOR A ; reset flags | |
LD A, (LEVEL) | |
CP 37 | |
JR Z, SETUPBG ; if level=37, exit | |
JR C, SETUPBG ; if level<37, exit | |
LD A, (STAGE) ; else make changes | |
LD A, 4 | |
LD (STAGE), A | |
LD A, 5 | |
LD (WIDTH), A | |
LD A, 38 | |
LD (LSTART), A | |
LD A, 57 | |
LD (LFIN), A | |
; if level>57 then stage=5, width=5, height=5 | |
XOR A ; reset flags | |
LD A, (LEVEL) | |
CP 57 | |
JR Z, SETUPBG ; if level=57, exit | |
JR C, SETUPBG ; if level<57, exit | |
LD A, (STAGE) ; else make changes | |
LD A, 5 | |
LD (STAGE), A | |
LD A, 5 | |
LD (HEIGHT), A | |
LD A, 58 | |
LD (LSTART), A | |
LD A, 82 | |
LD (LFIN), A | |
; print stage & level | |
SETUPBG LD A, (STAGE) ; insert current level in banner | |
ADD A, 48 | |
LD (LEVDISP+9), A | |
; insert level code on banner | |
LD A, (LCODE) | |
LD (LEVDISP+41), A | |
LD A, (LCODE+1) | |
LD (LEVDISP+42), A | |
LD A, (LCODE+2) | |
LD (LEVDISP+43), A | |
LD A, (LCODE+3) | |
LD (LEVDISP+44), A | |
; fill in blank spaces on banner | |
LD A, (LFIN) ; lfin-lstart+1 = number of levels in stage | |
LD HL, LSTART | |
SUB (HL) | |
INC A | |
LD B, A | |
LD HL, LEVDISP+13 | |
LVEMPTY LD A, 157 ; insert empty banner udg | |
LD (HL), A | |
INC HL | |
DJNZ LVEMPTY | |
LD (HL), 158 ; insert close banner udg | |
; fill in completed levels on banner | |
LD A, (LEVEL) | |
LD HL, LSTART | |
SUB (HL) | |
CP 0 | |
JR Z, PRTBANN | |
LD B, A | |
LD HL, LEVDISP+13 | |
LVCOMPL LD A, 156 ; insert crown banner udg | |
LD (HL), A | |
INC HL | |
DJNZ LVCOMPL | |
; print level banner | |
PRTBANN LD DE, LEVDISP | |
LD BC, EOLEVDI-LEVDISP | |
CALL 8252 | |
; store levres in tlevres to facilitate retry of level, if player wishes | |
LD HL, (LEVRES) | |
LD (TLEVRES), HL | |
; print borders of board | |
; print top-left cell | |
LD A, 2 ; reset y position to top | |
LD (BORD1+5), A | |
LD DE, BORD1 | |
LD BC, EOBORD1-BORD1 | |
CALL 8252 | |
; work out width in amount of attr blocks | |
LD A, (WIDTH) | |
LD B, A | |
LD A, 0 | |
BWIDMUL ADD A, 3 | |
DJNZ BWIDMUL | |
LD (WIDTHX3), A | |
; print top row of cells | |
LD B, A | |
BTOP LD A, 160 | |
RST 16 | |
DJNZ BTOP | |
LD A, 159 | |
RST 16 | |
; work out height in amount of attr blocks | |
LD A, (HEIGHT) | |
LD B, A | |
LD A, 0 | |
BHEIMUL ADD A, 3 | |
DJNZ BHEIMUL | |
LD (HEIGHX3), A | |
; print all remaining rows except bottom | |
LD A, (WIDTHX3) ; adjust width | |
ADD A, 3 | |
LD (BORD2+6), A | |
LD A, 3 ; reset rows | |
LD (BORD2+1), A | |
LD (BORD2+5), A | |
LD A, (HEIGHX3) ; loop by number of rows | |
LD B, A | |
BMAIN PUSH BC | |
LD DE, BORD2 | |
LD BC, EOBORD2-BORD2 | |
CALL 8252 | |
LD A, (BORD2+1) | |
INC A | |
LD (BORD2+1), A | |
LD (BORD2+5), A | |
POP BC | |
DJNZ BMAIN | |
; print bottom-left cell | |
LD A, (HEIGHX3) ; work out y position of bottom | |
ADD A, 3 | |
LD (BORD1+5), A | |
LD DE, BORD1 | |
LD BC, EOBORD1-BORD1 | |
CALL 8252 | |
; print bottom row of cells | |
LD A, (WIDTHX3) | |
LD B, A | |
BBOTTOM LD A, 160 | |
RST 16 | |
DJNZ BBOTTOM | |
LD A, 159 | |
RST 16 | |
; print board tiles | |
; y, x loop within loop | |
LD A, (HEIGHT) | |
LD B, A | |
BHLOOP PUSH BC | |
LD A, (WIDTH) | |
LD B, A | |
BWLOOP PUSH BC | |
; print current square | |
LD HL, (LEVRES) | |
LD A, (HL) | |
CP 1 ; print empty square subroutine | |
JR Z, BEMPTY | |
CP 2 ; print blocked square subroutine | |
JP Z, BBLOCK | |
; print square featuring destination circle | |
LD (GDEST+1), A ; put colour (cyan or magenta in ink) | |
LD (GDEST+12), A | |
LD (GDEST+23), A | |
LD (GDEST+32), A | |
LD A, (BCOL) | |
LD (GDEST+3), A | |
LD A, (PY) | |
LD (GDEST+5), A | |
INC A | |
LD (GDEST+17), A | |
INC A | |
LD (GDEST+25), A | |
LD A, (PX) | |
LD (GDEST+6), A | |
LD (GDEST+18), A | |
LD (GDEST+26), A | |
LD DE, GDEST | |
LD BC, EOGDEST-GDEST | |
CALL 8252 | |
; shift restore point forward to next square | |
NEXTSQU LD HL, (LEVRES) | |
INC HL | |
LD (LEVRES), HL | |
LD A, (PX) ; increase x | |
INC A | |
INC A | |
INC A | |
LD (PX), A | |
CALL SWAPCOL ; swap board colour | |
POP BC | |
DJNZ BWLOOP | |
; new row | |
LD A, 3 ; reset x | |
LD (PX), A | |
LD A, (PY) ; increase y | |
INC A | |
INC A | |
INC A | |
LD (PY), A | |
LD A, (WIDTH) ; if width=4 (even), swap BCOL again | |
CP 4 | |
JR NZ, NOSWAP | |
CALL SWAPCOL | |
NOSWAP POP BC | |
DJNZ BHLOOP | |
JR PRINTP ; end of printing board, go to print pieces | |
; print empty square (subroutine) | |
BEMPTY LD A, (BCOL) | |
LD (GEMPTY+3), A | |
LD A, (PY) | |
LD (GEMPTY+5), A | |
INC A | |
LD (GEMPTY+11), A | |
INC A | |
LD (GEMPTY+17), A | |
LD A, (PX) | |
LD (GEMPTY+6), A | |
LD (GEMPTY+12), A | |
LD (GEMPTY+18), A | |
LD DE, GEMPTY | |
LD BC, EOGEMPT-GEMPTY | |
CALL 8252 | |
JR NEXTSQU | |
; print blocked square (subroutine) | |
BBLOCK LD A, (PY) | |
LD (GBLOCK+5), A | |
INC A | |
LD (GBLOCK+11), A | |
INC A | |
LD (GBLOCK+17), A | |
LD A, (PX) | |
LD (GBLOCK+6), A | |
LD (GBLOCK+12), A | |
LD (GBLOCK+18), A | |
LD DE, GBLOCK | |
LD BC, EOGBLOC-GBLOCK | |
CALL 8252 | |
JP NEXTSQU | |
; print knight pieces | |
PRINTP LD A, 3 ; reset x & y | |
LD (PY), A | |
INC A | |
LD (PX), A | |
LD A, 7 ; reset board colour | |
LD (BCOL), A | |
; y, x loop within loop | |
LD A, (HEIGHT) | |
LD B, A | |
PHLOOP PUSH BC | |
LD A, (WIDTH) | |
LD B, A | |
PWLOOP PUSH BC | |
; print current piece | |
LD HL, (LEVRES) | |
LD A, (HL) | |
CP 1 ; skip empty piece | |
JR Z, NEXTPIE | |
; print knight piece | |
LD (GKNIGHT+1), A ; put colour (cyan/green/magenta) in ink | |
LD A, (BCOL) | |
LD (GKNIGHT+3), A | |
LD A, (PY) | |
LD (GKNIGHT+7), A | |
INC A | |
LD (GKNIGHT+11), A | |
INC A | |
LD (GKNIGHT+15), A | |
LD A, (PX) | |
LD (GKNIGHT+8), A | |
LD (GKNIGHT+12), A | |
LD (GKNIGHT+16), A | |
LD DE, GKNIGHT | |
LD BC, EOGKNIG-GKNIGHT | |
CALL 8252 | |
; shift restore point forward to next piece | |
NEXTPIE LD HL, (LEVRES) | |
INC HL | |
LD (LEVRES), HL | |
LD A, (PX) ; increase x | |
INC A | |
INC A | |
INC A | |
LD (PX), A | |
CALL SWAPCOL ; swap board colour | |
POP BC | |
DJNZ PWLOOP | |
; new row | |
LD A, 4 ; reset x | |
LD (PX), A | |
LD A, (PY) ; increase y | |
INC A | |
INC A | |
INC A | |
LD (PY), A | |
LD A, (WIDTH) ; if width=4 (even), swap bcol again | |
CP 4 | |
JR NZ, NOSWAP2 | |
CALL SWAPCOL | |
NOSWAP2 POP BC | |
DJNZ PHLOOP | |
LD A, 7 ; reset bcol to white for top-left start position | |
LD (BCOL), A | |
; cursor movement | |
LD A, 0 ; caps lock off | |
LD (23658), A | |
; initialise cursor to top left (3, 3) | |
LD A, 3 | |
LD (PX), A | |
LD (PY), A | |
CALL GETATTR | |
CALL PTATTR1 | |
; northeast/northwest keypress | |
GAMELP LD BC, $FBFE ; north check | |
IN A, (C) | |
AND %00000001 | |
JR NZ, SKIPNEW | |
LD BC, $DFFE ; east check | |
IN A, (C) | |
AND %00000001 | |
JP Z, MOVENE | |
LD BC, $DFFE ; west check | |
IN A, (C) | |
AND %00000010 | |
JP Z, MOVENW | |
SKIPNEW EQU $ | |
; southeast/southwest keypress | |
LD BC, $FDFE ; south check | |
IN A, (C) | |
AND %00000001 | |
JR NZ, SKIPSEW | |
LD BC, $DFFE ; east check | |
IN A, (C) | |
AND %00000001 | |
JP Z, MOVESE | |
LD BC, $DFFE ; west check | |
IN A, (C) | |
AND %00000010 | |
JP Z, MOVESW | |
SKIPSEW EQU $ | |
; north keypress | |
LD BC, $FBFE | |
IN A, (C) | |
AND %00000001 | |
JP Z, MOVEN | |
; east keypress | |
LD BC, $DFFE | |
IN A, (C) | |
AND %00000001 | |
JP Z, MOVEE | |
; south keypress | |
LD BC, $FDFE | |
IN A, (C) | |
AND %00000001 | |
JP Z, MOVES | |
; west keypress | |
LD BC, $DFFE | |
IN A, (C) | |
AND %00000010 | |
JP Z, MOVEW | |
; select keypress | |
LD A, (LASTK) | |
CP 32 | |
JP Z, SELECT | |
; reload level keypress | |
LD BC, $FBFE | |
IN A, (C) | |
AND %00001000 | |
JP Z, RELOAD | |
JP GAMELP | |
; move north | |
; if already at north end of board, skip move | |
MOVEN LD A, (PY) | |
CP 3 | |
JP Z, GAMELP | |
; execute move | |
LD B, 3 | |
N3SQ PUSH BC | |
CALL PTATTR0 | |
LD A, (PY) | |
DEC A | |
LD (PY), A | |
CALL GETATTR | |
CALL PTATTR1 | |
HALT | |
HALT | |
HALT | |
POP BC | |
DJNZ N3SQ | |
CALL SWAPCOL | |
JP GAMELP | |
; move northeast | |
; if already at north end of board, skip move | |
MOVENE LD A, (PY) | |
CP 3 | |
JP Z, GAMELP | |
; if already at east end of board, skip move | |
LD A, (WIDTH) | |
LD C, A | |
XOR A | |
LD B, 3 | |
WIDX3NE ADD A, c | |
DJNZ WIDX3NE | |
LD B, A | |
LD A, (PX) | |
CP B | |
JP Z, GAMELP | |
; execute move | |
LD B, 3 | |
NE3SQ PUSH BC | |
CALL PTATTR0 | |
LD A, (PX) | |
INC A | |
LD (PX), A | |
LD A, (PY) | |
DEC A | |
LD (PY), A | |
CALL GETATTR | |
CALL PTATTR1 | |
HALT | |
HALT | |
HALT | |
POP BC | |
DJNZ NE3SQ | |
JP GAMELP | |
; move east | |
; if already at east end of board, skip move | |
MOVEE LD A, (WIDTH) | |
LD C, A | |
XOR A | |
LD B, 3 | |
WIDX3E ADD A, c | |
DJNZ WIDX3E | |
LD B, A | |
LD A, (PX) | |
CP B | |
JP Z, GAMELP | |
; execute move | |
LD B, 3 | |
E3SQ PUSH BC | |
CALL PTATTR0 | |
LD A, (PX) | |
INC A | |
LD (PX), A | |
CALL GETATTR | |
CALL PTATTR1 | |
HALT | |
HALT | |
HALT | |
POP BC | |
DJNZ E3SQ | |
CALL SWAPCOL | |
JP GAMELP | |
; move southeast | |
; if already at south end of board, skip move | |
MOVESE LD A, (HEIGHT) | |
LD C, A | |
XOR A | |
LD B, 3 | |
HIGX3SE ADD A, c | |
DJNZ HIGX3SE | |
LD B, A | |
LD A, (PY) | |
CP B | |
JP Z, GAMELP | |
; if already at east end of board, skip move | |
LD A, (WIDTH) | |
LD C, A | |
XOR A | |
LD B, 3 | |
WIDX3SE ADD A, c | |
DJNZ WIDX3SE | |
LD B, A | |
LD A, (PX) | |
CP B | |
JP Z, GAMELP | |
; execute move | |
LD B, 3 | |
SE3SQ PUSH BC | |
CALL PTATTR0 | |
LD A, (PX) | |
INC A | |
LD (PX), A | |
LD A, (PY) | |
INC A | |
LD (PY), A | |
CALL GETATTR | |
CALL PTATTR1 | |
HALT | |
HALT | |
HALT | |
POP BC | |
DJNZ SE3SQ | |
JP GAMELP | |
; move south | |
; if already at south end of board, skip move | |
MOVES LD A, (HEIGHT) | |
LD C, A | |
XOR A | |
LD B, 3 | |
HIGX3S ADD A, c | |
DJNZ HIGX3S | |
LD B, A | |
LD A, (PY) | |
CP B | |
JP Z, GAMELP | |
; execute move | |
LD B, 3 | |
S3SQ PUSH BC | |
CALL PTATTR0 | |
LD A, (PY) | |
INC A | |
LD (PY), A | |
CALL GETATTR | |
CALL PTATTR1 | |
HALT | |
HALT | |
HALT | |
POP BC | |
DJNZ S3SQ | |
CALL SWAPCOL | |
JP GAMELP | |
; move southwest | |
; if already at south end of board, skip move | |
MOVESW LD A, (HEIGHT) | |
LD C, A | |
XOR A | |
LD B, 3 | |
HIGX3SW ADD A, c | |
DJNZ HIGX3SW | |
LD B, A | |
LD A, (PY) | |
CP B | |
JP Z, GAMELP | |
; if already at west end of board, skip move | |
LD A, (PX) | |
CP 3 | |
JP Z, GAMELP | |
; execute move | |
LD B, 3 | |
SW3SQ PUSH BC | |
CALL PTATTR0 | |
LD A, (PX) | |
DEC A | |
LD (PX), A | |
LD A, (PY) | |
INC A | |
LD (PY), A | |
CALL GETATTR | |
CALL PTATTR1 | |
HALT | |
HALT | |
HALT | |
POP BC | |
DJNZ SW3SQ | |
JP GAMELP | |
; move west | |
; if already at west end of board, skip move | |
MOVEW LD A, (PX) | |
CP 3 | |
JP Z, GAMELP | |
; execute move | |
LD B, 3 | |
W3SQ PUSH BC | |
CALL PTATTR0 | |
LD A, (PX) | |
DEC A | |
LD (PX), A | |
CALL GETATTR | |
CALL PTATTR1 | |
HALT | |
HALT | |
HALT | |
POP BC | |
DJNZ W3SQ | |
CALL SWAPCOL | |
JP GAMELP | |
; move northwest | |
; if already at north end of board, skip move | |
MOVENW LD A, (PY) | |
CP 3 | |
JP Z, GAMELP | |
; if already at west end of board, skip move | |
LD A, (PX) | |
CP 3 | |
JP Z, GAMELP | |
; execute move | |
LD B, 3 | |
NW3SQ PUSH BC | |
CALL PTATTR0 | |
LD A, (PX) | |
DEC A | |
LD (PX), A | |
LD A, (PY) | |
DEC A | |
LD (PY), A | |
CALL GETATTR | |
CALL PTATTR1 | |
HALT | |
HALT | |
HALT | |
POP BC | |
DJNZ NW3SQ | |
JP GAMELP | |
; player selects piece | |
; check if a knight exists under cursor | |
SELECT CALL GETATTR | |
LD DE, 33 ; focus on dead centre, avoiding destination corners | |
ADD HL,de | |
LD A, (HL) | |
CP 120 ; if empty square (white), check move | |
JP Z, CHECKMV | |
CP 72 ; if empty square (blue), check move | |
JP Z, CHECKMV | |
CP 121 ; if blocked square, deselect current | |
JP Z, DESONLY | |
; deselect previous selection (if any) | |
LD A, (TX) ; if no current selection, skip ahead | |
CP 255 | |
JR Z, NEWSEL | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, DESELCT | |
LD A, (TY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR Z, NEWSEL | |
DESELCT CALL DESPREV | |
; select this piece | |
NEWSEL LD A, (BCOL) | |
LD (TBCOL), A ; remember bcol for later | |
CP 7 | |
JR Z, WHITDEC | |
LD A, (HL) | |
SUB 72 | |
JR NOTWHIT | |
WHITDEC LD A, (HL) | |
SUB 120 | |
NOTWHIT LD (TKCOL), A ; match ink to original knight | |
LD (GKFUZZY+1), A | |
LD A, (BCOL) ; match paper to bcol | |
LD (GKFUZZY+3), A | |
LD A, (PY) | |
LD (GKFUZZY+7), A | |
INC A | |
LD (GKFUZZY+11), A | |
INC A | |
LD (GKFUZZY+15), A | |
LD A, (PX) | |
INC A | |
LD (GKFUZZY+8), A | |
LD (GKFUZZY+12), A | |
LD (GKFUZZY+16), A | |
LD DE, GKFUZZY ; print fuzzy (selected) knight | |
LD BC, EOGKFUZ-GKFUZZY | |
CALL 8252 | |
; clear lastk & remember x, y for later | |
LD A, 0 | |
LD (LASTK), A | |
LD A, (PY) | |
LD (TY), A | |
LD A, (PX) | |
LD (TX), A | |
; loop back to player accepting input | |
JP GAMELP | |
; deselect only (no new selection) | |
DESONLY CALL DESPREV | |
JP GAMELP | |
; check if intended move is a valid chess-style move | |
CHECKMV LD A, (TX) | |
ADD A, 3 | |
LD (TTX), A | |
LD A, (TY) | |
SUB 6 | |
LD (TTY), A | |
LD A, (TTX) | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, CHECK2 | |
LD A, (TTY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR NZ, CHECK2 | |
JP EXECMOV | |
CHECK2 LD A, (TX) | |
ADD A, 6 | |
LD (TTX), A | |
LD A, (TY) | |
SUB 3 | |
LD (TTY), A | |
LD A, (TTX) | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, CHECK3 | |
LD A, (TTY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR NZ, CHECK3 | |
JP EXECMOV | |
CHECK3 LD A, (TX) | |
ADD A, 6 | |
LD (TTX), A | |
LD A, (TY) | |
ADD A, 3 | |
LD (TTY), A | |
LD A, (TTX) | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, CHECK4 | |
LD A, (TTY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR NZ, CHECK4 | |
JP EXECMOV | |
CHECK4 LD A, (TX) | |
ADD A, 3 | |
LD (TTX), A | |
LD A, (TY) | |
ADD A, 6 | |
LD (TTY), A | |
LD A, (TTX) | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, CHECK5 | |
LD A, (TTY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR NZ, CHECK5 | |
JP EXECMOV | |
CHECK5 LD A, (TX) | |
SUB 3 | |
LD (TTX), A | |
LD A, (TY) | |
ADD A, 6 | |
LD (TTY), A | |
LD A, (TTX) | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, CHECK6 | |
LD A, (TTY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR NZ, CHECK6 | |
JP EXECMOV | |
CHECK6 LD A, (TX) | |
SUB 6 | |
LD (TTX), A | |
LD A, (TY) | |
ADD A, 3 | |
LD (TTY), A | |
LD A, (TTX) | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, CHECK7 | |
LD A, (TTY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR NZ, CHECK7 | |
JP EXECMOV | |
CHECK7 LD A, (TX) | |
SUB 6 | |
LD (TTX), A | |
LD A, (TY) | |
SUB 3 | |
LD (TTY), A | |
LD A, (TTX) | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, CHECK8 | |
LD A, (TTY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR NZ, CHECK8 | |
JP EXECMOV | |
CHECK8 LD A, (TX) | |
SUB 3 | |
LD (TTX), A | |
LD A, (TY) | |
SUB 6 | |
LD (TTY), A | |
LD A, (TTX) | |
LD B, A | |
LD A, (PX) | |
CP B | |
JR NZ, CHKOVER | |
LD A, (TTY) | |
LD B, A | |
LD A, (PY) | |
CP B | |
JR NZ, CHKOVER | |
JP EXECMOV | |
CHKOVER CALL DESPREV | |
JP GAMELP | |
; execute valid move | |
EXECMOV EQU $ | |
; undraw previous piece | |
LD A, 0 ; ink black to previous knight selection | |
LD (GKWIPE+1), A | |
LD A, (TBCOL) ; match paper to tbcol | |
LD (GKWIPE+3), A | |
LD A, (TY) | |
LD (GKWIPE+7), A | |
INC A | |
LD (GKWIPE+11), A | |
INC A | |
LD (GKWIPE+15), A | |
LD A, (TX) | |
INC A | |
LD (GKWIPE+8), A | |
LD (GKWIPE+12), A | |
LD (GKWIPE+16), A | |
LD DE, GKWIPE ; print space over knight | |
LD BC, EOGKWIP-GKWIPE | |
CALL 8252 | |
; draw new knight | |
LD A, (TKCOL) | |
LD (TKCOL), A ; match ink to original knight | |
LD (GKFUZZY+1), A | |
LD A, (BCOL) ; match paper to bcol | |
LD (GKFUZZY+3), A | |
LD A, (PY) | |
LD (GKFUZZY+7), A | |
INC A | |
LD (GKFUZZY+11), A | |
INC A | |
LD (GKFUZZY+15), A | |
LD A, (PX) | |
INC A | |
LD (GKFUZZY+8), A | |
LD (GKFUZZY+12), A | |
LD (GKFUZZY+16), A | |
LD DE, GKFUZZY ; print fuzzy (selected) knight | |
LD BC, EOGKFUZ-GKFUZZY | |
CALL 8252 | |
LD A, (PY) ; remember x & y for later | |
LD (TY), A | |
LD A, (PX) | |
LD (TX), A | |
; check if level complete (all knights in destinations) | |
CALL PTATTR0 ; remove cursor from screen | |
; y, x loop within loop | |
LD HL, 22627 ; target first attr on top-left of board | |
LD A, 1 ; set win flag (temporarily) | |
LD (WIN), A | |
LD A, (HEIGHT) | |
LD B, A | |
CHLOOP PUSH BC | |
LD A, (WIDTH) | |
LD B, A | |
CWLOOP PUSH BC | |
LD A, (HL) | |
CP 8 ; skip if blank square (blue) | |
JR Z, CWFIN | |
CP 56 ; skip if blank square (white) | |
JR Z, CWFIN | |
CP 57 ; skip if blocked square | |
JR Z, CWFIN | |
LD B, A ; put attr colour in b | |
INC HL ; scan right 1 attr | |
LD A, (HL) ; put attr colour in a | |
DEC HL ; retrace step on screen for later | |
CP B ; if colours don't match, no win | |
JR Z, CWFIN | |
LD A, 0 | |
LD (WIN), A | |
CWFIN INC HL ; move right to next square | |
INC HL | |
INC HL | |
POP BC | |
DJNZ CWLOOP | |
; new row | |
LD DE, 64 ; add two rows | |
ADD HL, DE | |
LD A, (WIDTHX3) ; calculate width of board | |
LD B, A | |
LD A, 32 | |
SUB b | |
LD D, 0 ; move forward extra amount | |
LD E, A | |
ADD HL, DE | |
POP BC | |
DJNZ CHLOOP | |
LD A, (WIN) | |
CP 1 ; check if win still acive | |
JR Z, NEWLEV | |
CALL PTATTR1 | |
JP GAMELP | |
; load new level after a win | |
NEWLEV EQU $ | |
; brief pause | |
LD B, 40 | |
NLPAUSE HALT | |
DJNZ NLPAUSE | |
; clear lastk & increase level count | |
LD A, 0 | |
LD (LASTK), A | |
LD A, (LEVEL) | |
INC A | |
LD (LEVEL), A | |
; has player completed final level of current stage? | |
LD B, A | |
DEC b | |
LD A, (LFIN) | |
CP B | |
JR NZ, FINLEV | |
; insert final crown into banner | |
LD HL, LEVDISP+13 | |
LD A, (LSTART) ; calculate number of levels in stage | |
LD B, A | |
LD A, (LFIN) | |
SUB b | |
LD B, A ; move forward number of levels | |
LASTCRO INC HL | |
DJNZ LASTCRO | |
LD A, 156 ; crown graphic | |
LD (HL), A | |
LD DE, LEVDISP ; print modified banner | |
LD BC, EOLEVDI-LEVDISP | |
CALL 8252 | |
; has player completed final level of game? | |
FINLEV LD HL, (LEVRES) | |
LD A, (HL) | |
CP 255 ; end of data marker reached? | |
JR Z, GAMEWON | |
; grab next level code | |
INC HL | |
LD DE, LCODE | |
LD BC, 4 | |
LDIR | |
LD (LEVRES), HL ; store new data restore point | |
LOADLV LD A, 3 ; reset x & y to top-left of board | |
LD (PY), A | |
LD (PX), A | |
LD A, 255 | |
LD (TY), A | |
LD (TX), A | |
LD A, 7 ; reset bcol | |
LD (BCOL), A | |
JP SETUPLV ; jump back to scan new level code | |
; reload current level | |
RELOAD LD HL, (TLEVRES) | |
JR LOADLV | |
; player completes game | |
GAMEWON LD HL, CONGRAT+1 | |
LD A, 0 | |
LD B, 8 | |
CONGLP0 PUSH BC | |
CONGLP1 LD (HL), A | |
PUSH AF | |
LD DE, CONGRAT | |
LD BC, EOCONGR-CONGRAT | |
CALL 8252 | |
HALT | |
HALT | |
HALT | |
POP AF | |
INC A | |
CP 7 | |
JR NZ, CONGLP1 | |
CONGLP2 LD (HL), A | |
PUSH AF | |
LD DE, CONGRAT | |
LD BC, EOCONGR-CONGRAT | |
CALL 8252 | |
HALT | |
HALT | |
HALT | |
POP AF | |
DEC A | |
CP 0 | |
JR NZ, CONGLP2 | |
POP BC | |
DJNZ CONGLP0 | |
; reset relevant variables and screen positions | |
LD A, 0 | |
LD (PCODE), A | |
LD (PCODE+1), A | |
LD (PCODE+2), A | |
LD (PCODE+3), A | |
LD A, 1 | |
LD (LEVEL), A | |
LD (STAGE), A | |
LD (LSTART), A | |
LD A, 9 | |
LD (LFIN), A | |
LD HL, LEVDAT | |
LD (LEVRES), HL | |
LD A, 3 | |
LD (WIDTH), A | |
LD (HEIGHT), A | |
LD (PY), A | |
LD (PX), A | |
LD A, 255 | |
LD (TY), A | |
LD (TX), A | |
LD A, 7 | |
LD (BCOL), A | |
LD A, 28 ; reset code-entry cursor position | |
LD (CURSPOS+4), A | |
LD HL, LEVDISP+23 ; reset banner graphic | |
LD A, " " | |
LD B, 16 | |
FILL LD (HL), A | |
INC HL | |
DJNZ FILL | |
JP START ; restart game | |
; subroutine: print message and pause (keypress to continue) | |
PRTMSG CALL 8252 | |
LD HL, LASTK | |
LD (HL), 0 | |
LD B, 250 | |
PRTWAIT HALT | |
LD A, (LASTK) | |
CP 0 | |
JR NZ, PRTEND | |
DJNZ PRTWAIT | |
PRTEND RET | |
; subroutine: swap board colour (blue/white) | |
SWAPCOL LD A, (BCOL) | |
CP 7 | |
JR Z, TURNBLU | |
LD A, 7 | |
LD (BCOL), A | |
JR NOTBLUE | |
TURNBLU LD A, 1 | |
LD (BCOL), A | |
NOTBLUE RET | |
; subroutine: work out curattr from x & y | |
GETATTR LD HL, 22528 ; start of attributes | |
LD BC, 0 ; x offset | |
LD A, (PX) | |
LD C, A | |
ADD HL, BC | |
LD A, (PY) ; y offset | |
LD B, A | |
DOWNROW PUSH BC | |
LD BC, 32 | |
ADD HL, BC | |
POP BC | |
DJNZ DOWNROW | |
LD (CURATTR), HL | |
RET | |
; subroutine: print attribute block | |
PTATTR1 LD DE, 30 ; for next line, retracing 2 steps from 32 | |
LD HL, (CURATTR) ; top left attr in block | |
LD B, 3 | |
PTALOO1 LD A, (HL) ; get current value | |
ADD A, 64 ; add 64 to make bright | |
LD (HL), A ; put on screen | |
INC HL ; go to next block on right | |
LD A, (HL) ; repeat 3 times... | |
ADD A, 64 | |
LD (HL), A | |
INC HL | |
LD A, (HL) | |
ADD A, 64 | |
LD (HL), A | |
ADD HL, DE | |
DJNZ PTALOO1 | |
RET | |
; subroutine: unprint attribute block | |
PTATTR0 LD DE, 30 ; for next line, retracing 2 steps from 32 | |
LD HL, (CURATTR) ; top left attr in block | |
LD B, 3 | |
PTALOO2 LD A, (HL) ; get current value | |
SUB 64 ; subtract 64 to turn off brightness | |
LD (HL), A ; put on screen | |
INC HL ; go to next block on right | |
LD A, (HL) ; repeat 3 times... | |
SUB 64 | |
LD (HL), A | |
INC HL | |
LD A, (HL) | |
SUB 64 | |
LD (HL), A | |
ADD HL, DE | |
DJNZ PTALOO2 | |
RET | |
; subroutine: deselect previous selection | |
DESPREV LD A, (TX) | |
CP 255 | |
RET z | |
LD A, (TKCOL) ; match ink to previous knight selection | |
LD (GKNIGHT+1), A | |
LD A, (TBCOL) ; match paper to bcol | |
LD (GKNIGHT+3), A | |
LD A, (TY) | |
LD (GKNIGHT+7), A | |
INC A | |
LD (GKNIGHT+11), A | |
INC A | |
LD (GKNIGHT+15), A | |
LD A, (TX) | |
INC A | |
LD (GKNIGHT+8), A | |
LD (GKNIGHT+12), A | |
LD (GKNIGHT+16), A | |
LD DE, GKNIGHT ; print normal knight over fuzzy | |
LD BC, EOGKNIG-GKNIGHT | |
CALL 8252 | |
LD A, 255 | |
LD (TX), A | |
RET | |
; strings for graphics | |
GEMPTY DEFB 16,0,17,7 | |
DEFB 22,3,3," " | |
DEFB 22,4,3," " | |
DEFB 22,5,3," " | |
EOGEMPT EQU $ | |
GBLOCK DEFB 16,1,17,7 | |
DEFB 22,3,3,154,154,154 | |
DEFB 22,4,3,154,154,154 | |
DEFB 22,5,3,154,154,154 | |
EOGBLOC EQU $ | |
GDEST DEFB 16,5,17,1 | |
DEFB 22,3,3,150,16,0," ",16,5,151 | |
DEFB 16,0 | |
DEFB 22,4,3," " | |
DEFB 16,5 | |
DEFB 22,5,3,152,16,0," ",16,5,153 | |
EOGDEST EQU $ | |
GKNIGHT DEFB 16,5,17,7,19,0 | |
DEFB 22,3,4,144 | |
DEFB 22,4,4,145 | |
DEFB 22,5,4,146 | |
EOGKNIG EQU $ | |
GKFUZZY DEFB 16,5,17,7,19,1 | |
DEFB 22,3,4,147 | |
DEFB 22,4,4,148 | |
DEFB 22,5,4,149 | |
EOGKFUZ EQU $ | |
GKWIPE DEFB 16,0,17,7,19,0 | |
DEFB 22,3,4," " | |
DEFB 22,4,4," " | |
DEFB 22,5,4," " | |
EOGKWIP EQU $ | |
BORD1 DEFB 16,2,17,0 | |
DEFB 22,2,2,159 | |
EOBORD1 EQU $ | |
BORD2 DEFB 22,3,2,161 | |
DEFB 22,3,11,161 | |
EOBORD2 EQU $ | |
; strings for text | |
INTRO1 DEFB 22,0,1,16,7,17,0,"Original PC game ",$7F," 2017 Arzola" | |
EOINTR1 EQU $ | |
INTRO2 DEFB 22,0,0,"Spectrum version by Darryl Sloan" | |
EOINTR2 EQU $ | |
INTRO3 DEFB 22,0,0,"Keys: Q, A, O, P, SPACE, R=Retry" | |
EOINTR3 EQU $ | |
INTRO4 DEFB 22,0,0,"Level code (AAAA to begin): " | |
EOINTR4 EQU $ | |
CURSPOS DEFB 18,0,22,0,28 ; turn off flash, place cursor in y, x | |
EOCURSP EQU $ | |
CURFLAS DEFB 18,1," " ; print flashing cursor | |
EOCURFL EQU $ | |
BADCODE DEFB 22,0,0,"Code not recognised! " | |
EOBADCO EQU $ | |
LEVDISP DEFB 16,7,17,0,19,0,22,0,0,"*" | |
DEFB 16,6,155,"+++++++++] ",16,7,"****" | |
EOLEVDI EQU $ | |
CONGRAT DEFB 16,0,17,0,19,1,22,0,0," You have completed the game! " | |
EOCONGR EQU $ | |
; variables | |
PCODE DEFB 0,0,0,0 | |
LCODE DEFB 0,0,0,0 | |
WIN DEFB 0 | |
LEVEL DEFB 1 | |
LEVRES DEFW LEVDAT | |
TLEVRES DEFW LEVDAT ; temporary store to enable retry of level | |
STAGE DEFB 1 | |
WIDTH DEFB 3 | |
HEIGHT DEFB 3 | |
WIDTHX3 DEFB 0 | |
HEIGHX3 DEFB 0 | |
LSTART DEFB 1 | |
LFIN DEFB 9 | |
PY DEFB 3 ; for cursor | |
PX DEFB 3 ; for cursor | |
TY DEFB 255 ; for selected piece | |
TX DEFB 255 ; for selected piece (255=no current selection) | |
TTY DEFB 0 ; used when determining if a move is valid | |
TTX DEFB 0 ; used when determining if a move is valid | |
BCOL DEFB 7 ; for cursor | |
TBCOL DEFB 7 ; for selected board tile | |
TKCOL DEFB 5 ; for selected knight piece | |
CURATTR DEFW 22528 | |
; udg data | |
; knight | |
UDGS DEFB 0,0,0,0,16,28,46,126 | |
DEFB 255,79,15,31,63,127,255, 255 | |
DEFB 60,126,255,255,0,0,0,0 | |
; knight fuzzy (selected) | |
DEFB 0,0,0,0,16,24,52,106 | |
DEFB 245,74,13,26,53,106,213,234 | |
DEFB 52,106,213,255,0,0,0,0 | |
; destination circle | |
DEFB 255,252,240,224,192,192,128,128 ; top-left | |
DEFB 255,63,15,7,3,3,1,1 ; top-right | |
DEFB 128,128,192,192,224,240,252,255 ; bottom-left | |
DEFB 1,1,3,3,7,15,63,255 ; bottom-right | |
; blocked tile | |
DEFB 51,51,204,204,51,51,204,204 | |
; progress bar | |
DEFB 1,1,1,1,1,1,1,1 ; start | |
DEFB 255,0,73,107,127,127,0,255 ; filled cell | |
DEFB 255,0,0,0,0,0,0,255 ; empty cell | |
DEFB 192,64,64,64,64,64,64,192 ; finish | |
; board borders | |
DEFB 0,126,84,106,84,106,84,0 ; corner | |
DEFB 0,255,85,170,85,170,85,0 ; horizontal | |
DEFB 84,106,84,106,84,106,84,106 ; vertical | |
; level data | |
; stage 1 (levels 1-9) | |
LEVDAT DEFB 0, "AAAA" ; passcode | |
DEFB 1,1,1,2,2,1,5,2,1 ; board (1=empty, 2=block, 3/5=mag/cyn dest) | |
DEFB 5,1,1,1,1,1,1,1,1 ; pieces (1=empty, 3/4/5=mag/grn/cyn knight) | |
DEFB 0, "KVFG" | |
DEFB 1,1,5,2,2,1,1,1,1 | |
DEFB 1,1,1,1,1,1,1,1,5 | |
DEFB 0, "BCPT" | |
DEFB 1,1,1,5,2,5,1,1,1 | |
DEFB 5,1,1,1,1,1,1,1,5 | |
DEFB 0, "ZJFV" | |
DEFB 1,5,1,1,2,5,1,1,5 | |
DEFB 1,5,1,5,1,1,1,1,5 | |
DEFB 0, "YRSA" | |
DEFB 2,5,1,1,2,5,1,1,1 | |
DEFB 1,5,1,5,1,1,1,1,1 | |
DEFB 0, "DYJE" | |
DEFB 2,1,1,1,2,5,5,1,1 | |
DEFB 1,1,1,5,1,1,1,5,1 | |
DEFB 0, "RQXE" | |
DEFB 1,2,1,3,2,5,1,2,1 | |
DEFB 5,1,1,1,1,1,1,1,3 | |
DEFB 0, "KJOT" | |
DEFB 3,1,1,1,2,1,1,1,5 | |
DEFB 5,1,1,1,1,1,1,1,3 | |
DEFB 0, "GSFK" | |
DEFB 1,1,1,3,2,1,5,1,1 | |
DEFB 3,1,1,1,1,1,1,1,5 | |
; stage 2 | |
DEFB 0, "BCTD" | |
DEFB 1,1,3,1,2,5,1,5,1,1,3,1 | |
DEFB 1,3,1,5,1,1,1,1,1,3,1,5 | |
DEFB 0, "SHSP" | |
DEFB 1,3,1,1,2,3,1,1,5,1,1,1 | |
DEFB 1,1,1,1,1,1,5,3,3,1,1,1 | |
DEFB 0, "HFSX" | |
DEFB 1,5,1,1,1,2,3,3,1,5,1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4,5,1,5,4,1,1,4,5,1,1,5,5,1 | |
DEFB 0, "WRHS" | |
DEFB 3,2,1,3,1,1,5,2,1,1,2,1,5,1,1,1,5,2,1,1,3,2,1,3,1 | |
DEFB 4,1,5,1,3,4,3,1,4,1,1,4,4,4,5,4,3,1,4,1,4,1,5,1,3 | |
DEFB 0, "HRJA" | |
DEFB 3,1,1,1,2,5,3,1,5,1,1,2,1,2,1,1,5,1,3,3,2,1,1,1,5 | |
DEFB 5,1,4,1,1,4,5,4,4,3,4,1,3,1,4,3,5,4,5,4,1,1,4,1,3 | |
DEFB 0, "CRJS" | |
DEFB 1,1,3,1,1,1,2,1,2,1,5,3,5,3,5,1,2,1,2,1,1,1,3,1,1 | |
DEFB 1,4,5,4,1,3,1,4,1,3,3,4,4,4,3,4,1,5,1,4,1,4,5,4,1 | |
DEFB 0, "YSKR" | |
DEFB 1,1,3,1,2,1,1,3,1,1,5,5,2,5,5,1,1,3,1,1,2,1,3,1,1 | |
DEFB 4,4,5,4,1,1,5,4,3,1,3,4,1,4,3,1,3,4,5,1,1,4,5,4,4 | |
DEFB 0, "NSOR" | |
DEFB 1,1,3,1,1,1,3,2,3,1,5,1,2,1,5,1,2,1,2,1,1,5,3,5,1 | |
DEFB 4,1,5,1,4,4,4,1,4,4,4,3,1,3,4,5,1,1,1,5,3,4,5,4,3 | |
DEFB 255 ; end of data marker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment