mgtwriteusb


Namemgtwriteusb JSON
Version 0.9.3 PyPI version JSON
download
home_pageNone
SummaryWrite SAM Coupé disk images to USB floppy drive
upload_time2025-10-19 12:57:17
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords mgt disk sam coupe usb floppy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # writeusb

A Python script to write SAM Coupé disk images to a USB floppy drive so they can
be used on real SAM hardware.

Source disk images should be normal 80/2/10/512 format and in MGT/SAD/EDSK disk
image containers. SAMDOS/MasterDOS/BDOS and some custom loaders are supported.

## Background

USB floppy drives are usually limited to 1.44M (18-sector) and 720K (9-sector)
formats used by PC floppy disks. This is a problem for regular SAM disks, which
use a 10-sector disk format.

This script re-maps the sectors used by the files on the source disk image so it
uses only 9 sectors on each track. It also patches the boot loaders on converted
disks to keep within these limits. Most SAM disks should support conversion.

Note: this script will NOT help to read existing 10-sector SAM Coupé disks. The
10th sector on each track is inaccessible on USB floppy drives.

## Requirements

- Windows, Linux or macOS.
- USB floppy drive and double-density disks.
- Python 3.9 or later.

Windows users can install Python from the Windows Store.

## Installation

To install:

```shell
python3 -m pip install mgtwriteusb
```

Or to install from local source code:

```shell
python3 -m pip install .
```

To upgrade to the latest version:

```shell
python3 -m pip install --upgrade mgtwriteusb
```

## Command-line Options

```text
usage: writeusb [-h] [-o OUTPUT] [-p] [-n] [-f] [-a] [-s] diskimage

Write SAM disk image to USB floppy drive

positional arguments:
  diskimage

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output to disk image file
  -p, --pad             pad output disk image to 10 sectors
  -n, --noverify        don't verify disk after writing
  -f, --force           write even if boot loader is unknown
  -a, --all             write all tracks, not just used tracks
  -s, --sniff           detect boot loader on source image
```

## Examples

Convert `image.dsk` to 9-sector format, write used tracks to the connected USB
floppy drive, then verify the written data:

```shell
writeusb image.dsk
```

Convert `image.dsk` to 9-sector format, save output to disk image `output.img`
for use with SimCoupe or another disk writing program:

```shell
writeusb image.dsk -o output.img
```

Converting non-bootable disks will add a special version of SAMDISK v2, patched
to dynamically support both 9-sector and 10-sector disks. It will appear in the
directory listing as `samdisk9`. When an existing boot loader is patched it
supports only the converted 9-sector disks.

## Troubleshooting

macOS and Linux users may need to run the script under `sudo`, depending on the
permissions and group ownership of the USB floppy device. Linux users may just
need to be in the `disk` group, depending on distribution.

Be sure to use real double-density media, which usually has a blue cover. High
density disks have different magnetic properties, so covering the density hole
is not a good solution. HD disks are often unreliable after writing (YMMV).

If you're reusing existing SAM disks be aware that some USB floppy drives may
not recognise the existing 10-sector format. You may have to reformat the disk
as true 9-sector before it'll work. Under Windows try `format a: /t:80 /s:9`, or
under Linux try `ufiformat /dev/sdX` (change sdX to the correct device name).

SAMDOS/MasterDOS/BDOS will retry after disk errors but custom loaders may not.
The MNEMOtech loader used by MNEMOdemo 1 and 2 fails immediately fails with a
Loading Error so you'll need good quality disks!

Expect disk errors. If in doubt try a different disk!

## Limitations

Disk images containing custom formats are not supported and will be rejected.
This prevents original copies of Lemmings, Prince or Persia, and maybe some
other titles from working.

Reducing from 10 sectors to 9 sectors also reduces the disk capacity. The
converted disk has 72 directory slots and 702K of free space, rather than 80
directory slots and 780K on a regular disk. Full disks may need to be split.

