-
Notifications
You must be signed in to change notification settings - Fork 1
/
DiskImage_2MG_Info.txt
144 lines (84 loc) · 4.16 KB
/
DiskImage_2MG_Info.txt
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
GS WorldView
Summer 2003
http://apple2.org.za/gswv/a2zine/Docs/DiskImage_2MG_Info.txt
2MG (or 2IMG) Disk Image Files
These are disk images (e.g. .dsk or .nib) with a prefix which
includes information about size, format, sector ordering,
volume number, locked/unlocked, etc..
2MG files may also have a Comment and/or extra file information
added following the disk image data.
2MG format can accommodate disk images ranging from 5.25"
diskette up through hard disk.
Typically, the image files have names ending with ".2mg".
ProDOS File Type- $E0
ProDOS Aux Type- $0130
Emulators which can use 2MG images include Bernie ][ the Rescue,
Catakig, Sweet 16, XGS.
On an Apple II, ASIMOV2 (for IIgs) is the usual utility for
creating 2MG files and for converting them to disk.
2MG (or 2IMG) Disk Image Format
Part of File Length
Prefix- 64 bytes (usual size of Prefix)
Disk Data- varies (e.g. 143,360 for 5.25" disk)
Comment (optional)- varies (often not present)
Creator added (optional)- varies (often not present)
Prefix Format
0000-0003: 32 49 4D 47 "2IMG" ID for 2MG format (ASCII Text)
0004-0007: 58 47 53 21 "XGS!" Creator ID (ASCII Text) **
0008-0009: 40 00 Header size ($0040= 64 bytes)
000A-000B: 01 00 Version number
000C-000F: 01 00 00 00 Image Format
00= DOS 3.3 sector order
01= ProDOS sector order
02= NIB data
**Note: "Creator" refers to application creating the image.
Here are ID's in use by various applications:
ASIMOV2- "!nfc"
Bernie ][ the Rescue- "B2TR"
Catakig- "CTKG"
Sheppy's ImageMaker- "ShIm"
Sweet 16- "WOOF"
XGS- "XGS!"
0010-0013: 00 00 00 00 (Flags & DOS 3.3 Volume Number)
The four-byte flags field contains bit flags and data relating to
the disk image. Bits not defined should be zero.
Bit Description
31 Locked? If Bit 31 is 1 (set), the disk image is locked. The
emulator should allow no changes of disk data-- i.e. the disk
should be viewed as write-protected.
8 DOS 3.3 Volume Number? If Bit 8 is 1 (set), then Bits 0-7
specify the DOS 3.3 Volume Number. If Bit 8 is 0 and the
image is in DOS 3.3 order (Image Format = 0), then Volume
Number will be taken as 254.
7-0 The DOS 3.3 Volume Number, usually 1 through 254,
if Bit 8 is 1 (set). Otherwise, these bits should be 0.
0014-0017: 18 01 00 00 (ProDOS Blocks = 280 for 5.25")
The number of 512-byte blocks in the disk image- this value
should be zero unless the image format is 1 (ProDOS order).
Note: ASIMOV2 sets to $118 whether or not format is ProDOS.
0018-001B: 40 00 00 00 (Offset to disk data = 64 bytes)
Offset to the first byte of disk data in the image file
from the beginning of the file- disk data must come before
any Comment and Creator-specific chunks.
001C-001F: 00 30 02 00 (Bytes of disk data = 143,360 for 5.25")
Length of the disk data in bytes. (For ProDOS should be
512 x Number of blocks)
0020-0023: 00 00 00 00 (Offset to optional Comment)
Offset to the first byte of the image Comment- zero if there
is no Comment. The Comment must come after the data chunk,
but before the creator-specific chunk. The Comment, if it
exists, should be raw text; no length byte or C-style null
terminator byte is required (that's what the next field is for).
0024-0027: 00 00 00 00 (Length of optional Comment)
Length of the Comment chunk- zero if there's no Comment.
0028-002B: 00 00 00 00 (Offset to optional Creator data)
Offset to the first byte of the Creator-specific data chunk-
zero if there is none.
002C-002F: 00 00 00 00 (Length of optional Creator data)
Length of the Creator-specific data chunk- zero if there is no
creator-specific data.
0030-003F: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Reserved space- at present all must be zero.
Credits
Thanks to Eric Shepherd and Roger Johnstone for 2MG info.
Rubywand