Added a graphical visualization for the directions the player can take. (Only NSEW so far, need to add UP and DOWN as well).
Reorganized the rest of the UI to accommodate the change.
@@ -19,7 +19,8 @@ | ||
19 | 19 | |
20 | 20 | |
21 | 21 | // Display |
22 | -extern unsigned char ImageBuffer[40*200]; | |
22 | +extern unsigned char ImageBuffer[40*200]; // Compositing buffer, used to mix together the scene image, frame, arrows, etc... | |
23 | +extern char gFlagDirections; // Bit flag containing all the possible directions for the current scene (used to draw the arrows on the scene) | |
23 | 24 | |
24 | 25 | |
25 | 26 | // Audio |
@@ -1,10 +1,12 @@ | ||
1 | 1 | |
2 | - .text | |
2 | + .zero | |
3 | 3 | |
4 | -; See D:\svn\users\dbug\UpgradeTime\Encounter\Part 17-Test | |
5 | -; D:\svn\users\dbug\UpgradeTime\Encounter\Part 17-Test - Copy (2) | |
4 | +width .dsb 1 | |
5 | +height .dsb 1 | |
6 | 6 | |
7 | + .text | |
7 | 8 | |
9 | +_gFlagDirections .byt 0 ; Bit flag containing all the possible directions for the current scene (used to draw the arrows on the scene) | |
8 | 10 | |
9 | 11 | ; A000-B3FF 5120 bytes of half HIRES (240x128 resolution) |
10 | 12 | ; Exactly 20*256 |
@@ -55,10 +57,171 @@ | ||
55 | 57 | .) |
56 | 58 | |
57 | 59 | |
60 | +_AddFancyImageFrame | |
61 | +.( | |
62 | + ; Put the white and black line at the very top | |
63 | + ldx #40 | |
64 | +loop_top | |
65 | + lda #%01111111 | |
66 | + sta _ImageBuffer+40*0-1,x | |
67 | + | |
68 | + lda #%01000000 | |
69 | + sta _ImageBuffer+40*1-1,x | |
70 | + | |
71 | + dex | |
72 | + bne loop_top | |
73 | + | |
74 | + lda #<_ImageBuffer+40*2 | |
75 | + sta tmp0+0 | |
76 | + lda #>_ImageBuffer+40*2 | |
77 | + sta tmp0+1 | |
78 | + | |
79 | + ; Intermediate junction elements at the top left and right | |
80 | + lda #%01100000 | |
81 | + sta _ImageBuffer+40*1+0 | |
82 | + lda #%01000001 | |
83 | + sta _ImageBuffer+40*1+39 | |
84 | + | |
85 | + ; Put the white and black line on each side of the image | |
86 | + ldx #128-2-3 | |
87 | +loop_sides | |
88 | + ldy #0 | |
89 | + lda (tmp0),y | |
90 | + and #%11101111 | |
91 | + ora #%01100000 | |
92 | + sta (tmp0),y | |
93 | + | |
94 | + ldy #39 | |
95 | + lda (tmp0),y | |
96 | + and #%11111101 | |
97 | + ora #%01000001 | |
98 | + sta (tmp0),y | |
99 | + | |
100 | + clc | |
101 | + lda tmp0+0 | |
102 | + adc #40 | |
103 | + sta tmp0+0 | |
104 | + lda tmp0+1 | |
105 | + adc #0 | |
106 | + sta tmp0+1 | |
107 | + | |
108 | + dex | |
109 | + bne loop_sides | |
110 | + | |
111 | + ; The three lines at the bottom | |
112 | + ldx #19 | |
113 | +loop_bottom | |
114 | + lda #%01111111 | |
115 | + sta _ImageBuffer+40*126-1,x | |
116 | + sta _ImageBuffer+40*126-1+40-19,x | |
117 | + | |
118 | + lda #%01000000 | |
119 | + sta _ImageBuffer+40*125-1,x | |
120 | + sta _ImageBuffer+40*127-1,x | |
121 | + | |
122 | + sta _ImageBuffer+40*125-1+40-19,x | |
123 | + sta _ImageBuffer+40*127-1+40-19,x | |
124 | + | |
125 | + dex | |
126 | + bne loop_bottom | |
127 | + | |
128 | + ; Intermediate junction elements at the bottom left and right | |
129 | + lda #%01110000 | |
130 | + sta _ImageBuffer+40*125+0 | |
131 | + lda #%01000011 | |
132 | + sta _ImageBuffer+40*125+39 | |
133 | + | |
134 | + lda #%01011111 | |
135 | + sta _ImageBuffer+40*126+0 | |
136 | + lda #%01111110 | |
137 | + sta _ImageBuffer+40*126+39 | |
138 | + | |
139 | + rts | |
140 | +.) | |
141 | + | |
142 | +_DrawArrows | |
143 | +.( | |
144 | + ; ArrowBlockMasks -> 102,111 -> 17,111 | |
145 | + ; The block itself is 32x18 pixels (6 bytes wide) | |
146 | + ; The top 18 pixels is the AND mask, the bottom 18 pixels are the OR mask | |
147 | + lda #<ArrowBlockMasks | |
148 | + sta tmp0+0 | |
149 | + lda #>ArrowBlockMasks | |
150 | + sta tmp0+1 | |
151 | + | |
152 | + lda #18+8 | |
153 | + sta height | |
154 | + | |
155 | + lda #6 | |
156 | + sta width | |
157 | + | |
158 | + lda #<_ImageBuffer+17+40*110 | |
159 | + sta tmp1+0 | |
160 | + lda #>_ImageBuffer+17+40*110 | |
161 | + sta tmp1+1 | |
162 | + | |
163 | + lda #$31 ; and (tmp0),y | |
164 | + sta BlitOperation | |
165 | + jsr BlitBloc | |
166 | + | |
167 | + lda #18+8 | |
168 | + sta height | |
169 | + | |
170 | + lda #6 | |
171 | + sta width | |
172 | + | |
173 | + lda #<_ImageBuffer+17+40*110 | |
174 | + sta tmp1+0 | |
175 | + lda #>_ImageBuffer+17+40*110 | |
176 | + sta tmp1+1 | |
177 | + | |
178 | + lda #$11 ; ora (tmp0),y | |
179 | + sta BlitOperation | |
180 | + jsr BlitBloc | |
181 | + | |
182 | + ; Then add the individual arrows over | |
183 | + lda _gFlagDirections | |
184 | + and #1 | |
185 | + beq no_north | |
186 | + jsr PatchArrowTop | |
187 | +no_north | |
188 | + | |
189 | + lda _gFlagDirections | |
190 | + and #2 | |
191 | + beq no_south | |
192 | + jsr PatchArrowBottom | |
193 | +no_south | |
194 | + | |
195 | + lda _gFlagDirections | |
196 | + and #4 | |
197 | + beq no_east | |
198 | + jsr PatchArrowRight | |
199 | +no_east | |
200 | + | |
201 | + lda _gFlagDirections | |
202 | + and #8 | |
203 | + beq no_west | |
204 | + jsr PatchArrowLeft | |
205 | +no_west | |
206 | + | |
207 | + jsr PatchArrowCharacters | |
208 | + | |
209 | + ; Reset the direction | |
210 | + lda #0 | |
211 | + sta _gFlagDirections | |
212 | + rts | |
213 | +.) | |
214 | + | |
58 | 215 | ; A000-B3FF 5120 bytes of half HIRES (240x128 resolution) |
59 | 216 | ; Exactly 20*256 |
60 | 217 | _BlitBufferToHiresWindow |
61 | 218 | .( |
219 | + jsr _AddFancyImageFrame | |
220 | + jsr _DrawArrows | |
221 | + | |
222 | + lda #26 | |
223 | + sta _ImageBuffer+40*128-1 ; Force back to TEXT | |
224 | + | |
62 | 225 | ldx #0 |
63 | 226 | loop |
64 | 227 | lda _ImageBuffer+256*0,x |
@@ -103,11 +266,247 @@ | ||
103 | 266 | sta $a000+256*19,x |
104 | 267 | dex |
105 | 268 | bne loop |
269 | + | |
270 | + ;jsr _Breakpoint | |
106 | 271 | rts |
272 | +.) | |
273 | + | |
274 | + | |
275 | + | |
276 | +PatchArrowTop | |
277 | +.( | |
278 | + lda #<ArrowTop | |
279 | + sta tmp0+0 | |
280 | + lda #>ArrowTop | |
281 | + sta tmp0+1 | |
282 | + | |
283 | + lda #6 | |
284 | + sta height | |
285 | + | |
286 | + lda #2 | |
287 | + sta width | |
288 | + | |
289 | + lda #<_ImageBuffer+19+40*112 | |
290 | + sta tmp1+0 | |
291 | + lda #>_ImageBuffer+19+40*112 | |
292 | + sta tmp1+1 | |
293 | + | |
294 | + jmp BlitBloc | |
295 | +.) | |
296 | + | |
297 | +PatchArrowLeft | |
298 | +.( | |
299 | + lda #<ArrowLeft | |
300 | + sta tmp0+0 | |
301 | + lda #>ArrowLeft | |
302 | + sta tmp0+1 | |
303 | + | |
304 | + lda #9 | |
305 | + sta height | |
306 | + | |
307 | + lda #3 | |
308 | + sta width | |
309 | + | |
310 | + lda #<_ImageBuffer+17+40*116 | |
311 | + sta tmp1+0 | |
312 | + lda #>_ImageBuffer+17+40*116 | |
313 | + sta tmp1+1 | |
314 | + | |
315 | + jmp BlitBloc | |
316 | +.) | |
317 | + | |
318 | + | |
319 | +PatchArrowRight | |
320 | +.( | |
321 | + lda #<ArrowRight | |
322 | + sta tmp0+0 | |
323 | + lda #>ArrowRight | |
324 | + sta tmp0+1 | |
325 | + | |
326 | + lda #9 | |
327 | + sta height | |
328 | + | |
329 | + lda #3 | |
330 | + sta width | |
331 | + | |
332 | + lda #<_ImageBuffer+20+40*82 | |
333 | + sta tmp1+0 | |
334 | + lda #>_ImageBuffer+20+40*82 | |
335 | + sta tmp1+1 | |
336 | + | |
337 | + lda #<_ImageBuffer+20+40*116 | |
338 | + sta tmp1+0 | |
339 | + lda #>_ImageBuffer+20+40*116 | |
340 | + sta tmp1+1 | |
341 | + | |
342 | + jmp BlitBloc | |
343 | +.) | |
344 | + | |
345 | +PatchArrowBottom | |
346 | +.( | |
347 | + lda #<ArrowBottom | |
348 | + sta tmp0+0 | |
349 | + lda #>ArrowBottom | |
350 | + sta tmp0+1 | |
351 | + | |
352 | + lda #13 | |
353 | + sta height | |
354 | + | |
355 | + lda #2 | |
356 | + sta width | |
357 | + | |
358 | + lda #<_ImageBuffer+19+40*120 | |
359 | + sta tmp1+0 | |
360 | + lda #>_ImageBuffer+19+40*120 | |
361 | + sta tmp1+1 | |
362 | + | |
363 | + jmp BlitBloc | |
364 | +.) | |
365 | + | |
366 | + | |
367 | +BlitBloc | |
368 | +.( | |
369 | +loop_y | |
370 | + ldy #0 | |
371 | + ldx width | |
372 | +loop_x | |
373 | + lda (tmp1),y | |
374 | ++BlitOperation | |
375 | + ora (tmp0),y | |
376 | + ora #64 | |
377 | + ;eor (tmp0),y | |
378 | + sta (tmp1),y | |
379 | + iny | |
380 | + dex | |
381 | + bne loop_x | |
382 | + | |
383 | + clc | |
384 | + lda tmp0+0 | |
385 | + adc width | |
386 | + sta tmp0+0 | |
387 | + lda tmp0+1 | |
388 | + adc #0 | |
389 | + sta tmp0+1 | |
390 | + | |
391 | + clc | |
392 | + lda tmp1+0 | |
393 | + adc #40 | |
394 | + sta tmp1+0 | |
395 | + lda tmp1+1 | |
396 | + adc #0 | |
397 | + sta tmp1+1 | |
398 | + | |
399 | + dec height | |
400 | + bne loop_y | |
107 | 401 | rts |
108 | 402 | .) |
109 | 403 | |
404 | +; From arrow_block_masks.png | |
405 | +; Contains two 36x28 pixels elements: The top half should be ANDed and the bottom half to be ORed with the image | |
406 | +ArrowBlockMasks | |
407 | + .byt $7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$5f,$7f,$7f,$7f,$7f,$7c,$47 | |
408 | + .byt $7f,$7f,$7f,$7f,$70,$41,$7f,$7f,$7f,$7f,$40,$40,$5f,$7f,$7f,$7c | |
409 | + .byt $40,$40,$47,$7f,$7f,$70,$40,$40,$41,$7f,$7f,$40,$40,$40,$40,$5f | |
410 | + .byt $7c,$40,$40,$40,$40,$47,$78,$40,$40,$40,$40,$43,$7c,$40,$40,$40 | |
411 | + .byt $40,$47,$7e,$40,$40,$40,$40,$4f,$7f,$40,$40,$40,$40,$5f,$7f,$60 | |
412 | + .byt $40,$40,$40,$7f,$7f,$70,$40,$40,$41,$7f,$40,$78,$40,$40,$43,$60 | |
413 | + .byt $5a,$4c,$40,$40,$46,$40,$40,$42,$40,$40,$48,$40,$40,$40,$40,$40 | |
414 | + .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 | |
415 | + .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 | |
416 | + .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$60 | |
417 | + .byt $40,$40,$40,$40,$43,$58,$40,$40,$40,$40,$4c,$66,$40,$40,$40,$40 | |
418 | + .byt $71,$51,$60,$40,$40,$43,$42,$68,$58,$40,$40,$4c,$41,$50,$46,$40 | |
419 | + .byt $40,$70,$60,$60,$61,$60,$43,$45,$40,$40,$54,$58,$44,$4a,$40,$40 | |
420 | + .byt $4a,$44,$49,$55,$54,$45,$55,$52,$44,$6a,$68,$62,$6a,$64,$42,$55 | |
421 | + .byt $41,$50,$55,$48,$41,$4a,$40,$60,$4a,$50,$40,$64,$41,$50,$44,$60 | |
422 | + .byt $40,$52,$42,$68,$49,$40,$40,$48,$41,$50,$42,$40,$5a,$44,$42,$68 | |
423 | + .byt $44,$4b,$40,$42,$55,$55,$48,$40,$40,$41,$4a,$6a,$50,$40,$40,$40 | |
424 | + .byt $65,$54,$60,$40,$40,$40,$52,$69,$40,$40,$40,$40,$49,$52,$40,$40 | |
425 | + .byt $40,$40,$44,$64,$40,$40,$40,$40,$42,$48,$40,$40,$40,$40,$41,$50 | |
426 | + .byt $40,$40,$40,$40,$40,$60,$40,$40 | |
110 | 427 | |
428 | + | |
429 | +ArrowTop ; Patch at 19,112 | |
430 | + .byt %000000,%100000 | |
431 | + .byt %000001,%110000 | |
432 | + .byt %000111,%111100 | |
433 | + .byt %000001,%110000 | |
434 | + .byt %000001,%110000 | |
435 | + .byt %000000,%100000 | |
436 | + | |
437 | +ArrowLeft ; Patch at 17,116 | |
438 | + .byt %000000,%000001,%100000 | |
439 | + .byt %000000,%000111,%000000 | |
440 | + .byt %000000,%011111,%000000 | |
441 | + .byt %000001,%111111,%111100 | |
442 | + .byt %000000,%111111,%111100 | |
443 | + .byt %000000,%011111,%000000 | |
444 | + .byt %000000,%001111,%000000 | |
445 | + .byt %000000,%000110,%000000 | |
446 | + .byt %000000,%000010,%000000 | |
447 | + | |
448 | +ArrowRight ; Patch at 20,116 | |
449 | + .byt %000000,%110000,%000000 | |
450 | + .byt %000000,%011100,%000000 | |
451 | + .byt %000000,%011111,%000000 | |
452 | + .byt %000111,%111111,%110000 | |
453 | + .byt %000111,%111111,%100000 | |
454 | + .byt %000000,%011111,%000000 | |
455 | + .byt %000000,%011110,%000000 | |
456 | + .byt %000000,%001100,%000000 | |
457 | + .byt %000000,%001000,%000000 | |
458 | + | |
459 | +ArrowBottom ; Patch at 19,120 | |
460 | + .byt %000000,%100000 | |
461 | + .byt %000001,%110000 | |
462 | + .byt %000001,%110000 | |
463 | + .byt %000001,%110000 | |
464 | + .byt %000011,%111000 | |
465 | + .byt %000011,%111000 | |
466 | + .byt %000011,%111000 | |
467 | + .byt %011111,%111111 | |
468 | + .byt %001111,%111110 | |
469 | + .byt %000111,%111100 | |
470 | + .byt %000011,%111000 | |
471 | + .byt %000001,%110000 | |
472 | + .byt %000000,%100000 | |
473 | + | |
474 | + | |
475 | +// Needs 6 characters to copy the 36x8 bottom part of the arrow block | |
476 | +// 59 -> ; character, followed by <=>?@ | |
477 | +PatchArrowCharacters | |
478 | +.( | |
479 | + ldx #0 | |
480 | + ldy #0 | |
481 | +loop | |
482 | + lda _ImageBuffer+40*(128+0)+17,x | |
483 | + sta $B800+8*59+0,y | |
484 | + lda _ImageBuffer+40*(128+1)+17,x | |
485 | + sta $B800+8*59+1,y | |
486 | + lda _ImageBuffer+40*(128+2)+17,x | |
487 | + sta $B800+8*59+2,y | |
488 | + lda _ImageBuffer+40*(128+3)+17,x | |
489 | + sta $B800+8*59+3,y | |
490 | + lda _ImageBuffer+40*(128+4)+17,x | |
491 | + sta $B800+8*59+4,y | |
492 | + lda _ImageBuffer+40*(128+5)+17,x | |
493 | + sta $B800+8*59+5,y | |
494 | + lda _ImageBuffer+40*(128+6)+17,x | |
495 | + sta $B800+8*59+6,y | |
496 | + lda _ImageBuffer+40*(128+7)+17,x | |
497 | + sta $B800+8*59+7,y | |
498 | + | |
499 | + tya | |
500 | + clc | |
501 | + adc #8 | |
502 | + tay | |
503 | + | |
504 | + inx | |
505 | + cpx #6 | |
506 | + bne loop | |
507 | + rts | |
508 | +.) | |
509 | + | |
111 | 510 | .bss |
112 | 511 | |
113 | 512 | * = $C000 |
@@ -19,6 +19,7 @@ | ||
19 | 19 | char gTextBuffer[80]; // Temp |
20 | 20 | |
21 | 21 | |
22 | + | |
22 | 23 | typedef WORDS (*AnswerProcessingFun)(); |
23 | 24 | |
24 | 25 | extern WORDS AskInput(const char* inputMessage,AnswerProcessingFun callback); |
@@ -98,19 +99,7 @@ | ||
98 | 99 | } |
99 | 100 | |
100 | 101 | |
101 | -void ClearMessageWindow(unsigned char paperColor) | |
102 | -{ | |
103 | - int i; | |
104 | - char* ptrScreen=(char*)0xbb80+40*18; | |
105 | - for (i=18;i<=23;i++) | |
106 | - { | |
107 | - *ptrScreen=paperColor; | |
108 | - memset(ptrScreen+1,32,39); | |
109 | - ptrScreen+=40; | |
110 | - } | |
111 | -} | |
112 | 102 | |
113 | - | |
114 | 103 | void PrintStatusMessage(char color,const char* message) |
115 | 104 | { |
116 | 105 | char* ptrScreen=(char*)0xbb80+40*22; |
@@ -152,7 +141,7 @@ | ||
152 | 141 | } |
153 | 142 | |
154 | 143 | // Print the directions under (also centered) |
155 | - memset((char*)0xbb80+17*40+1,' ',39); | |
144 | + memset((char*)0xbb80+18*40+1,' ',39); | |
156 | 145 | if (exitCount) |
157 | 146 | { |
158 | 147 | SetLineAddress(gTextBuffer); |
@@ -181,6 +170,7 @@ | ||
181 | 170 | { |
182 | 171 | PrintWord(", "); |
183 | 172 | } |
173 | + gFlagDirections|= (1<<direction); | |
184 | 174 | } |
185 | 175 | } |
186 | 176 | *gPrintAddress=0; // Make sure to null terminate the string |
@@ -190,7 +180,7 @@ | ||
190 | 180 | strcpy(gTextBuffer,"There seems to be no way out"); |
191 | 181 | } |
192 | 182 | messageLength=strlen(gTextBuffer); |
193 | - strcpy((char*)0xbb80+17*40+20-messageLength/2,gTextBuffer); | |
183 | + strcpy((char*)0xbb80+18*40+20-messageLength/2,gTextBuffer); | |
194 | 184 | } |
195 | 185 | |
196 | 186 |
@@ -257,7 +247,7 @@ | ||
257 | 247 | if (itemCount) |
258 | 248 | { |
259 | 249 | char first=1; |
260 | - char* ptrScreen=(char*)0xbb80+40*18; | |
250 | + char* ptrScreen=(char*)0xbb80+40*19; | |
261 | 251 | for (item=0;item<e_ITEM_COUNT_;item++) |
262 | 252 | { |
263 | 253 | if (gItems[item].location == gCurrentLocation) |
@@ -279,7 +269,7 @@ | ||
279 | 269 | } |
280 | 270 | else |
281 | 271 | { |
282 | - sprintf((char*)0xbb80+40*18+1,"%c%s",3,"There is nothing of interest here"); | |
272 | + sprintf((char*)0xbb80+40*19+1,"%c%s",3,"There is nothing of interest here"); | |
283 | 273 | } |
284 | 274 | } |
285 | 275 |
@@ -289,10 +279,14 @@ | ||
289 | 279 | int messageLength = 0; |
290 | 280 | |
291 | 281 | // Print the description of the place at the top (centered) |
292 | - memset((char*)0xbb80+16*40+1,' ',39); | |
282 | + memset((char*)0xbb80+17*40+1,' ',39); | |
293 | 283 | messageLength=strlen(locationPtr->description); |
294 | - strcpy((char*)0xbb80+16*40+20-messageLength/2,locationPtr->description); | |
284 | + strcpy((char*)0xbb80+17*40+20-messageLength/2,locationPtr->description); | |
295 | 285 | |
286 | + poke(0xbb80+16*40+16,9); // ALT charset | |
287 | + memcpy((char*)0xbb80+16*40+17,";<=>?@",6); | |
288 | + poke(0xbb80+16*40+23,8); // STD charset | |
289 | + | |
296 | 290 | PrintSceneDirections(); |
297 | 291 | |
298 | 292 | PrintSceneObjects(); |
@@ -306,9 +300,10 @@ | ||
306 | 300 | ClearMessageWindow(16+4); |
307 | 301 | |
308 | 302 | LoadFileAt(LOADER_PICTURE_LOCATIONS_START+gCurrentLocation+1,ImageBuffer); |
309 | - BlitBufferToHiresWindow(); | |
310 | 303 | |
311 | 304 | PrintSceneInformation(); |
305 | + | |
306 | + BlitBufferToHiresWindow(); | |
312 | 307 | } |
313 | 308 | |
314 | 309 |
@@ -330,7 +325,6 @@ | ||
330 | 325 | } |
331 | 326 | |
332 | 327 | |
333 | -// Will have to standardize | |
334 | 328 | WORDS ProcessContainerAnswer() |
335 | 329 | { |
336 | 330 | // Check the first word: We expects a container id |
@@ -1,23 +1,33 @@ | ||
1 | 1 | |
2 | 2 | |
3 | + | |
4 | +void ClearMessageWindow(unsigned char paperColor) | |
5 | +{ | |
6 | + int i; | |
7 | + char* ptrScreen=(char*)0xbb80+40*19; | |
8 | + for (i=19;i<=23;i++) | |
9 | + { | |
10 | + *ptrScreen=paperColor; | |
11 | + memset(ptrScreen+1,32,39); | |
12 | + ptrScreen+=40; | |
13 | + } | |
14 | +} | |
15 | + | |
16 | + | |
3 | 17 | void InitializeGraphicMode() |
4 | 18 | { |
5 | 19 | ClearTextWindow(); |
6 | - poke(0xbb80+40*0,31); // Switch to HIRES | |
7 | - poke(0xa000+40*128,26); // Switch to TEXT | |
20 | + poke(0xbb80+40*0,31|128); // Switch to HIRES, using video inverse to keep the 6 pixels white | |
21 | + poke(0xa000+40*128,26); // Switch to TEXT | |
8 | 22 | |
9 | 23 | // from the old BASIC code, will fix later |
10 | 24 | // CYAN on BLACK for the scene description |
11 | - poke(0xBB80+40*16,6); | |
25 | + poke(0xBB80+40*16,7); // Line with the arrow character and the clock | |
12 | 26 | poke(0xBB80+40*17,6); |
27 | + poke(0xBB80+40*18,6); | |
13 | 28 | |
14 | 29 | // BLUE background for the log output |
15 | - poke(0xBB80+40*18,16+4); | |
16 | - poke(0xBB80+40*19,16+4); | |
17 | - poke(0xBB80+40*20,16+4); | |
18 | - poke(0xBB80+40*21,16+4); | |
19 | - poke(0xBB80+40*22,16+4); | |
20 | - poke(0xBB80+40*23,16+4); | |
30 | + ClearMessageWindow(16+4); | |
21 | 31 | |
22 | 32 | // BLACK background for the inventory area |
23 | 33 | poke(0xBB80+40*24,16); |
@@ -26,3 +36,4 @@ | ||
26 | 36 | poke(0xBB80+40*27,16); |
27 | 37 | } |
28 | 38 | |
39 | + |
@@ -2,7 +2,7 @@ | ||
2 | 2 | // Misc settings for the game testing |
3 | 3 | // |
4 | 4 | //#define ENABLE_INTRO // Comment out to skip the intro |
5 | -//#define TESTING_MODE // Comment out to play normally | |
5 | +#define TESTING_MODE // Comment out to play normally | |
6 | 6 | |
7 | 7 | // RControl -> Bank0 & 16 |
8 | 8 | // LControl -> Bank2 & 16 |
@@ -69,8 +69,8 @@ | ||
69 | 69 | loop |
70 | 70 | lda TimeHours-1,x |
71 | 71 | ;sta $bfdf-6,x |
72 | - ;sta $bb80+16*40+39-6,x | |
73 | - sta $bb80+27*40+39-6-1,x | |
72 | + sta $bb80+16*40+39-6-1,x | |
73 | + ;sta $bb80+27*40+39-6-1,x | |
74 | 74 | dex |
75 | 75 | bpl loop |
76 | 76 |
@@ -1,5 +1,6 @@ | ||
1 | -Original memory map | |
2 | -------------------- | |
1 | +------------------------------------------- | |
2 | + Original memory map | |
3 | +------------------------------------------- | |
3 | 4 | 0000-00FF Page 0 - Scratch pad |
4 | 5 | 0100-01FF Page 1 - CPU Stack |
5 | 6 | 0200-02FF Page 2 - System variables |
@@ -14,10 +15,11 @@ | ||
14 | 15 | BB80-BFDF 1119 bytes of TEXT mode |
15 | 16 | BFE0-BFFF 32 spare bytes between the screen and the ROM |
16 | 17 | C000-FFFF ROM/RAM - 16KB |
18 | + | |
19 | + | |
17 | 20 | ------------------------------------------- |
18 | - | |
19 | -C/Assembler version memory map (TODO) | |
20 | -------------------- | |
21 | + C/Assembler version memory map | |
22 | +------------------------------------------- | |
21 | 23 | 0000-00FF Page 0 - Scratch pad |
22 | 24 | 0100-01FF Page 1 - CPU Stack |
23 | 25 | 0200-02FF Page 2 - System variables |
@@ -33,10 +35,16 @@ | ||
33 | 35 | DF40-FDFF 7872 bytes - [available] |
34 | 36 | FE00-FFFF 512 bytes - FloppyBuilder loader (may get larger when adding saving) |
35 | 37 | |
38 | + | |
36 | 39 | ------------------------------------------- |
37 | -Current game size: 16902 (2023-03-26) | |
40 | + Memory status | |
41 | +------------------------------------------- | |
42 | +2023-03-26 - Game size: 16902 bytes / Available low ram: 23034 bytes / Available overlay ram: 7872 bytes / 639 bytes available in the TOP half of the TEXT screen | |
38 | 43 | |
39 | --------------- | |
40 | -240x128 images -> 5120 bytes | |
41 | -compressed with FilePack, final size between 759 and 4313 bytes (greenhouse), average size 2016 bytes | |
42 | --------------- | |
44 | + | |
45 | +------------------------------------------- | |
46 | + Storage status | |
47 | +------------------------------------------- | |
48 | +2023-03-26 - Images are not compressed on disk, so each takes 5120 bytes (240x128 pixels) | |
49 | + compressed with FilePack, final size between 759 and 4313 bytes (greenhouse), average size 2016 bytes | |
50 | + Current format is 42 tracks of 17 sectors, 479 sectors used, out of 1428. (33% of the total disk size used) |
@@ -27,6 +27,12 @@ | ||
27 | 27 | SET PARAMS=-u1 -m0 -f6 -o2 |
28 | 28 | %PICTCONV% %PARAMS% data\title.png %TARGET%\title.hir |
29 | 29 | |
30 | +:: Arrow block (Temp file that needs to be copied in the display.s file) | |
31 | +SET PARAMS=-u1 -m0 -f0 -o4_ArrowBlockMasks | |
32 | +%PICTCONV% %PARAMS% data\arrow_block_masks.png build\mask.s | |
33 | + | |
34 | + | |
35 | + | |
30 | 36 | :: Here we have the list of 240x128 pictures |
31 | 37 | :: |
32 | 38 | :: 1 - You are in a deserted market square |