Disks storing data outside the normal filesystem structures will be missed by
the conversion process. This affects the Pac-Man Emulator (v1.4 or earlier).

----

<https://github.com/simonowen/writeusb>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mgtwriteusb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "mgt, disk, sam, coupe, usb, floppy",
    "author": null,
    "author_email": "Simon Owen <simon@simonowen.com>",
    "download_url": "https://files.pythonhosted.org/packages/5b/79/61a34b472d095c6ab5870824a2c3e7223c8b7c38fd6f795e52106f8064c8/mgtwriteusb-0.9.3.tar.gz",
    "platform": null,
    "description": "# writeusb\r\n\r\nA Python script to write SAM Coup\u00e9 disk images to a USB floppy drive so they can\r\nbe used on real SAM hardware.\r\n\r\nSource disk images should be normal 80/2/10/512 format and in MGT/SAD/EDSK disk\r\nimage containers. SAMDOS/MasterDOS/BDOS and some custom loaders are supported.\r\n\r\n## Background\r\n\r\nUSB floppy drives are usually limited to 1.44M (18-sector) and 720K (9-sector)\r\nformats used by PC floppy disks. This is a problem for regular SAM disks, which\r\nuse a 10-sector disk format.\r\n\r\nThis script re-maps the sectors used by the files on the source disk image so it\r\nuses only 9 sectors on each track. It also patches the boot loaders on converted\r\ndisks to keep within these limits. Most SAM disks should support conversion.\r\n\r\nNote: this script will NOT help to read existing 10-sector SAM Coup\u00e9 disks. The\r\n10th sector on each track is inaccessible on USB floppy drives.\r\n\r\n## Requirements\r\n\r\n- Windows, Linux or macOS.\r\n- USB floppy drive and double-density disks.\r\n- Python 3.9 or later.\r\n\r\nWindows users can install Python from the Windows Store.\r\n\r\n## Installation\r\n\r\nTo install:\r\n\r\n```shell\r\npython3 -m pip install mgtwriteusb\r\n```\r\n\r\nOr to install from local source code:\r\n\r\n```shell\r\npython3 -m pip install .\r\n```\r\n\r\nTo upgrade to the latest version:\r\n\r\n```shell\r\npython3 -m pip install --upgrade mgtwriteusb\r\n```\r\n\r\n## Command-line Options\r\n\r\n```text\r\nusage: writeusb [-h] [-o OUTPUT] [-p] [-n] [-f] [-a] [-s] diskimage\r\n\r\nWrite SAM disk image to USB floppy drive\r\n\r\npositional arguments:\r\n  diskimage\r\n\r\noptional arguments:\r\n  -h, --help            show this help message and exit\r\n  -o OUTPUT, --output OUTPUT\r\n                        output to disk image file\r\n  -p, --pad             pad output disk image to 10 sectors\r\n  -n, --noverify        don't verify disk after writing\r\n  -f, --force           write even if boot loader is unknown\r\n  -a, --all             write all tracks, not just used tracks\r\n  -s, --sniff           detect boot loader on source image\r\n```\r\n\r\n## Examples\r\n\r\nConvert `image.dsk` to 9-sector format, write used tracks to the connected USB\r\nfloppy drive, then verify the written data:\r\n\r\n```shell\r\nwriteusb image.dsk\r\n```\r\n\r\nConvert `image.dsk` to 9-sector format, save output to disk image `output.img`\r\nfor use with SimCoupe or another disk writing program:\r\n\r\n```shell\r\nwriteusb image.dsk -o output.img\r\n```\r\n\r\nConverting non-bootable disks will add a special version of SAMDISK v2, patched\r\nto dynamically support both 9-sector and 10-sector disks. It will appear in the\r\ndirectory listing as `samdisk9`. When an existing boot loader is patched it\r\nsupports only the converted 9-sector disks.\r\n\r\n## Troubleshooting\r\n\r\nmacOS and Linux users may need to run the script under `sudo`, depending on the\r\npermissions and group ownership of the USB floppy device. Linux users may just\r\nneed to be in the `disk` group, depending on distribution.\r\n\r\nBe sure to use real double-density media, which usually has a blue cover. High\r\ndensity disks have different magnetic properties, so covering the density hole\r\nis not a good solution. HD disks are often unreliable after writing (YMMV).\r\n\r\nIf you're reusing existing SAM disks be aware that some USB floppy drives may\r\nnot recognise the existing 10-sector format. You may have to reformat the disk\r\nas true 9-sector before it'll work. Under Windows try `format a: /t:80 /s:9`, or\r\nunder Linux try `ufiformat /dev/sdX` (change sdX to the correct device name).\r\n\r\nSAMDOS/MasterDOS/BDOS will retry after disk errors but custom loaders may not.\r\nThe MNEMOtech loader used by MNEMOdemo 1 and 2 fails immediately fails with a\r\nLoading Error so you'll need good quality disks!\r\n\r\nExpect disk errors. If in doubt try a different disk!\r\n\r\n## Limitations\r\n\r\nDisk images containing custom formats are not supported and will be rejected.\r\nThis prevents original copies of Lemmings, Prince or Persia, and maybe some\r\nother titles from working.\r\n\r\nReducing from 10 sectors to 9 sectors also reduces the disk capacity. The\r\nconverted disk has 72 directory slots and 702K of free space, rather than 80\r\ndirectory slots and 780K on a regular disk. Full disks may need to be split.\r\n\r\nDisks storing data outside the normal filesystem structures will be missed by\r\nthe conversion process. This affects the Pac-Man Emulator (v1.4 or earlier).\r\n\r\n----\r\n\r\n<https://github.com/simonowen/writeusb>\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Write SAM Coup\u00e9 disk images to USB floppy drive",
    "version": "0.9.3",
    "project_urls": {
        "Homepage": "https://github.com/simonowen/writeusb",
        "Source Code": "https://github.com/simonowen/writeusb"
    },
    "split_keywords": [
        "mgt",
        " disk",
        " sam",
        " coupe",
        " usb",
        " floppy"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "765850162a6bf412d0fff63fff2db7bd8ecbdd4f171ec5687962679f40f8f80e",
                "md5": "380b8331fa547cf314f48c410f69a166",
                "sha256": "3ca4deb2cd34b6d9c48a33b06dbd13b14d8e89c5e99926a7af42c4e3c8b57169"
            },
            "downloads": -1,
            "filename": "mgtwriteusb-0.9.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "380b8331fa547cf314f48c410f69a166",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 16396,
            "upload_time": "2025-10-19T12:57:16",
            "upload_time_iso_8601": "2025-10-19T12:57:16.225802Z",
            "url": "https://files.pythonhosted.org/packages/76/58/50162a6bf412d0fff63fff2db7bd8ecbdd4f171ec5687962679f40f8f80e/mgtwriteusb-0.9.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5b7961a34b472d095c6ab5870824a2c3e7223c8b7c38fd6f795e52106f8064c8",
                "md5": "06a8ef5d3a8ddcf9f6bcbd29660f3dac",
                "sha256": "7934e543dab945449c8472d14cfb4c798ed528be5526a1dee9cf5644e116df71"
            },
            "downloads": -1,
            "filename": "mgtwriteusb-0.9.3.tar.gz",
            "has_sig": false,
            "md5_digest": "06a8ef5d3a8ddcf9f6bcbd29660f3dac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 16513,
            "upload_time": "2025-10-19T12:57:17",
            "upload_time_iso_8601": "2025-10-19T12:57:17.457686Z",
            "url": "https://files.pythonhosted.org/packages/5b/79/61a34b472d095c6ab5870824a2c3e7223c8b7c38fd6f795e52106f8064c8/mgtwriteusb-0.9.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-19 12:57:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simonowen",
    "github_project": "writeusb",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mgtwriteusb"
}
        
Elapsed time: 3.06282s