The Memotech family of computers (SM1, FDX, SDX) had a variety of disk sizes and formats they supported.
In addition, I've added a few, primarily to support REMEMOTECH, REMEMOrizer and SDX Plus.
I maintain a set of diskdefs, suitable for use with (or inclusion in) cpmtools.
Each Memotech disk format had a type code, which is a 2 digit hex number :-
Type | Physical | CP/M Logical view | Comment | |||||||
---|---|---|---|---|---|---|---|---|---|---|
Media | Size | Sides | Density | Tracks | Capacity | Directory entries | Block size | Blocks | ||
00 | Floppy | 3.5" / 5.25" | Single | Single | 40 | 80KB | 64 | 1024 | 73 | Never seen in the wild |
01 | Floppy | 3.5" / 5.25" | Double | Single | 40 | 160KB | 64 | 1024 | 153 | Never seen in the wild |
02 | Floppy | 3.5" / 5.25" | Single | Double | 40 | 160KB | 64 | 1024 | 153 | Never seen in the wild |
03 | Floppy | 3.5" / 5.25" | Double | Double | 40 | 320KB | 64 | 2048 | 156 | Common (FDX 5.25" and SDX 3.5") |
04 | Floppy | 3.5" / 5.25" | Single | Single | 80 | 160KB | 64 | 1024 | 153 | Never seen in the wild |
05 | Floppy | 3.5" / 5.25" | Double | Single | 80 | 320KB | 64 | 1024 | 156 | Never seen in the wild |
06 | Floppy | 3.5" / 5.25" | Single | Double | 80 | 320KB | 64 | 2048 | 156 | Never seen in the wild |
07 | Floppy | 3.5" / 5.25" | Double | Double | 80 | 640KB | 128 | 2048 | 315 | Common (later SDX 3.5") |
10 | Floppy | 8" | Single | Single | 77 | 250KB | 64 | 1024 | 243 | For compatibility with MDS? Skew applies. |
11 | Floppy | 8" | Double | Single | 77 | 500KB | 128 | 2048 | 246 | Never seen in the wild |
12 | Floppy | 8" | Single | Double | 77 | 500KB | 128 | 2048 | 245 | Never seen in the wild |
13 | Floppy | 8" | Double | Double | 77 | 1MB | 128 | 4096 | 247 | Common (SM1 and FDX) |
18 | SD/CF card | N/A | 8MB | 512 | 4096 | 2046 | ** Partition 0 | |||
19 | SD/CF card | 8MB | 512 | 4096 | 2046 | ** Partition 1 | ||||
1A | SD/CF card | 8MB | 512 | 4096 | 2046 | ** Partition 2 | ||||
1B | SD/CF card | 8MB | 512 | 4096 | 2046 | ** Partition 3 | ||||
1C | SD/CF card | 8MB | 512 | 4096 | 2046 | ** Partition 4 | ||||
1D | SD/CF card | 8MB | 512 | 4096 | 2046 | ** Partition 5 | ||||
1E | SD/CF card | 8MB | 512 | 4096 | 2046 | ** Partition 6 | ||||
1F | SD/CF card | 8MB | 512 | 4096 | 2046 | ** Partition 7 | ||||
20 | HD ST506 | 5.25" | 5MB | Need to see the hard disk driver | HDX/HRX systems may have had a 5.25" one I saw an SM1 with an 8" one | |||||
21 | HD ST412 | 5.25" | 10MB | |||||||
22 | HD D-507 | 5.25" | 5MB | |||||||
23 | HD D-514 | 5.25" | 10MB | |||||||
23 | HD D-519 | 5.25" | 15MB | |||||||
23 | HD D-526 | 5.25" | 20MB | |||||||
30 | HD SA1002 | 8" | 4MB | |||||||
31 | HD SA1004 | 8" | 8MB | |||||||
32 | HD Q2010 | 8" | 8MB | |||||||
33 | HD Q2020 | 8" | 16MB | |||||||
34 | HD Q2030 | 8" | 24MB | |||||||
35 | HD Q2040 | 8" | 32MB | |||||||
40 | Silicon | N/A | 256KB | 64 | 1024 | 249 | ||||
41 | Silicon | 512KB | 128 | 2048 | 252 | |||||
42 | Silicon | 768KB | 128 | 2048 | 380 | |||||
43 | Silicon | 1MB | 128 | 4096 | 254 | |||||
44 | Silicon | 1.25MB | 256 | 4096 | 318 | |||||
45 | Silicon | 1.50MB | 256 | 4096 | 382 | |||||
46 | Silicon | 1.75MB | 256 | 4096 | 446 | |||||
47 | Silicon | 2MB | 256 | 4096 | 510 | |||||
48 | Silicon | 2.5MB | 256 | 4096 | 638 | |||||
49 | Silicon | 3MB | 256 | 4096 | 766 | |||||
4A | Silicon | 3.5MB | 256 | 4096 | 893 | |||||
4B | Silicon | 4MB | 512 | 4096 | 1022 | |||||
4C | Silicon | 5MB | 512 | 4096 | 1278 | |||||
4D | Silicon | 5MB | 512 | 4096 | 1534 | |||||
4E | Silicon | 7MB | 512 | 4096 | 1790 | |||||
4F | Silicon | 8MB | 512 | 4096 | 2046 | |||||
50 | RAM | 256KB | 64 | 1024 | 249 | |||||
51 | RAM | 512KB | 128 | 2048 | 252 | |||||
51 | RAM | 480KB | 128 | 2048 | 236 | * After S2R 2, or in Italy | ||||
51 | RAM | 144KB | 128 | 2048 | 68 | * After S2R 23, for MTX Series 2 | ||||
52 | RAM | 320KB | 64 | 2048 | 156 | *** |
* = Hacked type 51 codes, explained below.
** = I added these for REMEMOTECH and REMEMOrizer. The CFX system (with Compact Flash media) also uses these same type codes.
*** = I added this primarily for REMEMOTECH, REMEMOrizer and SDX Plus.
Note that some of the hard disk sizes are >8MB in size. Presumably the CP/M partition size was capped to 8MB. Perhaps a mechanism existed to tell CP/M to use a particular part of the total disk space. I have a vague memory of Ed Hollingshead mentioning something like this.
All Memotech disk types appear to have 26 128 byte records per logical track. This is what programs see, when using the driver code in high memory, and this is what CP/M sees. Physically, the layout is often different.
The first two logical tracks are reserved for CP/M. This is followed by the directory, and then the data area, as a number of blocks (both directory and data area are in the block area).
When dealing with 3.5" or 5.25" disks, the disk driver code converts the logical track and sector number to what would today be called a logical block address, and then converts it back to the physical track and sector. It also handles the fact the disk may be double sided, double density, or may have double the number of tracks (80 tracks, at 96TPI). 3.5" and 5.25" disks have 16 physical sectors per physical track. In double density modes, these are 256 bytes long, else 128 bytes.
Its interesting to note that 5.25" and 3.5" disks use exactly the same geometry and some limited success has been reported running a 3.5" disk attached to an FDX (I think I did this once) and a 5.25" disk attached to an SDX. I have no experience working with 5.25" disks on Linux.
If you create ROM Disc, this will typically appear as type 03 and 07.
8" disks did have 26 physical sectors per track. Type 10 disks also used a skew table.
Silicon disks (RAM accessed via I/O ports) and RAM disks (RAM accessed via bank switching) have no physical geometry.
It is interesting to note that with physical disks, the disk geometry
reflects an integer number of tracks, each with the full number of sectors
per track.
With Silicon or RAM disks, the available memory produces a non-integer number
of tracks, where the last fractional track contains fewer sectors.
This affects how the number of Blocks in the DPB and the table above is
calculated.
It also means the disk definitions in the cpmtools
diskdefs
files need to take this into account, and because
you advise cpmtools
of the number of tracks (as a rounded up
integer) this may also mean disk images may end up slightly bigger than the
memory they fit into.
Hacked type 51 codes
Normally a type 51 RAM disk would be 512KB. I had a 512KB RAM expansion card in my FDX back in 1984. I therefore had 64KB CP/M memory on the motherboard, plus an extra 512KB which could all be used as RAM Disc.
In Italy (for an unknown reason), it would only be 480KB.
Italy has a CONFIG48.COM
and SIDISC48.COM
programs, which know the smaller size.
An alternative would have been to use the normal
CONFIG.COM
and SIDISC.COM
,
along with the S2R 2
command to shrink the type 51 code,
by 2*16KB to 480KB.
The MTX512 S2 had 256KB DRAM on the motherboard,
of which 64KB was visible in RELCPMH=0 mode,
and 208KB was visible in RELCPMH=1 mode (due to addressing limitations).
Use the S2R 23
command to shrink the type 51 code,
by 23*16KB to 144KB.
The S2R
command is intended to be used at boot time,
in the startup sequence, before anything writes to the RAM Disc.
A better approach would have been to define new type codes for the various reduced sizes of RAM Disc. At the time, a rather poor precedent had been set in the hack for Italy. I also didn't own the source to the boot ROMs, SIDISC or CONFIG.
However, note that REMEMOTECH, REMEMOrizer and SDX Plus do the right thing, with the type 52 code for a 320KB RAM Disc.