Dr. Halo PIC
(Split off from Dr. Halo) |
(→Sample files) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
* [[Dr. Halo CUT]] | * [[Dr. Halo CUT]] | ||
* [[Dr. Halo PAL]] | * [[Dr. Halo PAL]] | ||
+ | |||
+ | PIC format does not seem to be as well known as CUT. A reference to "Dr. Halo format" most likely means CUT, not PIC. | ||
+ | |||
+ | == Discussion == | ||
+ | PIC is highly "device dependent". A PIC file contains identifiers for the relevant graphics hardware and mode, and a compressed copy of raw video memory. | ||
+ | |||
+ | Some editions of Dr. Halo support several dozen video cards, each with a handful of graphics modes, so supporting the entire format would be quite difficult. But it is realistic to support files that use the standard CGA/EGA/VGA modes. | ||
+ | |||
+ | == Format details == | ||
+ | ''[Some of this information is based on reverse engineering, and may be incorrect. Written for the fileformats.archiveteam.org wiki.]'' | ||
+ | |||
+ | A PIC file consists of a header segment, followed by the compressed image data. Byte order is little-endian. | ||
+ | |||
+ | === Header structure === | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Offset !! Length !! Description | ||
+ | |- | ||
+ | |0 || 2 || "<code>AH</code>" signature | ||
+ | |- | ||
+ | |2 || 2 || Software version code? | ||
+ | |- | ||
+ | |4 || 2 || Unused? | ||
+ | |- | ||
+ | |6 || 1 || File type? Always 0x02. | ||
+ | |- | ||
+ | |7 || 1 | ||
+ | |Board ID? Known values: | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Value !! Description !! Implied header size | ||
+ | |- | ||
+ | |0x01 || CGA || 16 | ||
+ | |- | ||
+ | |0x07 || Hercules || 10 | ||
+ | |- | ||
+ | |0x15 || EGA (4-plane modes) || 12 | ||
+ | |- | ||
+ | |0x3c || VGA (1-plane modes) || 16 | ||
+ | |- | ||
+ | |0x47 || VGA (4-plane modes) || 12 | ||
+ | |} | ||
+ | |||
+ | |- | ||
+ | |8 || 2 || Unknown | ||
+ | |- | ||
+ | |10 || 2 | ||
+ | |Graphics mode. This field is not always present. | ||
+ | |||
+ | Some of the known modes are listed below. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Board ID !! Mode !! Description | ||
+ | |- | ||
+ | |0x01 || 0x00 || 320x200 4-color | ||
+ | |- | ||
+ | |0x01 || 0x01 || 640x200 2-color | ||
+ | |- | ||
+ | |0x07 || n/a || 720x348 2-color | ||
+ | |- | ||
+ | |0x15 || 0x02 || 320x200 16-color | ||
+ | |- | ||
+ | |0x15 || 0x03 || 640x200 16-color | ||
+ | |- | ||
+ | |0x15 || 0x04 || 640x350 16-color | ||
+ | |- | ||
+ | |0x15 || 0x05 || 640x800 16-color | ||
+ | |- | ||
+ | |0x3c || 0x00 || 320x200 4-color | ||
+ | |- | ||
+ | |0x3c || 0x01 || 640x200 2-color | ||
+ | |- | ||
+ | |0x3c || 0x02 || 640x480 2-color | ||
+ | |- | ||
+ | |0x3c || 0x03 || 320x200 256-color | ||
+ | |- | ||
+ | |0x47 || 0x04 || 320x200 16-color | ||
+ | |- | ||
+ | |0x47 || 0x05 || 640x200 16-color | ||
+ | |- | ||
+ | |0x47 || 0x06 || 640x350 16-color | ||
+ | |- | ||
+ | |0x47 || 0x07 || 640x480 16-color | ||
+ | |} | ||
+ | |||
+ | |} | ||
+ | |||
+ | For 4-color CGA-like modes: | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Offset !! Length !! Description | ||
+ | |- | ||
+ | |12 || 1 | ||
+ | |0x10 bit: One of the palette selector bits. | ||
+ | |||
+ | Low 4 bits: Color of palette entry 0, from the standard 16-color PC/CGA palette. | ||
+ | |- | ||
+ | |13 || 1 || Unknown | ||
+ | |- | ||
+ | |14 || 1 || 0x01 bit: One of the palette selector bits. | ||
+ | |- | ||
+ | |15 || 1 || Unknown | ||
+ | |} | ||
+ | |||
+ | === Compression scheme === | ||
+ | Compression is byte-oriented. The "next multiple of 512 bytes" instructions refer to the absolute file position. | ||
+ | |||
+ | To decompress, read a byte (N), follow the instructions below, repeat. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Code byte (N) !! Instructions | ||
+ | |- | ||
+ | |N = 0 || End of plane. If there are more planes, seek to the next multiple of 512 bytes. | ||
+ | |- | ||
+ | |1 ≤ N ≤ 127 || Emit the next N bytes literally. | ||
+ | |- | ||
+ | |N = 128 || End of block: Seek to the next multiple of 512 bytes. | ||
+ | |- | ||
+ | |N ≥ 129 || Emit the next byte N−128 times. | ||
+ | |} | ||
== Identification == | == Identification == | ||
Line 23: | Line 143: | ||
** [http://old-dos.ru/index.php?page=files&mode=files&do=show&id=6195 Various versions at old-dos.ru] - Includes Dr. Halo III (v3.01) and Dr. Halo Plus (v3.00). | ** [http://old-dos.ru/index.php?page=files&mode=files&do=show&id=6195 Various versions at old-dos.ru] - Includes Dr. Halo III (v3.01) and Dr. Halo Plus (v3.00). | ||
** Possibly relevant: {{CdTextfiles|rbbsv3n1/dull/drhalo.unp|drhalo.unp}} | ** Possibly relevant: {{CdTextfiles|rbbsv3n1/dull/drhalo.unp|drhalo.unp}} | ||
+ | * {{Deark}} | ||
== Sample files == | == Sample files == | ||
* {{CdTextfiles|librisbritannia/GRAPHICS/CLIPDRHA/1169.ZIP|1169.ZIP}} | * {{CdTextfiles|librisbritannia/GRAPHICS/CLIPDRHA/1169.ZIP|1169.ZIP}} | ||
* {{CdTextfilesURL|bthevhell/200/150/}} → screen*.pic (NSFW) | * {{CdTextfilesURL|bthevhell/200/150/}} → screen*.pic (NSFW) | ||
+ | * {{DexvertSamples|image/drHalo}} | ||
== Links == | == Links == |
Latest revision as of 15:42, 28 December 2023
Dr. Halo (including Dr. Halo Plus and Dr. Genius) is a line of raster image editing software for DOS, developed by Media Cybernetics.
Its main native file format is .PIC. Sometimes, a PIC file has a companion .PAL file. This article is about PIC format, and the software in general. There are separate articles for some formats:
PIC format does not seem to be as well known as CUT. A reference to "Dr. Halo format" most likely means CUT, not PIC.
Contents |
[edit] Discussion
PIC is highly "device dependent". A PIC file contains identifiers for the relevant graphics hardware and mode, and a compressed copy of raw video memory.
Some editions of Dr. Halo support several dozen video cards, each with a handful of graphics modes, so supporting the entire format would be quite difficult. But it is realistic to support files that use the standard CGA/EGA/VGA modes.
[edit] Format details
[Some of this information is based on reverse engineering, and may be incorrect. Written for the fileformats.archiveteam.org wiki.]
A PIC file consists of a header segment, followed by the compressed image data. Byte order is little-endian.
[edit] Header structure
Offset | Length | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 2 | "AH " signature
| ||||||||||||||||||||||||||||||||||||||||||||||||
2 | 2 | Software version code? | ||||||||||||||||||||||||||||||||||||||||||||||||
4 | 2 | Unused? | ||||||||||||||||||||||||||||||||||||||||||||||||
6 | 1 | File type? Always 0x02. | ||||||||||||||||||||||||||||||||||||||||||||||||
7 | 1 | Board ID? Known values:
| ||||||||||||||||||||||||||||||||||||||||||||||||
8 | 2 | Unknown | ||||||||||||||||||||||||||||||||||||||||||||||||
10 | 2 | Graphics mode. This field is not always present.
Some of the known modes are listed below.
|
For 4-color CGA-like modes:
Offset | Length | Description |
---|---|---|
12 | 1 | 0x10 bit: One of the palette selector bits.
Low 4 bits: Color of palette entry 0, from the standard 16-color PC/CGA palette. |
13 | 1 | Unknown |
14 | 1 | 0x01 bit: One of the palette selector bits. |
15 | 1 | Unknown |
[edit] Compression scheme
Compression is byte-oriented. The "next multiple of 512 bytes" instructions refer to the absolute file position.
To decompress, read a byte (N), follow the instructions below, repeat.
Code byte (N) | Instructions |
---|---|
N = 0 | End of plane. If there are more planes, seek to the next multiple of 512 bytes. |
1 ≤ N ≤ 127 | Emit the next N bytes literally. |
N = 128 | End of block: Seek to the next multiple of 512 bytes. |
N ≥ 129 | Emit the next byte N−128 times. |
[edit] Identification
PIC files start with ASCII "AH
", and the byte at offset 6 is 0x02
.
[edit] Software
- Dr. Halo
- Dr Halo II (at WinWorld) - Includes v2.03, and a manual
- Dr. Halo III (v3.00/1988-02-02)
- Dr. Halo III (at WinWorld) - Includes Dr. Halo III (v3.00/1989-02-06) & Dr. Genius (v3.00)
- Dr. Halo Plus (v3.00-German)
- Dr. Genius (v3.00)
- Various versions at old-dos.ru - Includes Dr. Halo III (v3.01) and Dr. Halo Plus (v3.00).
- Possibly relevant: drhalo.unp
- Deark
[edit] Sample files
- 1169.ZIP
- http://cd.textfiles.com/bthevhell/200/150/ → screen*.pic (NSFW)
- dexvert samples — image/drHalo