-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbigscroller.asc
1625 lines (1535 loc) · 30.5 KB
/
bigscroller.asc
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
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
; MSX Block Puzzle game, released as entry for the MSXDev'20
; Created by David Heremans, aka turbor on mrc
;
; This is the code that started the entire project, it provides a smooth puxel scroller
; the font is changed each time the introscreen is shown
; This is done by on the fly creating the corner filling chars, and then performing a
; 2xSaI like algorithm
;
; Also since a lot of chars are used for the background it is not possible to
; precalculate all possible needed chars nor to reserve the maximum numbers of
; chars needed for this, so this is also dynamically handled on the fly
;
setbigfonttouse: ; in a,is font type
and 7
add a,a
add a,a
add a,a
ld de,setbigfontdb
ld l,a
ld h,0
add hl,de
ld e,(hl)
inc hl
ld d,(hl)
inc hl
ld (bigchartosimpelcnvpnt),de
ld e,(hl)
inc hl
ld d,(hl)
inc hl
ld (bigscroltopleftpnt),de
ld e,(hl)
inc hl
ld d,(hl)
inc hl
ld (bigscrolcharspnt),de
ret
setbigfontdb:
; for intro
dw introbigcharconvert
dw bigchartopleft2
;dw screen1chardb
dw bigscrolchars
dw 0
; for gameover
dw bigchartosimpelconvert
dw bigchartopleft
dw bigscrolchars
dw 0
;now simpelest charconversion aka none at all
dw introbigcharconvert2
dw bigchartopleft2
dw screen1chardb
;dw bigscrolchars
dw 0
;now simpelest charconversion aka none at all only filled becomes character 20
dw introbigcharconvert3
dw bigchartopleft3
dw screen1chardb
;dw bigscrolchars
dw 0
; extra for intro
;dw introbigcharconvert
dw bigchartosimpelconvert
dw bigchartopleft4
;dw screen1chardb
dw bigscrolchars
dw 0
setbigfontdbend:
; the lower bits of index will have
; the following meaning
; SelfFilled, Right, Left, Down, Up
; 1 means filled
bigchartosimpelconvert:
; 0 is empty, 1 is completely full
db 0, 0, 0, 0
db 0, 2, 3, 4
db 0, 5, 6, 7
db 0, 8, 9,10
db 11,12,13, 1
db 14,15,16, 1
db 17,18,19, 1
db 1, 1, 1, 1
introbigcharconvert:
; 0 is empty, 1 is completely full
db 0, 0, 0, 0
db 0, 2, 3, 0
db 0, 5, 6, 0
db 0, 0, 0, 0
db 1, 1, 1, 1
db 1,15,16, 1
db 1,18,19, 1
db 1, 1, 1, 1
introbigcharconvert2:
; 0 is empty, 1 is completely full
db 0, 0, 0, 0
db 0, 0, 0, 0
db 0, 0, 0, 0
db 0, 0, 0, 0
db 1, 1, 1, 1
db 1, 1, 1, 1
db 1, 1, 1, 1
db 1, 1, 1, 1
introbigcharconvert3:
; 0 is empty, 1 is completely full
db 0, 0, 0, 0
db 0, 2, 3, 4
db 0, 5, 6, 7
db 0, 8, 9,10
db 21,21,21,21
db 21,21,21,21
db 21,21,21,21
db 21,21,21,21
db 11,12,13,21
db 14,15,16,21
db 17,18,19,21
db 21,21,21,21
introbigcharconvert4:
; 0 is empty, 1 is completely full
db 0, 0, 0, 0
db 0, 2, 3, 4
db 0, 5, 6, 7
db 0, 8, 9,10
db 20,20,20,20
db 20,20,20,20
db 20,20,20,20
db 20,20,20,20
db 11,12,13,20
db 14,15,16,20
db 17,18,19,20
db 20,20,20,20
insertscoreinscroll: ; in hl,de
; {{{
ld b,5
insertscoreinscroll0:; first skip leading zero's
ld a,(hl)
or a
jr nz,insertscoreinscroll1
inc hl
djnz insertscoreinscroll0
insertscoreinscroll1:
ld a,(hl) ; last inc hl before djnz fall through....
cp 255
ret z
ld (de),a
inc de
inc hl
jr insertscoreinscroll1
; }}}
scrollbigtextinsertscore:
; {{{
inc hl
push hl
ld hl,realscore+1
call insertscoreinscroll
pop hl
jr scrollbigtext0
; }}}
scrollbigtextinserthiscore:
; {{{
inc hl
push hl
ld hl,hiscore+1
call insertscoreinscroll
pop hl
jr scrollbigtext0
; }}}
scrollbigtext:
; in HL text to scroll {{{
ld de,scrolltext
scrollbigtext0:
ld a,(hl)
or a
jr z,scrollbigtext3
cp 32
jr z,scrollbigtextspaceadded
cp '>'
jr z,scrollbigtextinserthiscore
cp '<'
jr z,scrollbigtextinsertscore
sub '0'
cp 10
jr c,scrollbigtext1
sub 7
cp 36
jr c,scrollbigtext1
ld a,36
scrollbigtext1:
ld (de),a
inc hl
inc de
jr scrollbigtext0
scrollbigtextspaceadded:
ld a,36
jr scrollbigtext1
scrollbigtext3: ; start actual scroll here
ld a,255
ld (de),a ; final closing marker
; setup some data
;ld hl,nametabel+31+6*32
ld de,(scrollbuflength)
dec de
ld hl,(scrollbufpnt)
add hl,de
ld (DX),hl
ld a,32
ld (DWidth),a
ld a,8
ld (SWidth),a
ld (NY),a
ld a,1
ld (NX),a
;start from char -1 since we increase immediately
ld a,(scrolltextcount)
dec a
ld (scrolltextcount),a
scrollbigtext4: ; all setup so actuall loop here
; go back to first letter of text and check if max loop count reached
ld de,scrolltext
ld (scrolltextpnt),de
ld a,(scrolltextcount)
inc a
ld (scrolltextcount),a
ld e,a
ld a,(scrolltextmaxcount)
cp e
ret z
scrollbigtext5:
; get letter to scroll in
ld de,(scrolltextpnt)
ld a,(de)
cp 255
jr z,scrollbigtext4 ; end-of-text reached
inc de
ld (scrolltextpnt),de
add a,a ; *2
add a,a ; *4
ld l,a
ld h,0
add hl,hl ; *8
ld de,(bigscrolcharspnt)
add hl,de
call chartobig ; 8 bytes to 8x8chars including corner manipulation
ld hl,workspace+100
ld (SX),hl
ld b,6
xor a
ld (waitinterrupted),a
scrollbigtext6:
push bc
;now move the scrollbuffer
bbbb:
;handle first column that will drop from scrolling
ld b,7
ld de,(scrollbufpnt)
scrollbigtext7:
push bc
push de
push de
;unregister the chars that drop of the scrollbufer
yyyy
call scrollunregistercombinerchar
pop de
pop hl
inc hl
push de
ld bc,(scrollbuflength)
ldir
pop hl
ld bc,32
add hl,bc
ex de,hl
pop bc
djnz scrollbigtext7
; now clean up scrollpatterncombinedb
call cleanupscrollpatterncombinedb
zzzz
;now copy 7 lines from (SX) to the scrollpatternendbuf
; first move the buffer and then insert the new lines
ld de,scrollpatternendbuf
ld hl,scrollpatternendbuf+1
ld bc,15
ldir
;now copy in 7 chars in correct place
ld e,0
exx
ld bc,8
ld hl,(SX)
ld de,scrollpatternendbuf+1
ld a,(hl); unrolled loop 1
ld (de),a
exx
or e
ld e,a
exx
add hl,bc
inc de
inc de
ld a,(hl); unrolled loop 2
ld (de),a
exx
or e
ld e,a
exx
add hl,bc
inc de
inc de
ld a,(hl); unrolled loop 3
ld (de),a
exx
or e
ld e,a
exx
add hl,bc
inc de
inc de
ld a,(hl); unrolled loop 4
ld (de),a
exx
or e
ld e,a
exx
add hl,bc
inc de
inc de
ld a,(hl); unrolled loop 5
ld (de),a
exx
or e
ld e,a
exx
add hl,bc
inc de
inc de
ld a,(hl); unrolled loop 6
ld (de),a
exx
or e
ld e,a
exx
add hl,bc
inc de
inc de
ld a,(hl); unrolled loop 7
ld (de),a
exx
or e
exx
jp nz,scrollbigtext77
;scrolled in all 0 chars so for proportional fontdisplay this is the end of the char!!
; so get the push bc value from scrollbigtext6: and set to end
pop bc
ld b,1
push bc
scrollbigtext77:
cccc
call preparescrollpatterncombinedb
; call doboxcopy
; ld hl,nametabel
; ld de,#1800
; ld bc,32*24
; call LDIRVM
ld b,4
scrollbigtext75:
push bc
;now scroll 4 times two pixel
call singlescrollpatterncombinedb
call bigscrollerwait
ld a,(waitinterrupted)
or a
jr nz,scrollbigtext9
; here switch the foregorund chars with the actual scrollletters first
ld hl,scrollbigtext5cont
push hl
ld hl,(bigscrolswitchfgpnt)
jp (hl)
scrollbigtext5cont:
call scrollnametabletovram
call execroutine ; perform all extra routine
; here switch the foregorund chars with the actual scrollletters
ld hl,scrollbigtext7cont
push hl
ld hl,(bigscrolswitchfgpnt)
jp (hl)
scrollbigtext7cont:
pop bc
djnz scrollbigtext75
ld hl,(SX)
inc hl
ld (SX),hl
pop bc
dec b
jp nz,scrollbigtext6
ld a,(waitinterrupted)
or a
jp z,scrollbigtext5
scrollbigtext8:
xor a
ld (waitinterrupted),a
call bigscrollerwait
ld a,(waitinterrupted)
or a
jr nz,scrollbigtext8
ret
scrollbigtext9: pop bc
pop bc
jr scrollbigtext8
;}}}
preparescrollpatterncombinedb: ; register the double chars in scrollpatternendbuf
;and set up the 16 bytes needed in singlescrollpatterncombinedb
; {{{
ld hl,(scrollbufpnt)
ld bc,(scrollbuflength)
add hl,bc
dec hl
push hl
pop iy
ld hl,scrollpatternendbuf
ld b,7 ; should this be 8 for now the lowest line is empty...
preparescrollpatterncombinedb2:
push bc
push hl
call addtoscrollpatterncombinedb
ld a,(scrollpage)
add a,192
or c
ld (iy+0),a
;ld bc,(scrollbuflength)
ld bc,32 ; since we will work in nametable aline is 32 bytes always!
add iy,bc
pop hl
pop bc
inc hl
inc hl
djnz preparescrollpatterncombinedb2
; now copy the charpatterns
ld ix,scrollpatterncombinedb
preparescrollpatterncombinedb3:
ld a,(ix+0)
cp 255
ret z
ld h,0
ld l,a
add hl,hl
add hl,hl
add hl,hl
ld de,scrollpatternsorig
add hl,de
push ix
pop de
inc de
inc de
inc de
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
ld a,(ix+1)
ld h,0
ld l,a
add hl,hl
add hl,hl
add hl,hl
ld de,scrollpatternsorig
add hl,de
push ix
pop de
inc de
inc de
inc de
inc de
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
inc de
ldi
ld de,20
add ix,de
jp preparescrollpatterncombinedb3
; }}}
bigscrollerwait:
; {{{
;
; scrolltextspeed as implemened below by skipping the halt
; doens't speed up that much but makes the scroll 'jittery'
; so temporary disabled again
;
;ld a,(scrolltextspeed)
;or a
ei
;jr nz,bigscrollerwait2
nop
nop
halt
;bigscrollerwait2:
; do not stop scrolling in intro !!!
ld a,(intromenuselect)
inc a
ret nz
; back to our regular program
call getjoystick
and #30
xor #30
ld e,a
ld a,(waitinterrupted)
or e
ld (waitinterrupted),a
ret
; }}}
scrollnametabletovram:
; {{{
ld b,7
ld hl,(scrollbufpnt)
ld de,0x1800-nametabel
add hl,de
ex de,hl
ld hl,(scrollbufpnt)
scrollnametabletovram2:
push bc
push hl
push de
ld bc,(scrollbuflength)
call LDIRVM
ld bc,32
pop hl
add hl,bc
ex de,hl
pop hl
add hl,bc
pop bc
djnz scrollnametabletovram2
ret
; }}}
singlescrollpatterncombinedb:
; {{{
ld a,(scrollpage)
xor 64
ld (scrollpage),a
; now make the patterns
ld de,tmpcharscrollpattern
ld hl,scrollpatterncombinedb
singlescrollpatterncombinedb2:
ld a,(hl)
cp 255
jr z,singlescrollpatterncombinedb4
inc hl
inc hl
inc hl
inc hl
ld b,8
eeee
singlescrollpatterncombinedb3:
ld c,(hl)
inc hl
rl (hl)
rl c
rl (hl)
rl c
dec hl
ld (hl),c
ld a,c
ld (de),a
inc de
inc hl
inc hl
djnz singlescrollpatterncombinedb3
jp singlescrollpatterncombinedb2
; no more patterns to alter
singlescrollpatterncombinedb4:
ld hl,singlescrollpatterncombinedb5
push hl
ld hl,(bigscrolchr2vrampnt)
jp (hl)
singlescrollpatterncombinedb5:
; now update the char in the nametabel
ld b,32*7
;ld hl,nametabel+6*32
ld hl,(scrollbufpnt)
ld a,(scrollpage)
ld e,a
ld d,128+63
singlescrollpatterncombinedb6:
ld a,(hl)
cp 128
jr c,singlescrollpatterncombinedb8
; ld a,d
; and (hl)
and d
or e
ld (hl),a
singlescrollpatterncombinedb8:
inc hl
djnz singlescrollpatterncombinedb6
ret
; }}}
bigscrolchr2vram2tabels:
; now write to vram pattern tables
ld a,(scrollpage)
add a,128+2 ; skip empty and full aka 0 and 1
ld h,0
ld l,a
add hl,hl
add hl,hl
add hl,hl
ld de,256*8
add hl,de
ex de,hl
push de
ld hl,tmpcharscrollpattern
ld bc,62*8
call LDIRVM
ld de,256*8
pop hl
add hl,de
ex de,hl
ld hl,tmpcharscrollpattern
ld bc,62*8
call LDIRVM
ret
bigscrolchr2vram3tabels:
; now write to vram pattern tables
ld a,(scrollpage)
add a,128+2 ; skip empty and full aka 0 and 1
ld h,0
ld l,a
add hl,hl
add hl,hl
add hl,hl
ex de,hl
push de
ld hl,tmpcharscrollpattern
ld bc,62*8
call LDIRVM
ld de,256*8
pop hl
add hl,de
ex de,hl
push de
ld hl,tmpcharscrollpattern
ld bc,62*8
call LDIRVM
ld de,256*8
pop hl
add hl,de
ex de,hl
ld hl,tmpcharscrollpattern
ld bc,62*8
call LDIRVM
ret
addtoscrollpatterncombinedb:
;{{{
;combo 0,0 and 1,1 will not be stored but simply return resp 0 and 1
ld c,(hl)
inc hl
ld b,(hl)
dec hl
ld a,b
or c
ret z
ld a,1
cp b
jr nz,addtoscrollpatterncombinedb1
cp c
ret z
addtoscrollpatterncombinedb1:
ld ix,scrollpatterncombinedb
ld c,2
addtoscrollpatterncombinedb2:
ld a,(ix+0)
cp 255
jp z,realaddtoscrollpatterncombinedb
cp (hl)
jr nz,addtoscrollpatterncombinedb5
inc hl
ld a,(ix+1)
cp (hl)
jr z,addtoscrollpatterncombinedb6
dec hl
addtoscrollpatterncombinedb5:
ld de,20
add ix,de
inc c
ld a,63 ; now debug code to see if we need to much of these overflow charcombinations
cp c
jp nc,addtoscrollpatterncombinedb2
di
halt
addtoscrollpatterncombinedb6:
; found te exisiting combination, c is the character to use
ld a,(ix+2)
ld l,a
ld a,(ix+3)
ld h,a
inc hl
ld a,h
ld (ix+3),a
ld a,l
ld (ix+2),a
ld a,c
ret
realaddtoscrollpatterncombinedb:
; add a new exisiting combination, c is the character to use
ld a,(hl)
ld (ix+0),a
inc hl
ld a,(hl)
ld (ix+1),a
xor a
ld (ix+3),a
inc a
ld (ix+2),a
ld a,255 ; set new endmarker
ld (ix+20),a
ld a,c
ret
;}}}
scrollunregistercombinerchar:
; {{{
ld a,(de)
cp 128 ; stll not one of the combinerchars so simply ignore
ret c
and 63
sub 2
ret c ; not for full empty or filled blocks, they are special :-)
; now times x20
add a,a ; 2
ld l,a
ld h,0
add hl,hl ; 4
ld e,l
ld d,h
add hl,hl ; 8
add hl,hl ; 16
add hl,de ; 20
ld de,scrollpatterncombinedb+2
add hl,de
ld e,(hl)
inc hl
ld d,(hl)
dec de
ld (hl),d
dec hl
ld (hl),e
ret
;}}}
cleanupscrollpatterncombinedb:
; {{{
ld bc,20
ld ix,scrollpatterncombinedb
ld iy,2 ; counter voor welke char is removed from nametable
cleanupscrollpatterncombinedb1:
ld a,(ix+0)
inc a
ret z ; end marker 255 read so stop
ld a,(ix+2)
or (ix+3)
jr z,cleanupscrollpatterncombinedb3
add ix,bc
inc iy
jr cleanupscrollpatterncombinedb1
cleanupscrollpatterncombinedb3:
push bc
push ix
push ix
pop hl
add hl,bc
ex de,hl
ld hl,scrollpatternendbuf; =scrollpatterncombinedb+20*32
or a
sbc hl,de
ld c,l
ld b,h
pop hl
ex de,hl
ldir
;now char is removed so adapt nametabel and decrease every char >= iy counter
push iy
pop de
ld hl,(scrollbufpnt)
ld bc,32*7
cleanupscrollpatterncombinedb4:
ld a,(hl)
cp 128
jr c,cleanupscrollpatterncombinedb5
and 63
cp e
jr c,cleanupscrollpatterncombinedb5
dec (hl) ; (hl) >= e so decrease number
cleanupscrollpatterncombinedb5:
inc hl
dec bc
ld a,b
or c
jr nz,cleanupscrollpatterncombinedb4
pop bc
jr cleanupscrollpatterncombinedb1
; }}}
chartobig:
; in hl points to char {{{
push hl
; clear 10x10 workspace (needed for 8x8 char and 1 bit border on all sides
ld hl,workspace
ld de,workspace+1
ld bc,100
xor a
ld (hl),a
ldir
ld hl,workspace+8+1
pop de
ld bc,#08ff
chartobig2:
push bc
ld a,(de)
inc de
ld b,8
chartobig4: add a,a
jr nc,chartobig6
ld (hl),c
chartobig6: inc hl
djnz chartobig4
inc hl
inc hl
pop bc
djnz chartobig2
; now copy this 10x10 to workspace+100 but width the correct chars 224-255...
ld ix,workspace+1+8
ld hl,workspace+100
ld b,8
chartobig8:
push bc
ld b,8
chartobig10:
ld de,0
; the lower bits of e will have the following meaning
; SelfFilled,Right,Left,Down,Up ; 1 means filled
ld a,(ix+0)
add a,a
rl e
ld a,(ix+1)
add a,a
rl e
ld a,(ix-1)
add a,a
rl e
ld a,(ix+10)
add a,a
rl e
ld a,(ix-10)
add a,a
rl e
inc ix
; now convert code in e to corresponding char
push bc
ex de,hl
ld bc,(bigchartosimpelcnvpnt)
add hl,bc
;ld a,224
;add a,(hl)
ld a,(hl)
ex de,hl
pop bc
ld (hl),a
inc hl
djnz chartobig10
inc ix
inc ix
pop bc
djnz chartobig8
ret ;}}}
createbigcharset0:
ld b,8
createbigcharset1:
ld a,(de)
or (ix+0)
ld (hl),a
inc ix
inc hl
inc de
djnz createbigcharset1
ret
createbigcharset:
; this charset goes from 128 up to 192 {{{
; %11100000 to %11111111
; clean workspace for 32 chars
xor a
ld hl,workspace
ld de,workspace+1
ld (hl),a
ld bc,32*8-1
ldir
; set char 1 to full filled
dec a
ld hl,workspace+8
ld de,workspace+9
ld (hl),a
ld bc,7
ldir
; create char topleft,bottomleft
ld de,workspace+8*2
ld hl,(bigscroltopleftpnt)
ld bc,16
ldir
; mix topleft and bottomleft
ld ix,workspace+8*2
ld de,workspace+8*3
ld hl,workspace+8*4
call createbigcharset0
; create char topright,bottomright