-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogotopo.asm
1152 lines (1035 loc) · 48.5 KB
/
logotopo.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
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
; Disassembly of the Topo Soft iconic animation, 1st version.
; MSX version
;
; By Miguel Colom, 2023.
; Checks:
; z80dasm 1.1.5
; command line: z80dasm -g0x9470 -l -t TOPO
; $ shasum TOPO
; 765de5f1a2e6abce2cced1127e7251a57fb9b3d2 TOPO
; $ z80asm logotopo.asm |shasum a.bin
; 765de5f1a2e6abce2cced1127e7251a57fb9b3d2 a.bin
WRTVRM: equ 0x4d
LDIRMV: equ 0x59
NUM_COLS: equ 32
NUM_ROWS: equ 24
COLOR_TABLE: equ 0x2000
COLOR_RED_BLACK: equ 0x81
COLOR_WHITE_BLACK: equ 0xf1
COLOR_SKYBLUE_BLACK: equ 0x71
COLOR_LIGHTGREEN_BLACK: equ 0x31
COLOR_WHITE_TRANSPARENT: equ 0xf0
VRAM_BUFFER: equ 0xc000
; Position in the color table of the "S" of the "SOFT" text
COLOR_TABLE_POS_S: equ COLOR_TABLE + 0xf78
; Length of a line in the "SOFT" text (8 chars)
COLOR_TABLE_SOFT_LINE_LENGTH: equ 8*8
; Tables:
; ---------------------------------------------------------------
; - TABLE_VRAM_DESTINATION:
; Indexed by object ID, this table provides pointers to
; VRAM destinations (positions).
; It stores the actual pointer corresponding to the current
; object in OBJ_VRAM_DESTINATION when the object is being drawn.
; OBJ_VRAM_DESTINATION <-- TABLE_VRAM_DESTINATION[2*P].
; The address is still modified by AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET to
; obtain the final VRAM destination in HL.
;
;
; - TABLE_PTR_OBJECT_ATTRIBS and TABLE_OBJECT_ATTRIBS
; The first table contains pointers indexed by object ID to a
; second table which contains the attributes of the object.
; The attributes are:
; - AUTOMODIF_TILE_LINES_PER_CHAR_ROW
; - AUTOMODIF_NUM_ROWS
; - The patterns
; It's indirected this way:
; TABLE_OBJECT_ATTRIBS[TABLE_PTR_OBJECT_ATTRIBS[2*Q]]
; The patterns in RAM are stored in OBJ_RAM_PATTERNS when the
; object is being drawn.
; Auto-modifiers of code
; ---------------------------------------------------------------
; - AUTOMODIF_VRAM_OBJECT_DESTINATION: sets parameter P when computing
; OBJ_VRAM_DESTINATION = TABLE_VRAM_DESTINATION[2*P].
;
; - AUTOMODIF_OBJECT_ATTRIBS_IDX: sets parameter Q when computing the
; pointer to the table of attributes of the current object:
; TABLE_OBJECT_ATTRIBS[TABLE_PTR_OBJECT_ATTRIBS[2*Q]].
;
; - AUTOMODIF_NUM_ROWS: set the number of rows (chars) of the object.
; - AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET: sets an offset in VRAM with
; respect to its normal OBJ_VRAM_DESTINATION.
; AUTOMODIF_TILE_LINES_PER_CHAR_ROW: number of tile lines to
; fill each char row.
;
; AUTOMODIF_TRANSPARENCY: controls if the patterns are
; transparent or opaque.
org 09470h
jp START ;9470 Jump to start
; *******************************************************
; * Animation of the "SOFT" text with light reflections *
; *******************************************************
REFLECTION_ANIMATION:
ld hl, COLOR_TABLE_POS_S ;9473
ld de, COLOR_TABLE_POS_S + COLOR_TABLE_SOFT_LINE_LENGTH ;9476
; In BC it stores the offset that we need to add to HL (a pointer in
; the CT for a particular tile) to be in the tile just below.
; In fact, it's subtracting 1 to the result, resulting in the
; last line of the tile on the left. Is this a bug?
;
; 32 columns (we subtract 1 since after processing the previous
; tile the pointer has been already incremented), each tile being
; 8 bytes of color.
ld bc, (NUM_COLS - 1)*8 - 1 ;9479
l947ch:
; Get out if HL == DE (it has arrive at the end of line)
and a ;947c
sbc hl,de ;947d
ret z ;947f
; Not at the end of the line
add hl,de ;9480 Fix subtraction
; Recover normal color, red over black. Upper line.
ld a, COLOR_RED_BLACK ;9481
call COPY_8_BYTES_TO_VRAM ;9483
; Recover normal color, red over black. Lower line.
push hl ;9486
add hl,bc ;9487
ld a, COLOR_RED_BLACK ;9488
call COPY_8_BYTES_TO_VRAM ;948a
pop hl ;948d
; Set white reflection color. Upper line.
push hl ;948e
ld a, COLOR_WHITE_BLACK ;948f
call COPY_8_BYTES_TO_VRAM ;9491
; Set white reflection color. Lower line.
add hl,bc ;9494
ld a,COLOR_WHITE_BLACK ;9495
call COPY_8_BYTES_TO_VRAM ;9497
pop hl ;949a
; Wait for 3 vertical retraces
ei ;949b
push bc ;949c
ld b,003h ;949d
l949fh:
halt ;949f
djnz l949fh ;94a0
pop bc ;94a2
di ;94a3
; Loop until the whole logo has been walked through
jr l947ch ;94a4
; **********************************************
; * Write 8 times value A to VRAM's address HL *
; **********************************************
COPY_8_BYTES_TO_VRAM:
push bc ;94a6
ld b, 8 ;94a7
l94a9h:
call WRTVRM ;94a9
inc hl ;94ac
djnz l94a9h ;94ad
pop bc ;94af
ret ;94b0
; ***************
; * Move object *
; ***************
MOVE_OBJECT:
; [OBJ_VRAM_DESTINATION] <-- TABLE_VRAM_DESTINATION[2*P]
AUTOMODIF_VRAM_OBJECT_DESTINATION:
ld hl,0000dh ;94b1 Parameter P is set outside, automodified code
add hl,hl ;94b4
ld de, TABLE_VRAM_DESTINATION ;94b5
add hl,de ;94b8
ld (OBJ_VRAM_DESTINATION), hl ;94b9 [OBJ_VRAM_DESTINATION] <-- TABLE_VRAM_DESTINATION[2*P]. Ex: 0x9704
; Obtain the table of attributes of the object, according to its index Q
AUTOMODIF_OBJECT_ATTRIBS_IDX:
; D1 = HL <-- TABLE_PTR_OBJECT_ATTRIBS + 2*Q
ld hl,0000eh ;94bc Parameter Q is set outside, automodified code
; Ex: HL=7
add hl,hl ;94bf
ld de, TABLE_PTR_OBJECT_ATTRIBS ;94c0
add hl,de ;94c3 Ex: HL = 0x96A2
; DE <-- [D1] = TABLE_PTR_OBJECT_ATTRIBS[2*Q]
ld e,(hl) ;94c4
inc hl ;94c5
ld d,(hl) ;94c6
; Ex: DE = 0x038E
; Obtain object attributes
; D2 = [D1] + TABLE_OBJECT_ATTRIBS = TABLE_OBJECT_ATTRIBS[TABLE_PTR_OBJECT_ATTRIBS[2*Q]]
ld hl, TABLE_OBJECT_ATTRIBS ;94c7
add hl,de ;94ca
; Ex: HL = 0x9AB6
; Explanation.
; First it obtains the address D1 = TABLE_PTR_OBJECT_ATTRIBS[2*Q]
; And it performs a second indirection: D2 = TABLE_OBJECT_ATTRIBS[D1] = TABLE_OBJECT_ATTRIBS[TABLE_PTR_OBJECT_ATTRIBS[2*Q]]
; In D2 it finds three fields:
; AUTOMODIF_TILE_LINES_PER_CHAR_ROW
; AUTOMODIF_NUM_ROWS
; The patterns
; Obtain the number of tile lines to fill each char row
; A = [D2] = TABLE_OBJECT_ATTRIBS[TABLE_PTR_OBJECT_ATTRIBS[2*Q]]
ld a,(hl) ;94cb Ex: A=48
ld (AUTOMODIF_TILE_LINES_PER_CHAR_ROW + 1),a ;94cc
; Obtain the number of rows (chars) of the object
inc hl ;94cf
ld a,(hl) ;94d0 Ex: A=0xB
ld (AUTOMODIF_NUM_ROWS + 1),a ;94d1
; Store the address of the patterns
; Copy from RAM's OBJ_RAM_PATTERNS...
inc hl ;94d4
ld (OBJ_RAM_PATTERNS),hl ; Ex: 0x9AB8
; ... to VRAM's OBJ_VRAM_DESTINATION
ld ix,(OBJ_VRAM_DESTINATION) ;94d8 IX <-- [OBJ_VRAM_DESTINATION] = TABLE_VRAM_DESTINATION + 2*P. Ex: 0x9704
AUTOMODIF_NUM_ROWS:
ld c, 5 ;94dc Number of rows (chars) of the object
write_all_tiles:
; DE <-- TABLE_VRAM_DESTINATION[2*P], the VRAM address
ld e,(ix+000h) ;94de
inc ix ;94e1
ld d,(ix+000h) ;94e3
inc ix ;94e6
; Ex: DE = 0xC600
; Get the VRAM destination in HL
; Get the address of the pattern of this particular object in DE
AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET:
ld hl,000b0h ;94e8
add hl,de ;94eb
;
ld de,(OBJ_RAM_PATTERNS) ;94ec Ex: 0x9AB8
; Set the number of tile pattern lines that it needs to copy in that char row
; For example, if B=0x48 (72), then it's 72 / 8 = 9 tiles.
AUTOMODIF_TILE_LINES_PER_CHAR_ROW:
ld b,018h ;94f0
; Draw a line of the object's tile
draw_tile_line:
; Read a line of the tile pattern
ld a,(de) ;94f2
; It can be a 0: NOP or a 0xB6: OR (HL)
AUTOMODIF_TRANSPARENCY:
nop ;94f3
; Ex: DE = 0x9AB8 --> Patterns to draw
; Ex: HL = 0xC600 --> VRAM destination
inc de ;94f4
res 7,h ;94f5
res 6,h ;94f7
; Ex: HL = 0x600
; Function: Writes data in VRAM
; Input : HL - Address
; A - Value
call WRTVRM ;94f9
inc hl ;94fc
set 6,h ;94fd
set 7,h ;94ff
djnz draw_tile_line ;9501
ld (OBJ_RAM_PATTERNS),de ;9503
dec c ;9507
jr nz,write_all_tiles ;9508
ret ;950a
; *****************************************
; * Animation of the "SOFT" text rotating *
; *****************************************
ROTATE_SOFT:
; Object setup
ld a, 15 ;950b
ld (AUTOMODIF_VRAM_OBJECT_DESTINATION + 1),a ;950d
ld a, 120 ;9510
ld (AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET + 1),a ;9512
; Write a NOP in the auto-modificable code
xor a ;9515
ld (AUTOMODIF_TRANSPARENCY),a ;9516
; Draw different rotations according to the object IDX
ld hl,TABLE_PTR_OBJECT_ATTRIBS + 15*2 ;9519
l951ch:
; Read object IDX. Exit if 0xff marker.
ld a,(hl) ;951c
cp 0ffh ;951d
ret z ;951f
ld (AUTOMODIF_OBJECT_ATTRIBS_IDX + 1),a ;9520
push hl ;9523
; Pause for two retraces
ei ;9524
ld b,002h ;9525
l9527h:
halt ;9527
djnz l9527h ;9528
di ;952a
; Draw object and loop until finished
call MOVE_OBJECT ;952b
pop hl ;952e
inc hl ;952f
jr l951ch ;9530
; *****************
; * Move letter T *
; *****************
MOVE_T:
; Configure object ID
ld a, 7 ;9532
ld (AUTOMODIF_OBJECT_ATTRIBS_IDX + 1),a ;9534
ld a, 6 ;9537
ld (AUTOMODIF_VRAM_OBJECT_DESTINATION + 1),a ;9539
ld a, 0 ;953c
l953eh:
cp NUM_ROWS ;953e
ret z ;9540
; Configure offset
ld (AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET + 1),a ;9541
; Draw object
push af ;9544
call MOVE_OBJECT ;9545
pop af ;9548
; Move to the right
add a, 8 ;9549
jr l953eh ;954b Loop until finished
; *****************
; * Move letter P *
; *****************
MOVE_P:
; Configure object ID
ld a, 9 ;954d
ld (AUTOMODIF_OBJECT_ATTRIBS_IDX + 1),a
ld a, 7 ;9552
ld (AUTOMODIF_VRAM_OBJECT_DESTINATION + 1),a
; Put in its position
ld a, 144 ;9557
l9559h:
cp 80 ;9559 Move from 144 to 80 (8 steps)
ret z ;955b
ld (AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET + 1),a ;955c
push af ;955f
; Wait one retrace
ei ;9560
halt ;9561
di ;9562
; Draw object
call MOVE_OBJECT ;9563
pop af ;9566
; Move to the left
sub 008h ;9567
jr l9559h ;9569
; ****************************
; * Move letter O: fall down *
; ****************************
FALL_O:
; Write a OR (HL) in the auto-modificable code
ld a,0b6h ;956b Opcode for OR (HL)
ld (AUTOMODIF_TRANSPARENCY),a ;956d
; Configure object ID
ld a, 8 ;9570
ld (AUTOMODIF_OBJECT_ATTRIBS_IDX + 1),a ;9572
ld a,56 ;9575
ld (AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET + 1),a ;9577
ld a,0 ;957a
l957ch:
; Repeat 7 times: move O down
cp 7 ;957c
jr z,l958bh ;957e
ld (AUTOMODIF_VRAM_OBJECT_DESTINATION + 1),a ;9580
push af ;9583 f5 .
call MOVE_OBJECT ;9584 cd b1 94 . . .
pop af ;9587 f1 .
inc a ;9588 3c <
jr l957ch ;9589 18 f1 . .
l958bh:
; Do the last copy and exit
jp MOVE_OBJECT ;958b c3 b1 94 . . .
; ***********************
; * Move letter O: jump *
; ***********************
JUMP_O:
ld a, 10 ;958e
ld (AUTOMODIF_OBJECT_ATTRIBS_IDX + 1),a ;9590
ld hl, TABLE_PTR_OBJECT_ATTRIBS + 28*2 ;9593
l9596h:
; Read value and exit if 0xff
ld a,(hl) ;9596
cp 0ffh ;9597
jr z,l95abh ;9599
inc hl ;959b
; Update position
ld (AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET + 1),a ;959c 32 e9 94 2 . .
ld a,(hl) ;959f 7e ~
inc hl ;95a0 23 #
ld (AUTOMODIF_VRAM_OBJECT_DESTINATION + 1),a ;95a1 32 b2 94 2 . .
push hl ;95a4 e5 .
call MOVE_OBJECT ;95a5 cd b1 94 . . .
pop hl ;95a8 e1 .
jr l9596h ;95a9 18 eb . .
l95abh:
jp MOVE_OBJECT ;95ab
NICE_GLINT:
ld hl, TABLE_PTR_OBJECT_ATTRIBS + 42*2 + 1 ;95ae
l95b1h:
; Read object IDs until 0xff marker found
ld a,(hl) ;95b1
cp 0ffh ;95b2
ret z ;95b4
push hl ;95b5
; Configure object attributes
ld (AUTOMODIF_OBJECT_ATTRIBS_IDX + 1),a ;95b6
ld a, 176 ;95b9
ld (AUTOMODIF_VRAM_OBJ_DESTINATION_OFFSET + 1),a ;95bb
ld a,13 ;95be
ld (AUTOMODIF_VRAM_OBJECT_DESTINATION + 1),a ;95c0
; Pause for 4 retraces
ei ;95c3
ld b,004h ;95c4
l95c6h:
halt ;95c6
djnz l95c6h ;95c7
di ;95c9
; Draw object
call MOVE_OBJECT ;95ca
; Loop until finished
pop hl ;95cd
inc hl ;95ce
jr l95b1h ;95cf
; ********************
; * Main entry point *
; ********************
START:
di ;95d1
; Write a NOP in the auto-modificable code
xor a ;95d2
ld (AUTOMODIF_TRANSPARENCY),a ;95d3
call RESET_CGT ;95d6
call MOVE_T ;95d9
call MOVE_P ;95dc
call COPY_VRAM_TO_BUFFER ;95df
call FALL_O ;95e2
call COPY_VRAM_TO_BUFFER ;95e5
call JUMP_O ;95e8
call ADD_COLORS_TO_TOPO ;95eb
call SET_TOPO_TEXT_COLOR ;95ee
call ROTATE_SOFT ;95f1
call ROTATE_SOFT ;95f4
call ROTATE_SOFT ;95f7
call REFLECTION_ANIMATION ;95fa
call NICE_GLINT ;95fd
ei ;9600
ret ;9601
; ********************************************************************
; * Reset the Characters Colour Table (CT) to white over transparent *
; ********************************************************************
RESET_CGT:
ld hl,COLOR_TABLE ;9602
ld bc, NUM_COLS * NUM_ROWS * 8 ;9605 Number of bytes in the CT
l9608h:
ld a,COLOR_WHITE_TRANSPARENT ;9608
call WRTVRM ;960a
inc hl ;960d
dec bc ;960e
ld a,b ;960f
or c ;9610 Finished?
jr nz,l9608h ;9611 No, keep copying
ret ;9613
; ***************************************************
; * Set the red over black color to the "TOPO" text *
; ***************************************************
SET_TOPO_TEXT_COLOR:
ld hl, COLOR_TABLE_POS_S ;9614
ld a,COLOR_RED_BLACK ;9617
; Repeat the following twice
ld c,2 ;9619
l961bh:
; Copy the color to 8 tiles in VRAM's HL
ld b, 8*8 ;961b 8 horizontal tiles, each of 8 bytes of color
l961dh:
call WRTVRM ;961d Set color
inc hl ;9620
djnz l961dh ;9621 Loop until the line of chars is ready
; Now do the line below
ld de,24*8 ;9623 Point HL to the next row of chars
add hl,de ;9626
dec c ;9627
jr nz,l961bh ;9628 Repeat a second time
ret ;962a
; *********************************************************
; * Add colors to the TOPO logo, blue and green column by *
; * column, in mirror symmetry *
; *********************************************************
ADD_COLORS_TO_TOPO:
ld de,00008h ;962b 11 08 00 . . .
ld hl,02658h ;962e 21 58 26 ! X &
l9631h:
; Draw upper part of the column in blue
push hl ;9631
ld b, 5 ;9632 Draw 5 chars
push de ;9634
l9635h:
ld a, COLOR_SKYBLUE_BLACK ;9635
call sub_967eh ;9637
ld de, 248 ;963a
add hl,de ;963d Next row
djnz l9635h ;963e
; Draw lower part of the column in green
ld b, 6 ;9640 Draw 6 chars
l9642h:
ld a, COLOR_LIGHTGREEN_BLACK ;9642
call sub_967eh ;9644
add hl,de ;9647 Next row
djnz l9642h ;9648
pop de ;964a
pop hl ;964b
push hl ;964c
; Point to next column
add hl,de ;964d
push de ;964e
; Now it'll draw two other columns, in mirror symmetry
; Draw upper part of the column in blue
ld b, 5 ;964f Draw 5 chars
l9651h:
ld a,COLOR_SKYBLUE_BLACK ;9651
call sub_967eh ;9653
ld de, 248 ;9656
add hl,de ;9659 Next row
djnz l9651h ;965a
; Draw lower part of the column in green
ld b, 6 ;965c Draw 6 chars
l965eh:
ld a,COLOR_LIGHTGREEN_BLACK ;965e
call sub_967eh ;9660
add hl,de ;9663 Next row
djnz l965eh ;9664
pop de ;9666
pop hl ;9667
; Exit if finished
ld a,e ;9668
cp 152 ;9669
ret z ;966b
; Wait for 4 retraces
ei ;966c
ld b, 4 ;966d
l966fh:
halt ;966f
djnz l966fh ;9670
di ;9672
; Move one column to the left
add a,16 ;9673 c6 10 . .
ld e,a ;9675 5f _
push de ;9676 d5 .
ld de, -8 ;9677 11 f8 ff . . .
add hl,de ;967a 19 .
pop de ;967b d1 .
jr l9631h ;967c 18 b3 . .
sub_967eh:
ld c,008h ;967e 0e 08 . .
l9680h:
call WRTVRM ;9680 cd 4d 00 . M .
inc hl ;9683 23 #
dec c ;9684 0d .
jr nz,l9680h ;9685 20 f9 .
ret ;9687 c9 .
; ***************************************************************
; * Copy the contents on the VRAM's patterns generator table to *
; * the buffer *
; ***************************************************************
COPY_VRAM_TO_BUFFER:
ld hl, 00000h ;9688 Pattern generator table
ld de, VRAM_BUFFER ;968b Buffer
ld bc, 24*32*8 ;968e 32 columns, 20 rows, 8 bytes per char
; Block transfer to memory from VRAM
; BC: Block length
; DE: Start address of memory
; HL: Start address of VRAM
jp LDIRMV ;9691
TABLE_PTR_OBJECT_ATTRIBS:
dw 0x0, 0x82, 0x104, 0x186, 0x208, 0x28a, 0x30c, 0x38e
dw 0x6a8, 0x7ea, 0x9cc, 0xbfe, 0xc78, 0xcf2, 0xd6c, 0x0101
dw 0x202, 0x303, 0x404, 0x505, 0x606, 0x505, 0x404, 0x303
dw 0x202, 0x101, 0x0, 0xffff, 0x630, 0x530, 0x430, 0x438
dw 0x338, 0x240, 0x248, 0x150, 0x258, 0x260, 0x368, 0x470
dw 0x570, 0x670, 0xbff, 0xd0c, 0xb0c, 0xd0c, 0xff0e, 0x0
OBJ_RAM_PATTERNS:
ld c,0a5h ;96f4
OBJ_VRAM_DESTINATION:
ld (de),a ;96f6
sub a ;96f7
TABLE_VRAM_DESTINATION:
dw 0xc000, 0xc100, 0xc200, 0xc300, 0xc400, 0xc500, 0xc600, 0xc700
dw 0xc800, 0xc900, 0xca00, 0xcb00, 0xcc00, 0xcd00, 0xce00, 0xcf00
dw 0xd000, 0xd100, 0xd200, 0xd300, 0xd400, 0xd500, 0xd600, 0xd700
; The attributes are:
; - AUTOMODIF_TILE_LINES_PER_CHAR_ROW
; - AUTOMODIF_NUM_ROWS
; - The patterns
; ./db_block.py --start 38696 --offset 38000 --end 42253 ../a.bin
TABLE_OBJECT_ATTRIBS:
db 64
db 2
db 0x0, 0x0, 0x0, 0x1f, 0x3f, 0x78; 0x9728 - 0x972f
db 0x70, 0x3f, 0x0, 0x0, 0x0, 0xe0, 0xf8, 0x3c; 0x9730 - 0x9737
db 0x1, 0xfd, 0x0, 0x0, 0x0, 0x1f, 0x7f, 0xf8; 0x9738 - 0x973f
db 0xc0, 0x80, 0x0, 0x0, 0x0, 0xf0, 0xfc, 0x3e; 0x9740 - 0x9747
db 0x7, 0x3, 0x0, 0x0, 0x0, 0x3, 0x7, 0x1e; 0x9748 - 0x974f
db 0x38, 0x3f, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0; 0x9750 - 0x9757
db 0x0, 0x80, 0x0, 0x0, 0x0, 0x9f, 0x9f, 0x90; 0x9758 - 0x975f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xfe, 0xc2; 0x9760 - 0x9767
db 0xc0, 0xc0, 0xf, 0x70, 0x38, 0x1f, 0x7, 0x0; 0x9768 - 0x976f
db 0x0, 0x0, 0xfd, 0x1c, 0x38, 0xf0, 0xc0, 0x0; 0x9770 - 0x9777
db 0x0, 0x0, 0xc0, 0xf0, 0x7c, 0x1f, 0x7, 0x0; 0x9778 - 0x977f
db 0x0, 0x0, 0x7, 0x1e, 0x7c, 0xf0, 0xc0, 0x0; 0x9780 - 0x9787
db 0x0, 0x0, 0x3f, 0x30, 0x30, 0x30, 0x30, 0x0; 0x9788 - 0x978f
db 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9790 - 0x9797
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9798 - 0x979f
db 0x0, 0x0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x0; 0x97a0 - 0x97a7
db 0x0, 0x0
; ***********************************
db 64
db 2
db 0x0, 0x0, 0x0, 0x0; 0x97a8 - 0x97af
db 0x0, 0x0, 0x1f, 0x78, 0x0, 0x0, 0x0, 0x0; 0x97b0 - 0x97b7
db 0x0, 0x0, 0xe0, 0x3c, 0x0, 0x0, 0x0, 0x0; 0x97b8 - 0x97bf
db 0x0, 0x0, 0x1f, 0xf8, 0x0, 0x0, 0x0, 0x0; 0x97c0 - 0x97c7
db 0x0, 0x0, 0xf0, 0x1e, 0x0, 0x0, 0x0, 0x0; 0x97c8 - 0x97cf
db 0x0, 0x0, 0x3, 0x1e, 0x0, 0x0, 0x0, 0x0; 0x97d0 - 0x97d7
db 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0; 0x97d8 - 0x97df
db 0x0, 0x0, 0x9f, 0x90, 0x0, 0x0, 0x0, 0x0; 0x97e0 - 0x97e7
db 0x0, 0x0, 0xfe, 0xc2, 0x3f, 0x70, 0x1f, 0x0; 0x97e8 - 0x97ef
db 0x0, 0x0, 0x0, 0x0, 0xfd, 0x1c, 0xf0, 0x0; 0x97f0 - 0x97f7
db 0x0, 0x0, 0x0, 0x0, 0x80, 0xf0, 0x3f, 0x0; 0x97f8 - 0x97ff
db 0x0, 0x0, 0x0, 0x0, 0x3, 0x1e, 0xf8, 0x0; 0x9800 - 0x9807
db 0x0, 0x0, 0x0, 0x0, 0x3f, 0x30, 0x30, 0x0; 0x9808 - 0x980f
db 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0; 0x9810 - 0x9817
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9818 - 0x981f
db 0x0, 0x0, 0x0, 0x0, 0xc0, 0xc0, 0xc0, 0x0; 0x9820 - 0x9827
db 0x0, 0x0, 0x0, 0x0
; ***************************************
db 64
db 2
db 0x0, 0x0; 0x9828 - 0x982f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x0, 0x0; 0x9830 - 0x9837
db 0x0, 0x0, 0x0, 0x0, 0x0, 0xe0, 0x0, 0x0; 0x9838 - 0x983f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0x0, 0x0; 0x9840 - 0x9847
db 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0; 0x9848 - 0x984f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0; 0x9850 - 0x9857
db 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0; 0x9858 - 0x985f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f, 0x0, 0x0; 0x9860 - 0x9867
db 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0x3f, 0x1f; 0x9868 - 0x986f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfd, 0xf0; 0x9870 - 0x9877
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0, 0x7f; 0x9878 - 0x987f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xfc; 0x9880 - 0x9887
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x30; 0x9888 - 0x988f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0; 0x9890 - 0x9897
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9898 - 0x989f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0, 0xc0; 0x98a0 - 0x98a7
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
; *****************************************
db 64
db 2
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98b0 - 0x98b7
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98b8 - 0x98bf
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98c0 - 0x98c7
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98c8 - 0x98cf
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98d0 - 0x98d7
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98d8 - 0x98df
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98e0 - 0x98e7
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98e8 - 0x98ef
db 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98f0 - 0x98f7
db 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x98f8 - 0x98ff
db 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9900 - 0x9907
db 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9908 - 0x990f
db 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9910 - 0x9917
db 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9918 - 0x991f
db 0x9f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9920 - 0x9927
db 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9928 - 0x992f
; *****************************************
db 64
db 2
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9930 - 0x9937
db 0x0, 0x1f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9938 - 0x993f
db 0x0, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9940 - 0x9947
db 0x0, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9948 - 0x994f
db 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9950 - 0x9957
db 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9958 - 0x995f
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9960 - 0x9967
db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0; 0x9968 - 0x996f
db 0x0, 0xc0, 0x3f, 0x1f, 0x0, 0x0, 0x0, 0x0; 0x9970 - 0x9977
db 0x0, 0x0, 0xfd, 0xe0, 0x0, 0x0, 0x0, 0x0; 0x9978 - 0x997f
db 0x0, 0x0, 0xc0, 0x7f, 0x0, 0x0, 0x0, 0x0; 0x9980 - 0x9987
db 0x0, 0x0, 0x7, 0xfc, 0x0, 0x0, 0x0, 0x0; 0x9988 - 0x998f
db 0x0, 0x0, 0x3f, 0x3, 0x0, 0x0, 0x0, 0x0; 0x9990 - 0x9997
db 0x0, 0x0, 0x80, 0xff, 0x0, 0x0, 0x0, 0x0; 0x9998 - 0x999f
db 0x0, 0x0, 0x0, 0x9f, 0x0, 0x0, 0x0, 0x0; 0x99a0 - 0x99a7
db 0x0, 0x0, 0xc0, 0xfe, 0x0, 0x0, 0x0, 0x0; 0x99a8 - 0x99af
db 0x0, 0x0
; *****************************************
db 64
db 2
db 0x0, 0x0, 0x0, 0x0; 0x99b0 - 0x99b7
db 0x0, 0x0, 0x1f, 0x70, 0x0, 0x0, 0x0, 0x0; 0x99b8 - 0x99bf
db 0x0, 0x0, 0xf0, 0x1c, 0x0, 0x0, 0x0, 0x0; 0x99c0 - 0x99c7
db 0x0, 0x0, 0x3f, 0xf0, 0x0, 0x0, 0x0, 0x0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