MGT format

From Sinclair Wiki
(Redirected from IMG format)
Jump to navigation Jump to search


MGT/IMG Disk Image Format

The MGT/IMG format was created for storing DISCiPLE/+D disk images for emulation.

This format is member of the Easy Disk Image Formats and contains only the data of sectors.

Note that in MGT's parlance, track 128 is the first track of the second side of the disk, track 129 is the second track of the same side, and so on.

MGT/IMG file structure

MGT/IMG images can store single or double sided 40 or 80 track disk images, but most of the files are double side 80 track disk images.

File Header

There is no any header or file signature (magic bytes).

Data

Sectors laid from 1st to last within a track:

  • Sector 1
  • Sector 2

...

  • Sector last

Tracks in MGT file

Track data follow the “alt” schema:

  • Side: 0 Track: 0
  • Side: 1 Track: 0
  • Side: 0 Track: 1

...

  • Side: 0 Track: 79
  • Side: 1 Track: 79

Tracks in IMG file

Track data follow the “out-out” schema:

  • Side: 0 Track: 0
  • Side: 0 Track: 1
  • Side: 0 Track: 2

...

  • Side: 0 Track: 79
  • Side: 1 Track: 0
  • Side: 1 Track: 1

...

  • Side: 1 Track: 79

File length

DISCiPLE/+D uses 512 BPS and 10 SPT for disks (see MGT filesystem), so a

  • 40 track 1 sided image length is 204800 byte (1×40×10×512)
  • 40 track 2 sided image length is 409600 byte
  • 80 track 1 sided image length is 409600 byte
  • 80 track 2 sided image length is 819200 byte