-
Notifications
You must be signed in to change notification settings - Fork 0
/
help.s
568 lines (496 loc) · 14.2 KB
/
help.s
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
scraddr = $0002
coladdr = $0004
dataaddr = $0006
reset = $fffc
;------------------------------------------------
;------------------------------------------------
scroll2chapter .macro
lda #<\1
sta dataaddr
lda #>\1
sta dataaddr+1
lda dataaddr+1
cmp #>(helptxtend-1000)
bmi macroend
bpl correct
lda dataaddr
cmp #<(helptxtend-1000)
bmi macroend
correct
lda #<(helptxtend-1000)
sta dataaddr
lda #>(helptxtend-1000)
sta dataaddr+1
macroend
jsr printscreen
.endm
;------------------------------------------------
;------------------------------------------------
*=$801
basicstart
.byte $0C,$08,$0A,$00,$9E,$20,$32,$30,$36,$34,$00,$00,$00
*=$810
.offs $810-*
init
lda #0
sta $d020
sta $d021
jsr clrscr
jsr initcharset
lda #<helptxt
sta dataaddr
lda #>helptxt
sta dataaddr+1
jsr printscreen
mainloop
jsr readkeyboard
jmp mainloop
rts
readkeyboard
.block
sei
lda #%11111111
sta $dc02
lda #%00000000
sta $dc03
;sprawdz shift
lda #%11111101
sta $dc00
lda $dc01
and #%10000000
bne *+5
jmp shiftpressed
lda #%10111111
sta $dc00
lda $dc01
and #%00010000
bne *+5
jmp shiftpressed
nomodifiers
lda #%01111111 ;7
sta $dc00
lda $dc01
and #%10000000
bne *+5
jsr reset
lda $dc01
and #%00000001
bne *+5
jsr scrollchapter1
lda $dc01
and #%00001000
bne *+5
jsr scrollchapter2
lda #%11101111 ;4
sta $dc00
lda $dc01
and #%00001000
bne *+5
jsr scrollchapter0
lda #%11111011 ;2
sta $dc00
lda $dc01
and #%00001000
bne *+5
jsr scrollchapter6
lda $dc01
and #%00000001
bne *+5
jsr scrollchapter5
lda #%11111101 ;1
sta $dc00
lda $dc01
and #%00001000
bne *+5
jsr scrollchapter4
lda $dc01
and #%00000001
bne *+5
jsr scrollchapter3
lda #%11111110 ;0
sta $dc00
lda $dc01
and #%10000000
bne *+5
jsr scrolldown
jmp funcend
shiftpressed
lda #%11111110 ;0
sta $dc00
lda $dc01
and #%10000000
bne *+5
jsr scrollup
funcend
cli
rts
.bend
scrollchapter0
#scroll2chapter chapter0
rts
scrollchapter1
#scroll2chapter chapter1
rts
scrollchapter2
#scroll2chapter chapter2
rts
scrollchapter3
#scroll2chapter chapter3
rts
scrollchapter4
#scroll2chapter chapter4
rts
scrollchapter5
#scroll2chapter chapter5
rts
scrollchapter6
#scroll2chapter chapter6
rts
scrolldown
.block
lda dataaddr
clc
adc #40
sta dataaddr
bcc *+4
inc dataaddr+1
lda dataaddr+1
cmp #>(helptxtend-1000)
beq *+6
bmi funcend
bpl correct
lda dataaddr
cmp #<(helptxtend-1000)
bmi funcend
correct
lda #<(helptxtend-1000)
sta dataaddr
lda #>(helptxtend-1000)
sta dataaddr+1
funcend
jsr printscreen
rts
.bend
scrollup
.block
lda dataaddr
sec
sbc #40
sta dataaddr
bcs *+4
dec dataaddr+1
lda dataaddr+1
cmp #>helptxt
beq *+6
bpl funcend
bmi correct
lda dataaddr
cmp #<helptxt
bpl funcend
correct
lda #<helptxt
sta dataaddr
lda #>helptxt
sta dataaddr+1
funcend
jsr printscreen
rts
.bend
printscreen
.block
lda #$04
sta scraddr+1
lda #$00
sta scraddr
lda dataaddr+1
sta coladdr+1
lda dataaddr
sta coladdr
ldx #0
majorloop
ldy #0
minorloop
lda (coladdr),y
sta (scraddr),y
iny
cpy #40
bne minorloop
lda scraddr
clc
adc #40
sta scraddr
bcc *+4
inc scraddr+1
lda coladdr
clc
adc #40
sta coladdr
bcc *+4
inc coladdr+1
inx
cpx #25
bne majorloop
loopend
lda #$04
sta scraddr+1
lda #$00
sta scraddr
lda #$d8
sta coladdr+1
lda #$00
sta coladdr
ldx #0
majorloop2
ldy #0
lda #5
sta textcolor
minorloop2
lda (scraddr),y
cmp #61 ;"="
bne *+7
lda #1
sta textcolor
lda (scraddr),y
cmp #29 ;"]"
bne *+7
lda #5
sta textcolor
lda textcolor
sta (coladdr),y
lda (scraddr),y
cmp #27 ;"["
bne *+7
lda #7
sta textcolor
iny
cpy #40
bne minorloop2
lda scraddr
clc
adc #40
sta scraddr
bcc *+4
inc scraddr+1
lda coladdr
clc
adc #40
sta coladdr
bcc *+4
inc coladdr+1
inx
cpx #25
bne majorloop2
loopend2
rts
.bend
clrscr
.block
lda #32 ;spacja
ldx #0
clrloop
sta 1024,x
sta 1224,x
sta 1424,x
sta 1624,x
sta 1824,x
inx
cpx #200
bne clrloop
lda #5 ;na zielono
ldx #0
colloop
sta 55296,x
sta 55496,x
sta 55696,x
sta 55896,x
sta 56096,x
inx
cpx #200
bne colloop
rts
.bend
initcharset
;zapisac adres ekranu i charsetu
lda #$1a
sta $d018
rts
textcolor
.byte 5
helptxt
.screen " == sprite studio 64 manual == "
.screen " "
.screen "[run/stop] to quit [crsr down] to scroll"
.screen " "
.screen " "
chapter0
.screen " ========= table of contents ========== "
.screen " "
.screen "[0] table of contents "
.screen " "
.screen "[1] drawing "
.screen " "
.screen "[2] changing colors "
.screen " "
.screen "[3] advanced editing "
.screen " "
.screen "[4] moving around and preview "
.screen " "
.screen "[5] saving and loading "
.screen " "
.screen "[6] miscellaneous "
.screen " "
.screen " "
chapter1
.screen " ============= drawing ================ "
.screen " "
.screen "[joystick directions] or [crsr] to move "
.screen " "
.screen "the drawing cursor around. "
.screen " "
.screen " "
.screen "[joystick fire] or [space] to put active"
.screen " "
.screen "color in place of cursor. "
.screen " "
.screen " "
.screen "[del] to erase / put background color in"
.screen " "
.screen "place of cursor. "
.screen " "
.screen " "
chapter2
.screen " ========== changing colors =========== "
.screen " "
.screen "[1] to choose main sprite color. "
.screen " "
.screen " "
.screen "[2] to choose multi color 1. "
.screen " "
.screen " "
.screen "[3] to choose multi color 2. "
.screen " "
.screen " "
.screen "[4] to choose background color. "
.screen " "
.screen " "
.screen "[f1] or [shift+f1] to change main sprite"
.screen " "
.screen "color. "
.screen " "
.screen " "
.screen "[f3] or [shift+f3] to change multi color"
.screen " "
.screen "1. "
.screen " "
.screen " "
.screen "[f5] or [shift+f5] to change multi color"
.screen " "
.screen "2. "
.screen " "
.screen " "
.screen "[f7] or [shift+f7] to change background "
.screen " "
.screen "color. "
.screen " "
.screen " "
chapter3
.screen " ========= advanced editing =========== "
.screen " "
.screen "[cbm+space] to make floodfill aka ms "
.screen " "
.screen "paints paint bucket. "
.screen " "
.screen " "
.screen "[m] to switch on/off multicolor mode. "
.screen " "
.screen " "
.screen "[cbm+x] to cut current sprite. "
.screen " "
.screen " "
.screen "[cbm+c] to copy current sprite. "
.screen " "
.screen " "
.screen "[cbm+v] to paste from clipboard to "
.screen " "
.screen "current sprite. "
.screen " "
.screen " "
.screen "following commands also affects "
.screen "------------------------------- "
.screen "clipboard as their backbuffer: "
.screen "------------------------------ "
.screen " "
.screen "[f] to flip current sprite horizontally."
.screen " "
.screen " "
.screen "[shift+f] to flip current sprite "
.screen " "
.screen "vertically. "
.screen " "
.screen " "
.screen "[cbm+,] to slide sprite left. "
.screen " "
.screen " "
.screen "[cbm+.] to slide sprite right. "
.screen " "
.screen " "
.screen "[cbm+:] to slide sprite down. "
.screen " "
.screen " "
.screen "[cbm+@] to slide sprite up. "
.screen " "
.screen " "
chapter4
.screen " ===== moving around and preview ====== "
.screen " "
.screen "[+] or [-] to change address fo current "
.screen " "
.screen "sprite. "
.screen " "
.screen " "
.screen "[l] to lock/unlock address of first "
.screen " "
.screen "animation frame. "
.screen " "
.screen " "
.screen "[a] or [shift+a] to change number of "
.screen " "
.screen "animation frames. "
.screen " "
.screen " "
.screen "[o] or [shift+o] to change number of "
.screen " "
.screen "overlaying sprites. "
.screen " "
.screen " "
chapter5
.screen " ======== saving and loading ========== "
.screen " "
.screen "[cbm+l] to load file from diskette. "
.screen " "
.screen " "
.screen "[cbm+s] to save file on diskette. you "
.screen " "
.screen "should prefix filename with @: if you "
.screen " "
.screen "want to overwrite. "
.screen " "
.screen " "
.screen "[cbm+d] to display disk directory. "
.screen " "
.screen " "
chapter6
.screen " ========== miscellaneous ============= "
.screen " "
.screen "[cbm+q] to quit / return to basic. "
.screen " "
.screen " "
.screen "[g] to switch on/off grid mode. "
.screen " "
.screen " "
helptxtend
;------------------------------------------------
;------------------------------------------------
*=$2800
.offs $2800-*
.binary "sprite-studio-chars.raw"