2021-03-17 21:04:03 +00:00
|
|
|
# MDTTool
|
|
|
|
|
|
|
|
MDTTool is a simple multiplatform Python tool for manipulating CF card images
|
|
|
|
for the Reactive Micro MicroDrive/Turbo card for the Apple II family.
|
|
|
|
|
|
|
|
It is written in Python 3 and licenced under GPL v3.
|
|
|
|
|
2021-03-17 21:04:55 +00:00
|
|
|
## Usage
|
|
|
|
|
2021-03-17 22:12:31 +00:00
|
|
|
There are really three use cases for the tool at the current time:
|
|
|
|
|
|
|
|
1. Display MicroDrive/Turbo partition table in human-readable format.
|
|
|
|
2. Take a CF card image (or raw CF card device) and extract all the
|
|
|
|
partitions as disk images.
|
|
|
|
3. Take a list of disk images and construct a MicroDrive/Turbo disk image
|
|
|
|
(or write directly to the raw CF card device.)
|
|
|
|
|
2021-03-17 21:04:55 +00:00
|
|
|
```
|
2021-03-19 03:34:31 +00:00
|
|
|
Usage:
|
|
|
|
mdttool [-haxl] [-C nnnn] [-H nn] [-S nn] [-D mode] [-o outputfile] inputfile [inputfile2...]
|
|
|
|
|
|
|
|
-h Show this help
|
|
|
|
-a Assemble CF Card image from list of .PO disk images
|
|
|
|
-x eXplode a CF Card image into constituent partitions
|
|
|
|
-l Display partition table
|
|
|
|
-C nnnn Set number of cylinders (when assembling new image)
|
|
|
|
-H nn Set number of heads (when assembling new image)
|
|
|
|
-S nn Set number of sectors (when assembling new image)
|
|
|
|
-D mode DMA mode (when assembling new image)
|
|
|
|
mode can be off, iie, gsrom01, gsrom03
|
2021-03-17 21:04:55 +00:00
|
|
|
```
|
2021-03-17 21:04:03 +00:00
|
|
|
|
|
|
|
## Display Partition Table
|
|
|
|
|
2021-03-17 22:12:31 +00:00
|
|
|
The `-l` flag is used to display the partition table embedded in a
|
|
|
|
MicroDrive/Turbo CF card image.
|
|
|
|
|
2021-03-17 21:04:03 +00:00
|
|
|
For example:
|
|
|
|
```
|
2021-03-17 22:12:31 +00:00
|
|
|
$ mdttool -l cf-card.img
|
|
|
|
|
|
|
|
MicroDrive/Turbo Partition Table
|
|
|
|
|
|
|
|
Cylinders: 995
|
|
|
|
Heads: 16
|
|
|
|
Sectors: 63
|
|
|
|
GS ROM Vers: 0
|
|
|
|
|
|
|
|
# Start End Length
|
|
|
|
1 256 65790 65535
|
|
|
|
2 65791 131325 65535
|
|
|
|
3 131326 196860 65535
|
|
|
|
4 196861 696892 500032
|
|
|
|
|
2021-03-17 21:04:03 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Explode a CF Card Image into .PO Disk Images
|
|
|
|
|
2021-03-17 22:12:31 +00:00
|
|
|
Each partition will be written to a separate file in the current working
|
|
|
|
directory.
|
|
|
|
|
|
|
|
By default, these images are named `partition1.po`, `partition2.po` etc.
|
|
|
|
|
2021-03-17 21:04:03 +00:00
|
|
|
For example:
|
|
|
|
```
|
2021-03-17 22:12:31 +00:00
|
|
|
$ mdttool -x cf-card.img
|
|
|
|
Writing 33553920 bytes to partition1.po
|
|
|
|
Writing 33553920 bytes to partition2.po
|
|
|
|
Writing 33553920 bytes to partition3.po
|
|
|
|
Writing 256016384 bytes to partition4.po
|
2021-03-17 21:04:03 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Assemble a CF Card Image from a list of .PO Disk Images
|
|
|
|
|
2021-03-17 22:12:31 +00:00
|
|
|
This command builds a MicroDrive/Turbo partition table from scratch.
|
|
|
|
|
|
|
|
The partition table embeds the physical drive parameters - the number of
|
2021-03-19 03:34:31 +00:00
|
|
|
cylinders, heads and sectors. It also encodes the setting for the DMA
|
|
|
|
mode (off, Apple //e, Apple IIgs ROM01 or Apple IIgs ROM03.)
|
2021-03-17 22:12:31 +00:00
|
|
|
|
|
|
|
When creating a new CF card image in this way, MDTTool will use the
|
|
|
|
hard-coded defaults for cylinders, heads, sectors and GS ROM version. These
|
|
|
|
defaults were copied from typical 512MB CF card.
|
|
|
|
|
2021-03-19 03:34:31 +00:00
|
|
|
You can override these with the `-C`, `-H`, `-S` and `-D` command line
|
2021-03-17 22:12:31 +00:00
|
|
|
options. The heads always seems to be set to 16 and the number of sectors
|
|
|
|
to 63. However the number of cylinders depends on the size of the CF card
|
|
|
|
in question.
|
|
|
|
|
2021-03-17 21:04:03 +00:00
|
|
|
For example:
|
|
|
|
```
|
2021-03-17 22:12:31 +00:00
|
|
|
$ mdttool -a -o new-cf.img partition1.po partition2.po partition3.po partition4.po
|
|
|
|
Reading partition1.po ...
|
|
|
|
Reading partition2.po ...
|
|
|
|
Reading partition3.po ...
|
|
|
|
Reading partition4.po ...
|
|
|
|
New CF card image created in new-cf.img
|
2021-03-17 21:04:03 +00:00
|
|
|
```
|
|
|
|
|
2021-03-19 03:34:31 +00:00
|
|
|
Another example, overriding the number of cylinders and setting the DMA mode
|
|
|
|
for the Apple //e:
|
2021-03-17 22:12:31 +00:00
|
|
|
```
|
2021-03-19 03:34:31 +00:00
|
|
|
$ mdttool -a -D iie -C 32000 -o new-cf.img partition1.po partition2.po partition3.po partition4.po
|
2021-03-17 22:12:31 +00:00
|
|
|
Reading partition1.po ...
|
|
|
|
Reading partition2.po ...
|
|
|
|
Reading partition3.po ...
|
|
|
|
Reading partition4.po ...
|
|
|
|
New CF card image created in new-cf.img
|
|
|
|
```
|
|
|
|
|
|
|
|
|