-
Notifications
You must be signed in to change notification settings - Fork 1
/
GUI.a80
2031 lines (1929 loc) · 27.5 KB
/
GUI.a80
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
include "nasobeniHLDE.a80"
; include "draw.a80"
include "draw-jugo.a80"
include "cls.a80"
; include "sprite1.a80"
CaroLogo incbin "CaroLogo.bin"
NewdimLogo incbin "NewdimLogo.bin"
include "sprite2.a80"
eightbc_i incbin "8BC_I.cde"
EasyLogoSmall incbin "EasyLogoSmall.bin"
; include "lbaread.a80" ;vlozeno primo do kodu GUI
zvuk incbin "ZVUK.BIN"
zvukend
@SP_TAB
@TAB_sprite1 defb 10,2
defw CaroLogo
defb 24,20
defw NewdimLogo
defb 0,21
defw eightbc_i
defb 1,2
defw eightbc_i
defb 25,2
defw EasyLogoSmall
module GUI
zvukcmp equ 60000 ;adresa zkopilovaneho zvuku
gui di
; xor a
; out (254),a
;splash screen
ld a,(@showsplash)
or a
jr z,nosplash
ld hl,zvuk
ld de,zvukcmp
ld bc,zvukend-zvuk
ldir
; presune zvuk na sve misto
; init
call cls.CLS
ld a,2
call sprite2.SP_
ld a,1
ld b,10 ;was 40
call zvukplay
ld a,1
call sprite2.SP_
ld a,2
ld b,10 ;was 40
call zvukplay
xor a
call sprite2.SP_
;/* ld hl,22528+256+32
; ld de,22529+256+32
; ld bc,255-32
; ld (hl),6
; ldir
;*/
ld hl,TEXT2
ld bc,#0a0d
call T42_TEXT
ld a,3
ld b,100 ;was 128
call zvukplay
call zvukcmp+57 ;ticho
; call ANYKEY
nosplash
call cls.CLS
call T_START
; vykresli tabulku
ld a,3
call sprite2.SP_
ld a,4
call sprite2.SP_
ld hl,TEXT1
ld bc,#020a
call T42_TEXT
ld hl,TEXT2
ld bc,#030d
call T42_TEXT
;carymary
ld bc,#0E3b
ld de,#0EBF
call draw_jugo.DRAW
ld bc,#213b
ld de,#21BF
call draw_jugo.DRAW
ld bc,#0F3a
ld de,#203a
call draw_jugo.DRAW
ld bc,#0FC0
ld de,#20C0
call draw_jugo.DRAW
;MASTER IDENTIFY
ld hl,TEXT3
ld bc,#0502
call T42_TEXT
ld ix,BUFFER
ld a,%00000000
call IDENTIFY
; xor a ;testovaci
ld hl,TEXT16
push af
jr z,TISKSTATUS1 ;OK
ld hl,TEXT11
cp 255
jp z,TISKSTATUS1
ld hl,TEXT14
cp 6
jp z,TISKSTATUS1
ld hl,TEXT13
cp 3
jp z,TISKSTATUS1
ld hl,TEXT12
dec a
jp z,TISKSTATUS1
ld hl,TEXT15
; jp LER1
TISKSTATUS1
ld bc,#050F
call T42_TEXT
pop af
jr z,MASTERINFO
ld h,0
ld l,a
ld bc,#0526
call NUMBER2
;pokud je General setting nastavena autoconfigurace, tak pri neuspesnem detekovani zarizeni se do CHS ulozi nuly a HDD pak nasledne nebude nainstalovan
ld a,(@autoconfig)
or a
jr z,nemenCHSm1
xor a
ld b,4
ld hl,VDT
nulydoCHSm
ld (hl),a
inc hl
djnz nulydoCHSm
nemenCHSm1
jp Slaveinentify
MASTERINFO
ld hl,TEXT4
ld bc,#0602
call T42_TEXT
ld hl,TEXT5
ld bc,#0702
call T42_TEXT
ld hl,TEXT6
ld bc,#0802
call T42_TEXT
ld hl,TEXT7
ld bc,#0902
call T42_TEXT
ld hl,TEXT101
ld bc,#0A02
call T42_TEXT
ld hl,TEXT102
ld bc,#0A15
call T42_TEXT
;model
ld hl,BUFFER+54
ld b,40
call PROHOD
set 7,(ix+84)
ld bc,#0609
call T42_TEXT
;firmware
ld hl,BUFFER+46
ld b,8
call PROHOD
set 7,(ix+53)
ld bc,#070C
call T42_TEXT
;serial number
ld hl,BUFFER+20
ld b,20
call PROHOD
set 7,(ix+39)
ld bc,#0811
call T42_TEXT
;LBA
ld hl,TEXT_NO
bit 1,(ix+99)
jr z,L1
ld hl,TEXT_YES
L1 ld bc,#090D
call T42_TEXT
;DMA
ld hl,TEXT_NO
bit 0,(ix+99)
jr z,L2
ld hl,TEXT_YES
L2 ld bc,#0925
call T42_TEXT
;CHS
;Cylinders
ld l,(ix+2)
ld h,(ix+3)
ld bc,#0A09
call NUMBER4
;Heads
ld l,(ix+6)
ld h,(ix+7)
ld bc,#0A0f
call NUMBER1
;Sectors
ld l,(ix+12)
ld h,(ix+13)
ld bc,#0A12
call NUMBER1
;pokud je General setting nastavena autoconfigurace, tak pri uspesnem detekovani zarizeni se do CHS ulozi zjistene udaje
ld a,(@autoconfig)
or a
jr z,nemenCHSm2
ld hl,VDT
ld a,(ix+12)
ld (hl),a
ld a,(ix+6)
inc hl
ld (hl),a
ld a,(ix+2)
inc hl
ld (hl),a
ld a,(ix+3)
inc hl
ld (hl),a
nemenCHSm2
;capacity
ld l,(ix+12)
ld h,(ix+13)
ld e,(ix+6)
ld d,(ix+7)
push ix ;rutina nasob pouziva IX
call nasobeniHLDE.nasob
pop ix
ld e,(ix+2)
ld d,(ix+3)
push ix
call nasobeniHLDE.nasob
;vysledek je v IXHL
ld l,h
ld a,xl
ld h,a
ld e,hx
;delime 256 vysledek EHL
ld b,3
trikrat1
srl e
rr h
rr l
djnz trikrat1
;delime tremi
ld bc,#0A1F
call NUMBER4
pop ix
;LBA 48Bits
inc hx
ld hl,TEXT_NO
bit 2,(ix-83)
jr z,L3
ld hl,TEXT_YES
L3 ld bc,#091C
call T42_TEXT
;
;hledani prvni sectoru pro data
;prohledava se MBR, prvni partion, a hleda se v root dir. prvni datovy sector prvniho souboru
;prvni sektor disku je MBR:
;
;na 1BEh zacinaji parametry prvni partition (10h ka�d�)
;na 08h a� 0Bh je cislo relativniho sektoru zacatku partition (nebo na 01h a� 03h ve formatu hlava/sektor/cylindr)
;
;prvn� sektor partition je BOOT a tam jsou tyto zaj�mav� �daje:
;0Bh, 0Ch � pocet bytu na sektor
;0Eh, 0Fh � pocet sektoru pred prvni FAT
;10h � pocet FAT
;11h, 12h � pocet polozek v ROOTu
;16h, 17h � pocet sektoru ve FAT
;prvn� datov� sektor je: zacatek_partition + sektoru_pred_FAT + sektoru_ve_FAT * pocet_FAT + polozek_v_ROOT * 20h / bytu_na_sektor
ld hl,TEXTPARSEC
ld bc,#0B02
call T42_TEXT
;nacteni MBR
ld ix,BUFFER
ld a,%00000000 ;master
ld bc,0
ld de,0 ;LBA=0 MBR
call LBAREAD
; dodelat osetreni erroru
inc hx
inc hx ;+512
;; novy kod je-li vubec MBR pritomen
ld de,0 ;;FAT boot sector zacina na LBA0, pokud neni MBR
ld a,(ix-66) ;;1BE
and 127 ;;80h or 00h MRB first partion table does exist
jr nz, MBRno
ld a,(ix-64) ;;1C0
and a ;;pokud existuje patition, tak sector je nenulova
jr z, MBRno
MBRyes
;; end of novy kod je-li vubec MBR pritomen
ld e,(ix-58) ;info o prvni partition zacina na #1BE
ld d,(ix-57)
MBRno ex de,hl ;v hl je cislo sectoru kde zacina boot prvni par.
ld (bootsec+1),hl ;schovame cislo bootsectoru pro vypocet
ld bc,#0B10
push hl
call NUMBER3
;nacteni BOOT sectoru prvni partition
pop hl
ld c,l
ld e,h
ld d,0
ld b,d
ld ix,BUFFER
ld a,%00000000 ;master
call LBAREAD
; dodelat osetreni erroru
; vypocet datove oblasti prvniho souboru
ld hl,TEXTDATASEC
ld bc,#0B15
call T42_TEXT
bootsec ld hl,0
ld e,(ix+14) ;pricteme sectory pred FAT
ld d,(ix+15)
add hl,de
push hl
push ix
ld e,(ix+16) ;pocet FAT
ld d,0
ld l,(ix+22) ;pocet sektoru ve FAT
ld h,(ix+23)
call nasobeniHLDE.nasob ;vysledek v IXHL
pop ix
pop de
add hl,de ;pricteme jen spodnich 16 bitu
;; v HL je LBA Root Directory sectoru
ld e,(ix+17) ;pocet polozek v ROOTu
ld d,(ix+18)
;; novy kod pro vypocet prvniho datoveho sektoru s ohleden na souboru v rootu
ld c,(ix+0dh) ;;pocet sectoru v clusteru, obvykle 64 (32KB cluster)
ld b,0
push de
push hl
push bc
;;nacteni Root Directory sectoru
ld c,l
ld e,h
ld d,0
ld b,d
ld ix,BUFFER
ld a,%00000000 ;master
call LBAREAD
ld b,8 ;;prohledam prvnich 8 polozek, jestli zde neni mbd nebo mbh soubor, hledam jen priponu
ld de,32 ;; kazda polozka ma 32 bytes
nextfile
ld a,(ix+08h)
cp "M"
jr nz, neplatne
ld a,(ix+09h)
cp "B"
jr nz, neplatne
ld a,(ix+0ah)
cp "H"
jr z, platne
cp "D"
jr z, platne
neplatne
add ix,de
djnz nextfile
ld e,2 ;;pokud nenajdu pouziji cluster 0
jr l1F
platne ld e,(ix+1ah) ;;cluster na kterem zacina soubor
l1F ld d,0
dec de ;;The clusters are numbered starting at 2, not 0! So the above calculation has to have 2 added to it to get the cluster number of a given allocation unit...and a cluster number is converted to an allocation unit number by subtracting 2...!
dec de
pop hl ;;pocet sectoru v clusteru, obvykle 64 (32KB cluster)
call nasobeniHLDE.nasob ;; vysledek v IXHL
ex de,hl
pop hl ;; v HL je LBA Root Directory sectoru
add hl,de
pop de
;; konec kodu pro vypocet prvniho datoveho sektoru s ohleden na souboru v rootu
; vydelime 16; predpokladame velikost sec. 512 a 32bytu v root polozce
ld b,4
ctyrikrat1
srl d
rr e
djnz ctyrikrat1
add hl,de
push hl
ld bc,#0B23
call NUMBER4
pop hl
;pokud je General setting nastavena autoconfigurace, tak ulozi vypocteny prvni datovy sector
ld a,(@autoconfig)
or a
jr z,nemenfirstdatasectorm1
ld de,VDT+5
ex de,hl
ld (hl),e
inc hl
ld (hl),d
nemenfirstdatasectorm1
;/*
;LBA Total sectors
;
; ld hl,(BUFFER+200)
; ld (D1LBA),hl
; ld bc,#0A24
; call NUMBER4
;
; ld hl,(BUFFER+202)
; ld (D1LBA+2),hl
; ld bc,#0A1E
; call NUMBER4
;
; ld hl,(BUFFER+204)
; ld (D1LBA+4),hl
; ld bc,#0A18
; call NUMBER4
;
;
; ld hl,TEXT16
;LER1
; ld bc,#050F
; call T42_TEXT
;
; pop af
; ld h,0
; ld l,a
; ld bc,#0524
; call NUMBER4
;*/
;
;SLAVE IDENTIFY
Slaveinentify
;/* ;vyruseni SLAVE
;
; ld hl,TEXT8
; ld bc,#0D02
; call T42_TEXT
;
; ld ix,BUFFER
; ld a,%00010000
; call IDENTIFY
;
; ld hl,TEXT16
; push af
; jr z,TISKSTATUS2
; ld hl,TEXT11
; cp 255
; jp z,TISKSTATUS2
; ld hl,TEXT14
; cp 6
; jp z,TISKSTATUS2
; ld hl,TEXT13
; cp 3
; jp z,TISKSTATUS2
; ld hl,TEXT12
; dec a
; jp z,TISKSTATUS2
; ld hl,TEXT15
;
;TISKSTATUS2
; ld bc,#0D0F
; call T42_TEXT
;
; pop af
; jr z,SLAVEINFO
;
; ld h,0
; ld l,a
; ld bc,#0D26
; call NUMBER2
;
;;pokud je General setting nastavena autoconfigurace, tak pri neuspesnem detekovani zarizeni se do CHS ulozi nuly a HDD pak nasledne nebude nainstalovan
; ld a,(@autoconfig)
; or a
; jr z,nemenCHSs1
; xor a
; ld b,4
; ld hl,VDT+(VDTLEN/2)
;nulydoCHSs
; ld (hl),a
; inc hl
; djnz nulydoCHSs
;nemenCHSs1
; jp Endinentify
;
;SLAVEINFO
; ld hl,TEXT4
; ld bc,#0E02
; call T42_TEXT
; ld hl,TEXT5
; ld bc,#0F02
; call T42_TEXT
; ld hl,TEXT6
; ld bc,#1002
; call T42_TEXT
; ld hl,TEXT7
; ld bc,#1102
; call T42_TEXT
; ld hl,TEXT101
; ld bc,#1202
; call T42_TEXT
; ld hl,TEXT102
; ld bc,#1215
; call T42_TEXT
;
;model
; ld hl,BUFFER+54
; ld b,40
; call PROHOD
; set 7,(ix+85)
;
; ld bc,#0E09
; call T42_TEXT
;
;firmware
; ld hl,BUFFER+46
; ld b,8
; call PROHOD
; set 7,(ix+53)
;
; ld bc,#0F0C
; call T42_TEXT
;
;serial number
;
; ld hl,BUFFER+20
; ld b,20
; call PROHOD
; set 7,(ix+39)
;
; ld bc,#1011
; call T42_TEXT
;LBA
; ld hl,TEXT_NO
; bit 1,(ix+99)
; jr z,L11
;
; ld hl,TEXT_YES
;L11 ld bc,#110D
; call T42_TEXT
;
;DMA
; ld hl,TEXT_NO
; bit 0,(ix+99)
; jr z,L12
;
; ld hl,TEXT_YES
;L12 ld bc,#1125
; call T42_TEXT
;
;;CHS
; ld l,(ix+2)
; ld h,(ix+3)
; ld bc,#1209
; call NUMBER4
;
; ld l,(ix+6)
; ld h,(ix+7)
; ld bc,#120f
; call NUMBER1
;
; ld l,(ix+12)
; ld h,(ix+13)
; ld bc,#1212
; call NUMBER1
;;pokud je General setting nastavena autoconfigurace, tak pri uspesnem detekovani zarizeni se do CHS ulozi zjistene udaje
;
; ld a,(@autoconfig)
; or a
; jr z,nemenCHSs2
; ld hl,VDT+(VDTLEN/2)
; ld a,(ix+12)
; ld (hl),a
; ld a,(ix+6)
; inc hl
; ld (hl),a
; ld a,(ix+2)
; inc hl
; ld (hl),a
; ld a,(ix+3)
; inc hl
; ld (hl),a
;
;nemenCHSs2
;
;capacity
; ld l,(ix+12)
; ld h,(ix+13)
; ld e,(ix+6)
; ld d,(ix+7)
;
; push ix ;rutina nasob pouziva IX
; call nasobeniHLDE.nasob
; pop ix
; ld e,(ix+2)
; ld d,(ix+3)
; push ix
; call nasobeniHLDE.nasob
;vysledek je v IXHL
;
; ld l,h
; ld a,lx
; ld h,a
; ld e,hx
;
;delime 256 vysledek EHL
; ld b,3
;trikrat2
; srl e
; rr h
; rr l
; djnz trikrat2
;delime tremi
; ld bc,#121F
; call NUMBER3
;
; pop ix
;
;
;LBA 48Bits
;
; inc hx
;
; ld hl,TEXT_NO
; bit 2,(ix-83)
; jr z,L13
;
; ld hl,TEXT_YES
;L13 ld bc,#111C
; call T42_TEXT
;
;
;hledani prvni sectoru pro data
;prohledava se MBR, prvni partion, a hleda se v root dir. prvni datovy sector prvniho souboru
;prvni sektor disku je MBR:
;
;na 1BEh zacinaji parametry prvni partition (10h ka�d�)
;na 08h a� 0Bh je cislo relativniho sektoru zacatku partition (nebo na 01h a� 03h ve formatu hlava/sektor/cylindr)
;
;prvn� sektor partition je BOOT a tam jsou tyto zaj�mav� �daje:
;0Bh, 0Ch � pocet bytu na sektor
;0Eh, 0Fh � pocet sektoru pred prvni FAT
;10h � pocet FAT
;11h, 12h � pocet polozek v ROOTu
;16h, 17h � pocet sektoru ve FAT
;prvn� datov� sektor je: zacatek_partition + sektoru_pred_FAT + sektoru_ve_FAT * pocet_FAT + polozek_v_ROOT * 20h / bytu_na_sektor
;
; ld hl,TEXTPARSEC
; ld bc,#1302
; call T42_TEXT
;
;;nacteni MBR
; ld ix,BUFFER
; ld a,%00010000 ;slave
; ld bc,0
; ld de,0 ;LBA=0 MBR
; call LBAREAD
;; dodelat osetreni erroru
; inc hx
; inc hx ;+512
; ld e,(ix-58) ;info o prvni partition zacina na #1BE
; ld d,(ix-57)
; ex de,hl ;v hl je cislo sectoru kde zacina boot prvni par.
; ld (bootsec2+1),hl ;schovame cislo bootsectoru pro vypocet
; ld bc,#1310
; push hl
; call NUMBER3
;nacteni BOOT sectoru prvni partition
; pop hl
; ld c,l
; ld e,h
; ld d,0
; ld b,d
; ld ix,BUFFER
; ld a,%00010000 ;slave
; call LBAREAD
; dodelat osetreni erroru
; vypocet datove oblasti prvniho souboru
;
; ld hl,TEXTDATASEC
; ld bc,#1315
; call T42_TEXT
;
;bootsec2
; ld hl,0
; ld e,(ix+14) ;pricteme sectory pred FAT
; ld d,(ix+15)
; add hl,de
; push hl
; push ix
; ld e,(ix+16) ;pocet FAT
; ld d,0
; ld l,(ix+22) ;pocet sektoru ve FAT
; ld h,(ix+23)
; call nasobeniHLDE.nasob ;vysledek v IXHL
; pop ix
; pop de
; add hl,de ;pricteme jen spodnich 16 bitu
; ld e,(ix+17) ;pocet polozek v ROOTu
; ld d,(ix+18)
; ; vydelime 16; predpokladame velikost sec. 512 a 32bytu v root polozce
; ld b,4
;ctyrikrat2
; srl d
; rr e
; djnz ctyrikrat2
; add hl,de
; push hl
; ld bc,#1323
; call NUMBER4
; pop hl
;;pokud je General setting nastavena autoconfigurace, tak ulozi vypocteny prvni datovy sector
;
; ld a,(@autoconfig)
; or a
; jr z,nemenfirstdatasectorm2
; ld de,VDT+(VDTLEN/2)+5
; ex de,hl
; ld (hl),e
; inc hl
; ld (hl),d
;
;nemenfirstdatasectorm2
;
;/*
;LBA Total sectors
;
; ld hl,(BUFFER+200)
; ld (D2LBA),hl
; ld bc,#1124
; call NUMBER4
;
; ld hl,(BUFFER+202)
; ld (D2LBA+2),hl
; ld bc,#111E
; call NUMBER4
;
; ld hl,(BUFFER+204)
; ld (D2LBA+4),hl
; ld bc,#1118
; call NUMBER4
;*/
;
;vyruseni SLAVE
;*/
ld hl,TEXT17
ld bc,#0E02
call T42_TEXT
ld hl,TEXT18
ld bc,#0F03
call T42_TEXT
ld hl,TEXT19
ld bc,#1003
call T42_TEXT
Endinentify
ld hl,TEXT100
ld bc,#1608
call T42_TEXT
ld a,(@autoinstall)
or a
call z,ANYKEY
ret
; navrat
;------------------------------
TEXT1 dc 16,70,"EasyHDD 2.07 for MB03+"
TEXT2 dc 16,3,127," LMN128/8BC 2019"
TEXT3 dc 16,70,"MASTER DISK:"
TEXT4 dc 16,70,"Model:"
TEXT5 dc 16,70,"Firmware:"
TEXT6 dc 16,70,"Serial number:"
TEXT7 dc 16,70,"LBA28-bit: LBA48-bit: DMA:"
TEXT8 dc 16,70,"SLAVE DISK:"
TEXT9 db "Total LBA 48 bi"
dc "t sec.:"
TEXT10 db "Start cloning ("
dc "1/2/n)"
TEXT11 dc 16,66,"Disk time out"
TEXT12 dc 16,66,"Status b0 error"
TEXT13 dc 16,66,"DRQ error "
TEXT14 dc 16,66,"Drive not ready"
TEXT15 dc 16,66,"Other error "
TEXT16 db 16,69,"OK "
dc " "
TEXT17 dc 16,70,"DMA Speed:"
TEXT18 db 16,70,"Port: "
db 16,69
dc "3T"
TEXT19 db 16,70,"Memory: "
db 16,69
dc "3T"
;/*
;TEXT17 db "Read errors: "
; dc " "
;TEXT18 db "Write errors: "
; dc " "
;TEXT19 db "Sector counter:"
; dc " "
;TEXT20 db "---------------"
; db "---------------"
; dc "----------"
;TEXT21 db "WARNING! "
; db "Drives aren't i"
; dc "dentical!!!"
;TEXT22 db "Drives are "
; dc "idencial"
;TEXT23 db "Cloning complet"
; dc "ed"
;TEXT24 dc "1. COUNTDOWN"
;TEXT25 dc "2. COUNTUP"
;*/
TEXT_YES
dc 16,69,"Yes"
TEXT_NO dc 16,69,"No"
TEXT_CLR
db " "
db " "
dc " "
TEXT100 dc 16,67,"Press any key to install"
TEXT101 dc 16,70,"C/H/S:"
TEXT102 db 16,70,"Capacity: "
dc 16,69," MB"
TEXTPARSEC
db 16,70,"1st Par. Sec.:"
dc 16,69," "
TEXTDATASEC
db 16,70,"1st Data Sec.:"
dc 16,69," "
;------------------------------
;------------------------------
T_X equ 0
T_Y equ 0
T_XLEN equ 31
T_YLEN equ 24
T_ATTR1 equ %01010110
T_ATTR2 equ %01000110
T_ATTR3 equ 70
;------------------------------
T_START
T_ATTR ld b,T_Y+1
ld de,32
ld hl,22528+T_X-32
T_COL1 add hl,de
djnz T_COL1
ld bc,T_XLEN
ld d,h
ld e,l
inc de
ld (hl),T_ATTR1
push hl
push bc
ldir
pop bc
pop hl
dec bc
ld a,T_YLEN
dec a
ld de,32
add hl,de
T_COL2 push hl
push bc
push de
ld (hl),T_ATTR2
ld d,h
ld e,l
inc de
ldir
ex de,hl
ld (hl),T_ATTR1
pop de
pop bc
pop hl
add hl,de
dec a
jr nz,T_COL2
T_CARY
ld b,T_Y
ld c,T_X
ld hl,T_HELP1
push bc
call T_ONE
pop bc
inc b
ld hl,T_HELP2
push bc
call T_ONE
pop bc
inc b
ld a,T_YLEN
sub 3
T_CAR1 ld hl,T_HELP3
push bc
push af
call T_ONE
pop af
pop bc
inc b
dec a
jr nz,T_CAR1
ld hl,T_HELP4
T_ONE ld a,(hl)
push hl
push bc
call T_ZNAK
pop bc
pop hl
inc c
inc hl
ld d,T_XLEN-1
ld e,(hl)
push hl
T_CYKL push bc
push de
ld a,e
call T_ZNAK
pop de
pop bc
inc c
dec d
jr nz,T_CYKL
pop hl
inc hl
ld a,(hl)
T_ZNAK ld h,0
ld l,a
ld de,T_0
add hl,hl
add hl,hl
add hl,hl
add hl,de
ld a,b
rrca
rrca
rrca
and #E0
add a,c
ld e,a