-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalien.z80
2537 lines (2250 loc) · 98.8 KB
/
alien.z80
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
;********************************************************************************
;* *
;* F O R E I G N . C O M *
;* *
;* *
;* Utility for Genie IIIs with Holte CP/M Plus *
;* Created by Volker Dose & Egbert Schroeer *
;* (c) 1992 *
;* *
;* Update for sdltrs emulator (c) 2023 *
;* first assembler code since 30yrs E. Schroeer *
;* with crowd knowledge of Jens Guenther & Fritz Chwolka :) *
;* added: *
;* TRS80 format: TRS80 *
;* MONTEZUMA CP/M format: MM-D80 *
;* This file contains the descriptions for various foreign formats that can *
;* be read with HOLTE-CP/M. The foreign disk is logged into drive P. Unlike *
;* KONFIG, there is no need to reboot, as the parameters to be changed are *
;* patched in memory. HOLTE-CP/M requires the following information to be *
;* able to read foreign formats: *
;* *
;* 1. The DPB disk parameter block *
;* 2. The DTB drive control table *
;* 3. The sector translation table *
;* They must be created manually first *
;* 03/26/2023 *
;* updated MM-D80 skew table fixed the bug *
;* 05/14/2023 *
;* additional formats added by Jens Guenther *
;* some code improvements by Egbert Schroeer 05/24/2023 *
;* Testing Github Copilot to write some code improvement, *
;* thanks to all contributors *
;* See README.MD for more details *
;********************************************************************************
; Here is a brief explanation of what each parameter means:
;
; SPT: The number of sectors per track.
; BSH: The number of bits to shift the block number to get the sector number.
; BSM: The mask to apply to the block number to get the sector number.
; EXM: The mask to apply to the block number to get the extent number.
; DSM: The maximum block number.
; DRM: The maximum directory entry number.
; AL0 and AL1: The allocation vectors for the disk.
; CKS: The size of the checksum in bytes.
; OFF: The offset for system tracks.
; PSH: The number of bits to shift the physical sector size.
; PHM: The mask to apply to the physical sector size.
; Byte 1 and Byte 2 of the drive control table: These specify the drive type and other parameters.
; interleaving factor: The number of sectors to skip between each sector read.
; sector count / track: The number of sectors per track.
; number of usable tracks: The number of tracks on the disk that can be used for data.
; skew table : A table that specifies the order in which sectors are read from the disk.
;********************************************************************************
.Z80 ; assembler directive for z80 assembler
; .Z180 ; assembler directive for Z180 assembler
; Define BDOS function numbers
BDOS EQU 0005h ; address of BDOS call
TPA equ 0100h ; address of TPA
WRITESTR equ 09h ; BDOS function to print a string
READCHR equ 08h ; BDOS function to read a character
TERMCPM equ 00h ; BDOS function to terminate CP/M
DIRBIOS equ 50 ; BDOS function for a direct BIOS call
; Define constants for special characters
cr equ 0dh ; carriage return character
lf equ 0ah ; line feed character
esc equ 1bh ; escape character
; Define addresses for BIOS functions
xmove equ 0f857h ; BIOS function for interbank memory move
move equ 0f84bh ; BIOS function for moving memory
; Define the address where the entered name is stored
xtail equ 0082h
org TPA ; start of program in TPA
start ld de, hallo ; DE points to the greeting message
ld c, WRITESTR ; BDOS call #9 to print a string
call BDOS ; until the end character '$'
ld a, (xtail - 2); 0080h = length of command tail
or a ; Disk format specified?
jr z, first ; No, use first entry of format list
ld hl, xtail ; Point to format name in command tail
ld de, nambuff ; the entered name must be saved
ld bc, 10 ; in a buffer to prevent overwriting
ldir
first ld hl, startlist ; HL points to the start of the name list
loopy ld (buff), hl ; save it in a buffer for later use
ld de, nambuff ; DE points to the entered name
loopx ld a, (de) ; has the end of the name been reached?
or a
jr z, einstell ; if yes, then a valid name has been entered
cp (hl) ; otherwise, compare with the list entry
jr nz, dernicht ; if incorrect character, move to next entry
inc hl ; if correct, move DE and HL one byte further
inc de
jr loopx ; and continue
dernicht:
ld hl, (buff) ; reset HL to the beginning of the buffer
ld bc, 13 ; move to the end of the current entry
add hl, bc
ld a, (hl) ; check if the end of the list has been reached
or a
jr nz, loopy ; or repeat the loop
; If an incorrect foreign format name is entered, the list of all valid names is shown.
falsename: ; Subroutine for incorrect foreign format name
ld de, error ; Error message string
ld c, WRITESTR ; BDOS-Call #9, output string
call BDOS
ld hl,startlist ; First element in the list of valid names,
loop: ; Output all names in the list
push hl ; Save HL
ex de, hl ; DE <--> HL
ld c, WRITESTR ; BDOS-Call #9, output string
call BDOS
pop hl ; Restore HL
ld bc, 13 ; The names are 13 bytes apart.
add hl, bc ; HL now points to the next name or '00'.
ld a, (hl) ; All names are outputted until the end marker '00'.
or a ; check if the end of the list has been reached
jr nz, loop ; Loop until the last name is outputted.
ld de, wrapoff ; Turn off automatic word wrap
ld c,WRITESTR
call BDOS
ld c,TERMCPM ; Then warm start and return to operating system.
call BDOS
; EINSTELL: The respective parameter block is transferred to RAM.
einstell:
ld c,DIRBIOS ; First, the address of the DRIVETABLE is retrieved
; via a BDOS-Call, where the addresses of all DPHs are stored.
ld de,biospb ; A parameter block is passed to the BDOS-Call.
call BDOS ; HL+30 then points to the XDPH of drive P.
ld bc,30
add hl,bc ; The content of HL is copied to DE, which contains
ld e,(hl) ; the address of the XDPH. It is stored in buff2 temporarily.
inc hl
ld d,(hl)
ld (buff2),de
ld bc,0100h ; A memory load operation from bank 0 to bank 1 is performed.
call xmove
ld hl,buf4 ; buf4 is the target address, copying the entire XDPH in order to access DPB
ld de,(buff2)
ld bc,dphend-buf4 ; and the address of the Skew table.
call move ; Perform memory load operation.
; Copy the DPB to Common
ld hl, (buff) ; HL points to the name of the chosen format
ld bc, 11 ; After 11 bytes comes the address of the corresponding parameter block, starting with the DPB
add hl, bc
ld e, (hl) ; De points to the DPB to be loaded
inc hl ; HL points to the valid DPB in Common
ld d, (hl)
ld hl, (dpb) ; HL points to the valid DPB in Common
ld bc, 17 ; A DPB is 17 bytes long
push de ; DE points to the beginning of the parameter block and is still needed
call move ; Move data from DE to HL
; Copy the DCT of the format
pop hl ; Once again the beginning of the parameter block
ld bc, 17 ; The DPB is 17 bytes long, followed by the Drive Control Table
add hl, bc
push hl ; This address is saved again
ld bc, 0001 ; Move data from Bank 1 to Bank 0
call xmove
ex de, hl ; DE is the source address
ld hl, (buff2) ; Address of the XDPH in Bank 0
ld bc, 25 ; After the XDPH of Drive P comes its DCT, which is where it should go
add hl, bc
ld bc, 5 ; 5 bytes
call move ; Move data from DE to HL
; Copy the skew table
pop hl ; The length of the skew table to be copied is determined, which comes directly after the DCT
ld bc, 5
add hl, bc
push hl ; Save the address
ld bc, 0001 ; Interbank move from Bank 1 to Bank 0
call xmove
pop de
ld a, (de) ; Length of the skew table
inc de ; Now points to the beginning of the skew table
ld hl,(buf4) ; Address of the table
ld b, 0 ; The address of the table is the first word of the XDPH
ld c, a ; The length was stored in the accumulator
call move ; Move data from DE to HL
; Report the success of the action
ld hl, (buff) ; Points to the name of the chosen format
ld de, nambuff ; It is copied into the output string
ld bc, 10
ldir
ld de, gutis ; Points to the message
ld c, WRITESTR ; BDOS-Call String output
call BDOS ; Execute
ld c, TERMCPM ; Warmstart back to the operating system
call BDOS
; List of character strings to output
hallo db cr,lf,esc,'R','ALIEN.COM - Version 3.2 - November 2023',esc,'S'
db cr, lf,'sets drive P to alien disk formats on Genie IIIs with Holte CP/M +',cr, lf,'$'
error db cr, lf,'Incorrect format name specified!',cr, lf
db 'The following format names are allowed:',cr,lf,cr,lf,esc,'X','$'
wrapoff db esc,'Y','$'
gutis db cr, lf,'New format now valid for drive P: '
nambuff ds 10 ; the selected name is saved here to prevent overwriting by CP/M
db cr, lf,'$'
; Intermediate buffer for register pair DE or HL
buff dw 0000h
buff2 dw 0000h ; contains the address of the XDPH of LW P
biospb: ; The BIOS PARAMETER BLOCK must be specified
fnum db 22 ; when a direct BIOS call is made through BDOS-Call 50
;
ainh db 00
bcinh dw 0000h ; parameters to be passed are stored here
deinh dw 0000h
hlinh dw 0000h ; the function number fnum=22 means "stop get ^DRVTBL"
buf4 dw 0000 ; buffer for the XDPH of drive P
dw 0,0,0,0
db 0,0
dpb dw 0000
dw 0000,0000
dw 0000,0000
dw 0000
db 0
dct db 0
db 0
db 0
db 0
db 0
dphend ; End of this buffer
; List of implemented alien formats
; The length of the character string is limited to 10.
; The first entry is the default format, which is used if no format name is specified.
startlist:
db 'MM-D80 $' ; first entry is default - MONTEZUMA CP/M format: MM-D80 - exchange format via TRSTOOLS
dw mmd80 ; Montezuma Micro 80T DS DATA (80T, DS, DD, 800K, 512 Bytes, Skew 2)
db 'ABC80 $' ; Luxor ABC80 (40T, SS, DD, 152K, 256 Bytes, Skew 7)
dw abc80
db 'ABC800 $' ; Luxor ABC800 (80T, DS, DD, 760K, 1024 Bytes)
dw abc800
db 'ACTRIX $' ; Actrix Computer Corporation Access Computer (80T, DS, DD, 780K, 1024 Bytes, Skew 3)
dw actrix
db 'ALPHA-P3 $' ; Triumph Adler alphaTronic P3 (80T, DS, DD, 790K, 1024 Bytes)
dw alpha
db 'ALPHA-PC $' ; Triumph Adler alphaTronic PC (40T, DS, DD, 320K, 256 Bytes)
dw alphapc
db 'ASTER-3S $' ; Aster CT-80 System (80T, DS, DD, 780K, 1024 Bytes)
dw aster3s
db 'ALTOS $' ; Altos 5-15 (80T, DS, DD, 768K, 1024 Bytes)
dw altos
db 'BOND-2 $' ; Bondwell 2 (80T, SS, DD, 350K, 256 Bytes)
dw bond2
db 'BOND-12 $' ; Bondwell 12 (80T, DS, DD, 768K, 1024 Bytes)
dw bond12
db 'BULLET $' ; Wave Mate Bullet (80T, DS, DD, 790K, 1024 Bytes)
dw bullet
db 'CASIO $' ; Casio FP-1100/FP-1020 (40T, DS, DD, 320K, 256 Bytes)
dw casio
db 'CPM-8640 $' ; CP/M-86 v2 (40T, DS, DD, 360K, 512 Bytes)
dw cpm8640
db 'CPM-8680 $' ; CP/M-86 v2 (80T, DS, DD, 720K, 512 Bytes)
dw cpm8680
db 'ELZET $' ; Elzet 80 (80T, DS, DD, 768K, 1024 Bytes)
dw elzet80
db 'EXIDY $' ; Exidy Sorcerer (40T, SS, DD, 196K, 512 Bytes)
dw exidy
db 'GDOS $' ; GDOS 2.4 (80T, DS, DD, 720K, 256 Bytes)
dw gdos
db 'HOLTE-G3 $' ; Thomas Holte CP/M 2.2c/3.0a (80T, DS, DD, 768K, 512 Bytes)
dw holteg3
db 'KAYPRO-2 $' ; Kaypro II (40T, SS, DD, 196K, 512 Bytes)
dw kaypro2
db 'EAGLE $' ; Eagle I/II (80T, SS, DD, 390K, 1024 Bytes, Skew 2)
dw eagle
db 'HOLTEG2S $' ; Thomas Holte Genie IIs/Speedmaster CP/M 2.2a System (80T, SS, DD, 390K, 512 Bytes)
dw holte2s
db 'LOBO256 $' ; Lobo Systems 256K (80T, SS, DD, 256K, 512 Bytes)
dw lobo256
db 'LOBO512 $' ; Lobo Systems 512K (80T, DS, DD, 512K, 512 Bytes)
dw lobo512
db 'LNW-256 $' ; LNW Research lnw256 (40T, SS, DD, 166K, 256 Bytes, Skew 5)
dw lnw256
db 'LNW-512 $' ; LNW Research lnw256 (40T, SS, DD, 332K, 512 Bytes, Skew 5)
dw lnw512
db 'LOWE-A1 $' ; Lowe Electronics CP/M 2.2a (80T, SS, DD, 346K, 256 Bytes)
dw lowea1
db 'LOWE-A2 $' ; Lowe Electronics CP/M 2.2a (80T, DS, DD, 696K, 256 Bytes)
dw lowea2
db 'LOWE-B1 $' ; Lowe Electronics CP/M 2.2b (80T, SS, DD, 384K, 256 Bytes, 4K Block)
dw loweb1
db 'LOWE-B2 $' ; Lowe Electronics CP/M 2.2b (80T, DS, DD, 696K, 256 Bytes, 4K Block)
dw loweb2
db 'MAGIC $' ; Magic PBC-88 (40T, DS, DD, 390K, 512 Bytes)
dw magic
db 'MBC-1200 $' ; Sanyo MBC-1200/1250 (80T, DS, DD, 624K, 256 Bytes, Skew 3)
dw mbc1200
db 'MBC-1000 $' ; Sanyo MBC-1000/1100 (40T, DS, DD, 312K, 256 Bytes, Skew 3)
dw sanyo40
db 'MS-DOS $' ; MS-DOS (80T, DS, DD, 720K, 1024 Bytes)
dw MSDOS
db 'MM-S40 $' ; Montezuma Micro 40T Standard SYSTEM (40T, SS, DD, 170K, 256 Bytes, Skew 2)
dw mms40
db 'MM-D40 $' ; Montezuma Micro 40T Standard DATA (40T, SS, DD, 200K, 512 Bytes, Skew 2)
dw mmd40
db 'MM-S80 $' ; Montezuma Micro 80T DS SYSTEM (80T, DS, DD, 710K, 256 Bytes, Skew 2)
dw mms80
db 'MCCPM $' ; MCCP/M (80T, DS, DD, 800K, 1024 Bytes)
dw mccpm
db 'MORROW $' ; Morrow Micro Decision (40T, SS, DD, 190K, 1024 Bytes, Skew 3)
dw morrow
db 'MONROE $' ; Monroe 1860 (40T, SS, DD, 190K, 1024 Bytes, Skew 3)
dw monroe
db 'MD3 $' ; Morrow Micro Decision MD3 (40T, DS, DD, 390K, 1024 Bytes, Skew 3)
dw md3ds
db 'NABUPC $' ; NABU PC (80T, DS, DD, 800K, 1024 Bytes)
dw nabupc
db 'NEC-8800 $' ; NEC PC-8800/8801 (40T, DS, DD, 306K, 256 Bytes)
dw nec8800
db 'PROF#4 $' ; Prof80 (Format IV: 80T, DS, DD, 770K, 512 Bytes, Skew 2)
dw prof4
db 'OMIKRON $' ; Omikron Mapper I TRS-80 Model I/III (35T, SS, SD, 83K, 128 Bytes, Skew 4)
dw omikron
db 'OR512 $' ; Oettle & Reichler (80T, DS, DD, 702K, 512 Bytes, Skew 3)
dw or512
db 'OR1024 $' ; Oettle & Reichler (80T, DS, DD, 702K, 1024 Bytes, Skew 3)
dw or1024
db 'OSBORNE $' ; Osborne 1 (40T, SS, SD, 90K, 256 Bytes, Skew 2)
dw osborne
db 'OSBEXEC $' ; Osborne 2 Executive (40T, SS, DD, 185K, 1024 Bytes)
dw osbexec
db 'QX10 $' ; Epson QX-10 (40T, DS, DD, 380K, 512 Bytes)
dw qx10
db 'RAINBOW $' ; DEC Rainbow 100+ (80T, SS, DD, 390K, 512 Bytes, Skew 2)
dw rainbow
db 'RAIR $' ; Rair Black Box (40T, SS, DD, 190K, 1024 Bytes, Skew 3)
dw rair
db 'ROBO-D40 $' ; Robotron PC 1715 Data (40T, SS, DD, 190K, 1024 Bytes, Data Disk)
dw robod40
db 'ROBO-S40 $' ; Robotron PC 1715 Data (40T, SS, DD, 190K, 1024 Bytes, System Disk)
dw robos40
db 'ROBO-D80 $' ; Robotron PC 1715 Data (80T, DS, DD, 780K, 1024 Bytes, Data Disk)
dw robod80
db 'ROBO-S80 $' ; Robotron PC 1715 Data (80T, DS, DD, 780K, 1024 Bytes, System Disk)
dw robos80
db 'RSCPM3 $' ; Radio Shack TRS-80 Model 4/4P CP/M Plus (40T, SS, DD, 156K, 512 Bytes)
dw rscpm3
db 'DECROBIN $' ; DEC VT-180 "Robin" (40T, SS, DD, 171K, 512 Bytes, Skew 2)
dw robin
db 'SCHMIDTKE $' ; Schmidtke Genie I CP/M 2.2 System (80T, DS, DD, 768K, 1024 Bytes)
dw schmid
db 'SCHROEDER $' ; Gerald Schroeder Genie IIs CP/M 2.2 System (80T, DS, DD, 768K, 1024 Bytes)
dw gsg2s
db 'SOABAR $' ; Soabar CDX 31 (40T, DS, DD, 390K, 1024 Bytes)
dw soabar
db 'S80-DD $' ; Klaus Kaempf CP/M 2.2x/3.0 System (80T, DS, DD, 768K, 1024 Bytes)
dw s80dsdd
db 'D80-DD $' ; Klaus Kaempf CP/M 2.2x/3.0 Data (80T, DS, DD, 800K, 1024 Bytes)
dw d80dsdd
db 'TV802 $' ; Televideo 802 (40T, DS, DD, 342K, 256 Bytes)
dw tv802
db 'TRS80CPM $' ; TRS-80 Model I/III/4/4P CP/M (40T, SS, DD, 180K, 512 Bytes)
dw trs80cpm
db 'TRS80-LB $' ; TRS-80 Model II Lifeboat (77T, SS, DD, 600K, 1024 Bytes, Skew 3)
dw trslb
db 'TRS80-FMG $' ; TRS-80 Model II FMG (77T, SS, DD, 486K, 256 Bytes)
dw trsfmg
db 'TRS80-PT $' ; TRS-80 Model II/12/16 Pickles & Trout (77T, SS, DD, 600K, 512 Bytes)
dw trspt
db 'VIS1050 $' ; Visual 1050 (80T, SS, DD, 390K, 512 Bytes)
dw vis1050
db 'VORTEX $' ; exchange format Z-System for CP/M-Plus disks
dw vortex ; Amstrad CPC Vortex (80T, DS, DD, 712K, 512 Bytes)
db 'XEROX820I $' ; Xerox 820 (40T, SS, SD, 82K, 128 Bytes, Skew 5)
dw x820
db 'XER-820II $' ; Xerox 820-II (40T, SS, DD, 164K, 256 Bytes, Skew 5)
dw x820ii
db 'Z-100 $' ; Zenith Z-100/Heath H-100 (40T, DS, DD, 320K, 512 Bytes)
dw z100
db 'ZORBA $' ; Zorba (40T, DS, DD, 390K, 512 Bytes)
dw zorba
db 'ALPHA-P2 $' ; Triumph Adler alphaTronic P2 (40T, SS, DD, 320K, 256 Bytes)
dw alphap2
db 'ALSPA $' ; Alspa (77T, SS, DD, 600K, 1024 Bytes)
dw alspa
db 'AMPRO $' ; Ampro Little Board Z80 (40T, SS, DD, 320K, 256 Bytes)
dw ampro
db 'HEATH $' ; Heath H89, Magnolia CP/M (40T, SS, DD, 166K, 512 Bytes)
dw heath
db 'JOYCE $' ; Amstrad PCW 8256 "Joyce" (40T, SS, DD, 175K, 512 Bytes)
dw joyce
db 'MOLE-S9 $' ; Molecular Series 9 (40T, DS, DD, 342K, 512 Bytes)
dw moles9
db 'PERTEC $' ; Pertec PCC-2000 (77T, SS, DD, 480K, 256 Bytes, Skew 5)
dw pertec
db 'SISPHUS $' ; Sisyphus (77T, SS, DD, 450K, 128 Bytes)
dw sisphus
db 'VIXEN $' ; Osborne Vixen (40T, DS, DD, 390K, 1024 Bytes, Skew 2)
dw vixen
db 'NEWDOS80 $' ; NewDOS/80 (80T, DS, DD, 640K, 512 Bytes
dw newdos80 ;
db 0 ; end of list
endlist
; Montezuma Micro 80T DS DATA (80T, DS, DD, 800K, 512 Bytes, Skew 2)
mmd80 dw 0050h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 00h ; EXM : extend mask
dw 018Fh ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 00h ; OFF : offset for system tracks
db 02h ; PSH : physical sector size shift
db 03h ; PHM : physical sector size mask
db 01111000b ; Byte 1 of drive control table
db 10000000b ; Byte 2 of drive control table
db 02 ; interleavingfactor
db 20 ; sector count / track
db 80 ; number of usable tracks
db 20 ; length of the skew table
; skew table
db 0,2,4,6,8,1,3,5,7,9,10,12,14,16,18,11,13,15,17,19
; Klaus Kaempf CP/M 2.2x/3.0 System (80T, DS, DD, 768K, 1024 Bytes)
s80dsdd dw 0050h ; SPT : 128 byte records / track
db 05h ; BSH : block shift
db 1fh ; BSM : block mask
db 03h ; EXM : extend mask
dw 00bfh ; DSM : maximum block number
dw 00ffh ; DRM : maximum directory entry number
db 0c0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0040h ; CKS : checksum size
dw 03h ; OFF : offset for system tracks
db 03h ; PSH : physical sector size shift
db 07h ; PHM : physical sector size mask
db 70h ; Byte 1 of drive control table
db 11000000B ; Byte 2 of drive control table
db 02 ; interleavingfactor
db 10 ; sector count / track
db 80 ; number of usable tracks
db 10 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9
; Klaus Kaempf CP/M 2.2x/3.0 Data (80T, DS, DD, 800K, 1024 Bytes)
d80dsdd dw 0050h ; SPT : 128 byte records / track
db 05h ; BSH : block shift
db 1fh ; BSM : block mask
db 03h ; EXM : extend mask
dw 00c7h ; DSM : maximum block number
dw 00ffh ; DRM : maximum directory entry number
db 0c0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0040h ; CKS : checksum size
dw 00h ; OFF : offset for system tracks
db 03h ; PSH : physical sector size shift
db 07h ; PHM : physical sector size mask
db 70h ; Byte 1 of drive control table
db 80h ; Byte 2 of drive control table
db 02 ; interleavingfactor
db 10 ; sector count / track
db 80 ; number of usable tracks
db 10 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9
prof4 dw 0050h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0fh ; BSM : block mask
db 00h ; EXM : extend mask
dw 017fh ; DSM : maximum block number
dw 007fh ; DRM : maximum directory entry number
db 0c0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 03h ; OFF : offset for system tracks
db 02h ; PSH : physical sector size shift
db 03h ; PHM : physical sector size mask
db 78h ; Byte 1 of drive control table
db 80h ; Byte 2 of drive control table
db 02 ; interleavingfactor
db 20 ; sector count / track
db 80 ; number of usable tracks
db 20 ; length of the skew table
; skew table
db 0,2,4,6,8,1,3,5,7,9,10,12,14,16,18,11,13,15,17,19
alpha dw 0050h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0fh ; BSM : block mask
db 00h ; EXM : extend mask
dw 018ah ; DSM : maximum block number
dw 007fh ; DRM : maximum directory entry number
db 0c0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 01h ; OFF : offset for system tracks
db 03h ; PSH : physical sector size shift
db 07h ; PHM : physical sector size mask
db 78h ; Byte 1 of drive control table
db 0c0h ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 10 ; sector count / track
db 80 ; number of usable tracks
db 10 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9
aster3s dw 0050h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 00h ; EXM : extend mask
dw 018Ah ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 02h ; OFF : offset for system tracks
db 03h ; PSH : physical sector size shift
db 07h ; PHM : physical sector size mask
db 01110000B ; Byte 1 of drive control table
db 11000000B ; Byte 2 of drive control table
db 03 ; interleavingfactor
db 10 ; sector count / track
db 80 ; number of usable tracks
db 10 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9
; Thomas Holte CP/M 2.2c/3.0a (80T, DS, DD, 768K, 512 Bytes)
holteg3 dw 0050h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 00h ; EXM : extend mask
dw 018Ah ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0030h ; CKS : checksum size
dw 01h ; OFF : offset for system tracks
db 02h ; PSH : physical sector size shift
db 03h ; PHM : physical sector size mask
db 01110000B ; Byte 1 of drive control table
db 10000000B ; Byte 2 of drive control table
db 02 ; interleavingfactor
db 20 ; sector count / track
db 80 ; number of usable tracks
db 20 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
MSDOS dw 0020h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0fh ; BSM : block mask
db 01h ; EXM : extend mask
dw 009dh ; DSM : maximum block number
dw 003fh ; DRM : maximum directory entry number
db 80h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0010h ; CKS : checksum size
dw 01h ; OFF : offset for system tracks
db 02h ; PSH : physical sector size shift
db 03h ; PHM : physical sector size mask
db 7ch ; Byte 1 of drive control table
db 80h ; Byte 2 of drive control table
db 1 ; interleavingfactor
db 18 ; sector count / track
db 40 ; number of usable tracks
db 18 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
; Kaypro II (40T, SS, DD, 196K, 512 Bytes)
kaypro2 dw 0028h ; SPT : 128 byte records / track
db 03h ; BSH : block shift
db 07h ; BSM : block mask
db 00h ; EXM : extend mask
dw 00C3h ; DSM : maximum block number
dw 003Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0010h ; CKS : checksum size
dw 01h ; OFF : offset for system tracks
db 02h ; PSH : physical sector size shift
db 03h ; PHM : physical sector size mask
db 00110000B ; Byte 1 of drive control table
db 10100000B ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 10 ; sector count / track
db 40 ; number of usable tracks
db 10 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9
; Kaypro 4 & 10 (40T, DS, DD, 392K, 512 Bytes)
; I keep this for reference, but it is not working yet.
; kaypro4 dw 0050h ; SPT : 128 byte records / track
; db 04h ; BSH : block shift
; db 0Fh ; BSM : block mask
; db 01h ; EXM : extend mask
; dw 00C3h ; DSM : maximum block number
; dw 003Fh ; DRM : maximum directory entry number
; db 0C0h ; AL0 : allocation vector 0
; db 00h ; AL1 : allocation vector 1
; dw 0010h ; CKS : checksum size
; dw 02h ; OFF : offset for system tracks
; db 02h ; PSH : physical sector size shift
; db 03h ; PHM : physical sector size mask
;
; db 01110000B ; Byte 1 of drive control table
; db 10100000B ; Byte 2 of drive control table
; db 01 ; interleavingfactor
; db 20 ; sector count / track
; db 40 ; number of usable tracks
;
; db 20 ; length of the skew table
; ; skew table
; db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
; kontron dw 0040h ; SPT : 128 byte records / track
; this format was used in fremd.com since the beginning but didn't work
; with the new version and sdltrs. I'm leaving the format here in case it is needed
; db 04h ; BSH : block shift
; db 0Fh ; BSM : block mask
; db 00h ; EXM : extend mask
; dw 012Bh ; DSM : maximum block number
; dw 00FFh ; DRM : maximum directory entry number
; db 0F0h ; AL0 : allocation vector 0
; db 00h ; AL1 : allocation vector 1
; dw 0040h ; CKS : checksum size
; dw 04h ; OFF : offset for system tracks
; db 01h ; PSH : physical sector size shift
; db 01h ; PHM : physical sector size mask
;
; db 01111000B ; Byte 1 of drive control table
; db 01000000B ; Byte 2 of drive control table
; db 1 ; interleavingfaktor
; db 32 ; sector count / track
; db 77 ; number of usable tracks
;
; db 32 ; length of the skew table
; ; skew table
; db 0,3,6,9,12,15,2,5,8,11,14,1,4,7,10,13,16,19
; db 22,25,28,31,17,20,23,26,29,18,21,24,27,30
; LNW Research lnw256 (40T, SS, DD, 166K, 256 Bytes, Skew 5)
lnw256 dw 0024h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 01h ; EXM : extend mask
dw 0052h ; DSM : maximum block number
dw 003Fh ; DRM : maximum directory entry number
db 080h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0010h ; CKS : checksum size
dw 03h ; OFF : offset for system tracks
db 01h ; PSH : physical sector size shift
db 01h ; PHM : physical sector size mask
db 00111000B ; Byte 1 of drive control table
db 01000000B ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 18 ; sector count / track
db 40 ; number of usable tracks
db 18 ; length of the skew table
; skew table
db 0,5,10,15,2,7,12,17,4,9,14,1,6,11,16,3,8,13
; Lowe Electronics CP/M 2.2a (80T, SS, DD, 346K, 256 Bytes)
lowea1 dw 0024h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 01h ; EXM : extend mask
dw 00ACh ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 02h ; OFF : offset for system tracks
db 01h ; PSH : physical sector size shift
db 01h ; PHM : physical sector size mask
db 00100000B ; Byte 1 of drive control table
db 01000000B ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 18 ; sector count / track
db 80 ; number of usable tracks
db 18 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
; Lowe Electronics CP/M 2.2a (80T, DS, DD, 696K, 256 Bytes)
lowea2 dw 0048h ; SPT : 128 byte records / track
db 05h ; BSH : block shift
db 1Fh ; BSM : block mask
db 00h ; EXM : extend mask
dw 00ADh ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 080h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 02h ; OFF : offset for system tracks
db 01h ; PSH : physical sector size shift
db 01h ; PHM : physical sector size mask
db 01100000B ; Byte 1 of drive control table
db 01100000B ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 36 ; sector count / track
db 80 ; number of usable tracks
db 36 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
db 18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35
; Lowe Electronics CP/M 2.2b (80T, SS, DD, 384K, 256 Bytes, 4K Block)
loweb1 dw 0024h ; SPT : 128 byte records / track
db 05h ; BSH : block shift
db 1Fh ; BSM : block mask
db 03h ; EXM : extend mask
dw 0056h ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 080h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 02h ; OFF : offset for system tracks
db 01h ; PSH : physical sector size shift
db 01h ; PHM : physical sector size mask
db 00100000B ; Byte 1 of drive control table
db 01000000B ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 18 ; sector count / track
db 80 ; number of usable tracks
db 18 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
; Lowe Electronics CP/M 2.2b (80T, DS, DD, 696K, 256 Bytes, 4K Block)
loweb2 dw 0048h ; SPT : 128 byte records / track
db 05h ; BSH : block shift
db 1Fh ; BSM : block mask
db 03h ; EXM : extend mask
dw 00ADh ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 080h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 02h ; OFF : offset for system tracks
db 01h ; PSH : physical sector size shift
db 01h ; PHM : physical sector size mask
db 01100000B ; Byte 1 of drive control table
db 01100000B ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 36 ; sector count / track
db 80 ; number of usable tracks
db 36 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
db 18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35
rair dw 0004h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0fh ; BSM : block mask
db 00h ; EXM : extend mask
dw 0186h ; DSM : maximum block number
dw 007fh ; DRM : maximum directory entry number
db 0c0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 24h ; OFF : offset for system tracks
db 02h ; PSH : physical sector size shift
db 03h ; PHM : physical sector size mask
db 78h ; Byte 1 of drive control table
db 80h ; Byte 2 of drive control table
db 2 ; interleavingfactor
db 20 ; sector count / track
db 80 ; number of usable tracks
db 20 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
vortex dw 0048h ; SPT : 128 byte records / track
db 05h ; BSH : block shift
db 1fh ; BSM : block mask
db 03h ; EXM : extend mask
dw 00b0h ; DSM : maximum block number
dw 007fh ; DRM : maximum directory entry number
db 080h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 01h ; OFF : offset for system tracks
db 02h ; PSH : physical sector size shift
db 03h ; PHM : physical sector size mask
db 78h ; Byte 1 of drive control table
db 80h ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 18 ; sector count / track
db 80 ; number of usable tracks
db 18 ; length of the skew table
; skew table
db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
; format doesn't work with Holte CP/M 3.0 and sdltrs
; I keep it here for reference
; mattes dw 0050h ; SPT : 128 byte records / track
; db 05h ; BSH : block shift
; db 1Fh ; BSM : block mask
; db 03h ; EXM : extend mask
; dw 00C5h ; DSM : maximum block number
; dw 007Fh ; DRM : maximum directory entry number
; db 080h ; AL0 : allocation vector 0
; db 00h ; AL1 : allocation vector 1
; dw 0020h ; CKS : checksum size
; dw 03h ; OFF : offset for system tracks
; db 02h ; PSH : physical sector size shift
; db 03h ; PHM : physical sector size mask
;
; db 01100000B ; Byte 1 of drive control table
; db 10100000B ; Byte 2 of drive control table
; db 01 ; interleavingfactor
; db 20 ; sector count / track
; db 80 ; number of usable tracks
;
; db 20 ; length of the skew table
; ; skew table
; db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
; Montezuma Micro 40T Standard SYSTEM (40T, SS, DD, 170K, 256 Bytes, Skew 2)
mms40 dw 0024h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 01h ; EXM : extend mask
dw 0054h ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 01h ; OFF : offset for system tracks
db 01h ; PSH : physical sector size shift
db 01h ; PHM : physical sector size mask
db 00101000B ; Byte 1 of drive control table
db 01000000B ; Byte 2 of drive control table
db 02 ; interleavingfactor
db 18 ; sector count / track
db 40 ; number of usable tracks
db 18 ; length of the skew table
; skew table
db 0,2,4,6,8,10,12,14,16,1,3,5,7,9,11,13,15,17
; Montezuma Micro 40T Standard DATA (40T, SS, DD, 200K, 512 Bytes, Skew 2)
mmd40 dw 0028h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 01h ; EXM : extend mask
dw 0063h ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 00h ; OFF : offset for system tracks
db 02h ; PSH : physical sector size shift
db 03h ; PHM : physical sector size mask
db 00111000B ; Byte 1 of drive control table
db 10000000B ; Byte 2 of drive control table
db 02 ; interleavingfactor
db 10 ; sector count / track
db 40 ; number of usable tracks
db 10 ; length of the skew table
; skew table
db 0,2,4,6,8,1,3,5,7,9
; Montezuma Micro 80T DS SYSTEM (80T, DS, DD, 710K, 256 Bytes, Skew 2)
mms80 dw 0048h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 00h ; EXM : extend mask
dw 0162h ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 01h ; OFF : offset for system tracks
db 01h ; PSH : physical sector size shift
db 01h ; PHM : physical sector size mask
db 01111000B ; Byte 1 of drive control table
db 01000000B ; Byte 2 of drive control table
db 02 ; interleavingfactor
db 36 ; sector count / track
db 80 ; number of usable tracks
db 36 ; length of the skew table
; skew table
db 0,2,4,6,8,10,12,14,16,1,3,5,7,9,11,13,15,17,18,20
db 22,24,26,28,30,32,34,19,21,23,25,27,29,31,33,35
db 0,2,4,6,8,1,3,5,7,9,10,12,14,16,18,11,13,15,17,19
; Monroe OC 8820 (80T, SS, DD, 308K, 256 Bytes, Skew 4)
monroe dw 0020h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 01h ; EXM : extend mask
dw 0099h ; DSM : maximum block number
dw 003Fh ; DRM : maximum directory entry number
db 080h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0080h ; CKS : checksum size
dw 03h ; OFF : offset for system tracks
db 01h ; PSH : physical sector size shift
db 01h ; PHM : physical sector size mask
db 00111000b ; Byte 1 of drive control table
db 01000000b ; Byte 2 of drive control table
db 01 ; interleavingfactor
db 16 ; sector count / track
db 80 ; number of usable tracks
db 16 ; length of the skew table
; skew table
db 0,4,8,12,1,5,9,13,2,6,10,14,3,7,11,15
; Morrow Micro Decision (40T, SS, DD, 190K, 1024 Bytes, Skew 3)
morrow dw 0028h ; SPT : 128 byte records / track
db 04h ; BSH : block shift
db 0Fh ; BSM : block mask
db 01h ; EXM : extend mask
dw 005Eh ; DSM : maximum block number
dw 007Fh ; DRM : maximum directory entry number
db 0C0h ; AL0 : allocation vector 0
db 00h ; AL1 : allocation vector 1
dw 0020h ; CKS : checksum size
dw 02h ; OFF : offset for system tracks
db 03h ; PSH : physical sector size shift
db 07h ; PHM : physical sector size mask
db 00111000B ; Byte 1 of drive control table
db 11000000B ; Byte 2 of drive control table
db 03 ; interleavingfactor
db 5 ; sector count / track
db 40 ; number of usable tracks
db 5 ; length of the skew table
; skew table
db 0,3,1,4,2