/
ChTitle.asm
174 lines (142 loc) · 4.14 KB
/
ChTitle.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
DrawTitle:
; ---- First window
; show spectrum logo
ld ix, Tit_prp_data
call A_by_IX
call DrawZX128logo
WHBLU = %01001111 ; white on blue
WHBLK = %01000111 ; white on black
YEBLK = %01000110 ; yellow on black
RDBLK = %01000010 ; red on black
LBBLK = %01000101 ; light blue on black
LGBLK = %01000100 ; light green on black
call A_by_IX
ld b,22
ld c,5
call A_ClearRect
ld b,2 ; two half-chars
TitC05loop:
call A_by_IX
ld a,32
ld de,Char05
call A_PrepHL
call DrawChar
call A_PrepHLAttrib ; attribute + position
ld a, %01000001
ld (hl),a
djnz TitC05loop
ld iy, TitSCR0
call TitDspText
; ---- Second window
ld iy, TitSCR1
call TitDspText
; display waiting
;ld a,0
;call ClearScreen
call A_by_IX
ld de, Tit_W0
call A_DrawString
ret
TitDspText:
ld b,(iy) ; read count of texts
inc iy
TitDspTloop:
ld de,(iy) ; read address of text
inc iy
inc iy
call A_by_IX
call A_DrawString
djnz TitDspTloop ; print all texts
call PressKey
ret
Tit_00:
.byte "Project ChessZX",0
Tit_01:
.byte " by Chessforeva,2016",0
Tit_T0:
.byte " Chess puzzles to solve "
.byte " 1687 M1-move "
.byte " 4103 M2-moves "
.byte " 2626 M3-moves "
.byte " (generated, not played) "
.byte " "
.byte " There is no other first move. "
.byte " The last move is checkmate#. "
.byte " "
.byte 0
Tit_P0:
.byte " (press a key) "
.byte 0
Tit_T2:
.byte " "
.byte " Cursor: "
.byte " Kempston, "
.byte " "
.byte " - redefine controls "
.byte " - skip to next puzzle "
.byte " "
.byte " "
.byte 0
Tit_T2a:
.byte " 1.Try to speed up the emulator."
.byte " Disable same keypress twice "
.byte " by key and use "
.byte " to repeat last keys. "
.byte " "
.byte 0
Tit_T2b:
.byte " Or (for slow emulation): "
.byte " 2.Press to turn off slow "
.byte " verification on loading. "
.byte " "
.byte 0
Tit_T2c:
.byte " "
.byte " Thanks to SjASMPlus compiler, "
.byte " Assembly Studio 8x editor, "
.byte " disassembled ZX 128 ROM, "
.byte " Speccy,EmuZWin,ZXSpin,RealSpec "
.byte " and other sources on the Web! "
.byte 0
Tit_K_WASD:
.byte "[WASD],Space,Enter",0
Tit_K_O:
.byte "[O]",0
Tit_K_N:
.byte "[N]",0
Tit_K_T:
.byte "[T]",0
Tit_K_FV:
.byte "[F,V]",0
Tit_K_P:
.byte "[P]",0
Tit_W0:
.byte " Let's start, wait while "
.byte 0
TitSCR0:
.byte 4
.word Tit_00, Tit_01, Tit_T0, Tit_P0
TitSCR1:
.byte 10
.word Tit_T2, Tit_T2a, Tit_T2b, Tit_K_WASD, Tit_K_O
.word Tit_K_N, Tit_K_T, Tit_K_FV, Tit_K_P, Tit_T2c
Tit_prp_data:
.byte 1, 12, 0 ; ZX spectrum logo
.byte 7, 5, WHBLU ; Blue rectangle
.byte 6, 26, WHBLU ; half-chars
.byte 11, 4, WHBLU ;
.byte 8, 6, WHBLU ; Tit_00
.byte 10, 6, WHBLU ; Tit_01
.byte 13, 0, WHBLK ; Tit_T0, white on black
.byte 22, 0, YEBLK ; Tit_P0, yellow on black
.byte 0, 0, WHBLK ; Tit_T2, white on black
.byte 7, 0, LBBLK ; Tit_T2a
.byte 12, 0, LGBLK ; Tit_T2b
.byte 2, 11, RDBLK ; Tit_K_WASD, red on black
.byte 4, 2, RDBLK ; Tit_K_O
.byte 5, 2, RDBLK ; Tit_K_N
.byte 9, 9, RDBLK ; Tit_K_T
.byte 9, 21, RDBLK ; Tit_K_FV
.byte 13, 9, RDBLK ; Tit_K_P
.byte 15, 0, WHBLK ; Tit_K_T2c
.byte 22, 0, YEBLK ; Tit_W0, yellow on black