Skip to main content

Dacom 450 Formats and Programs

2.2. Formatting Considerations​

Data are encoded for transmission by the Dacom 450 in 585-bit frames, consisting of a 24-bit synchronization code, 37-bit leader, 512-bit information area and l2-bit checksum. There are two kinds of frames distinguished by leader format, one for setup or initialization and the other for the data itself. Serial binary image data are placed in the data area of succeeding data frames.

The header of each frame is shown in Figure 4. The various fields are defined in Table 1 following the Figure.

   +-----------+--------+-------------------+----------+
| Sync Code | Leader | Data | CRC Code |
+-----------+--------+-------------------+----------+
24 / 37 \ 512 12
.-------' \----------------------.
/ \
+-------+-------+-------+-------+-------+-------+
| Flags | Count | X Pos | Black | White | State |
+-------+-------+-------+-------+-------+-------+
| 7 \ 10 12 3 3 2
| \--------------------------.
| \
+-----+-----+------+-----+-------+-----+
| Seq | RUN | COFB | RPT | Spare | SUB |
+-----+-----+------+-----+-------+-----+
2 1 1 1 1 1

Figure 4. Frame Format
             Table 1. Header Field Definitions

Field Width Function Setup Data
(bits) Block Block
-----------------------------------------------------

Sync Code 24 Synchronization 30474730 (octal)

Seq 2 Sequence number 00 00,01,10,11

RUN 1 Initialize-start 0 1

COFB 1 Unknown 0 0

RPT 1 Unknown 1 0

Spare 1 Unknown 0 0

SUB 1 Indicates setup frame 1 0

Count 10 Number of bits in data All 1's
field (0 - 512)

X Pos 12 Current position on All 1's
scan line (0 - 1725)

Black 3 Current black field All 1's
length (2 - 7)

White 3 Current white field All 1's
length (2 - 7)

State 2 Current state (0 - 3) All 1's

Data 512 Data (0 - 512 bits)

CRC Code 12 CRC checksum. Uses polynomial
x**12 + x**8 + x**7 + x**5 + x**3 + 1

Setup frames have additional information in the data field; the various fields and their functions are described in Table 2.

        Table 2. Field Definitions for Setup Frame.

Field Width Function
--------------------------------

Start bit 1 Always zero

Speed bit 1 Set if express mode

Detail bit 1 Set if detail mode (speed and detail
bits both zero for quality mode)

14 inch 1 Set if 14-inch paper

5 inch 1 Set if 5-inch inch paper (14-inch
and 5-inch inch paper bits both zero
for 11-inch paper)

Paper present 1 Set if paper present in scanner

Spare 5 Can have any value

Multi-page 1 Set if multi-page mode

20 All 0's

480 Alternate 1's and 0's

The tailing setup frames differ from the leading setup frames only in bits which indicate whether the system is operating in single or multiple page mode and whether paper is present in the scanner.

All n-bit numeric fields (except Seq) are transmitted by the Dacom 450 machine least-significant-bit (LSB) first (i.e. Count, X Pos, Black, White, State, CRC, and run length words in the data field). All other fields are transmitted left-most bit first.

There are a few important points to be considered in regard to the header of a data frame. The header contains enough information about the state of the decoding algorithm to be able to re-establish correct decoding in the event of loss or mutilation of a data frame. The decoding algorithm resets its state variables to those in the header each time it begins decoding a new data frame. One of the most difficult problems encountered while constructing the decoding algorithm was the correct synchronization of the algorithm as it proceeds across the frame boundary with respect to the header information. In order for synchronization to be maintained, the operation of the algorithm must follow exactly that described in the previous section.

This requirement for every data frame to be self-synchronizing, leads to a few subtleties in the encoding algorithm which seem quite natural, but were not very obvious in the beginning.

  1. Transition bits(s) labeling the arcs on the state transition diagram in Figure 2 are not broken across frames. Similarly, individual run-length words are not broken across frames.

  2. If a frame ends with a transition, the header of the next frame contains the state to which the transition is made.

  3. If a frame ends with a transition out of state 0 or 3, then the transition bit (0 or 1) is inserted at the end of the current frame (not at the beginning of the next frame).

  4. The field lengths for black and white runs in the header include changes that may have been caused at the end of the previous frame.

  5. If a frame begins with a white or black run, then this run is treated (for purpose of decreasing its field length) as if it were the beginning of a new run, since there is no information in the header to indicate otherwise.

The decoding algorithm is initialized at the first data frame received after the sequence of setup frames at the beginning of transmission. The first data frame has a count of zero, indicating no data bits are in the frame. The second data frame begins the actual document; however, its X position appears to be irrelevant. Instead, we assume the initial X position at this time is one pel to the left of the right margin (-l mod l726). With these assumptions succeeding X positions of the algorithm and the frame headers agree.

2.3. The Decoding Program​

The decoding algorithm described above has been implemented in the PDP-11 MACRO-11 assembly language for the RT-11 operating system. This program contains extensive features for selectively dumping frames and tracing the operation of the algorithm. It is designed to operate on a file containing the raw data generated by the machine and does not depend upon any prior reformatting of the data. However, it will operate also on files in the so-called UCL format [4], which has been adopted as the standard for use in the Internet Program. The existing DCNET supporting software for the Dacom 450 uses the UCL format and operates normally to copy data directly between the machine and the file, with decoding operations done at a later time. However, there is no intrinsic factor, except processing-rate limitations, why input data could not be decoded directly from the machine.

In operation, the program scans the input data one bit at a time and searches for the synchronization pattern. Note that all data processed are inverted from the natural interface conventions. When a synchronization pattern is found, the header and data portions are extracted and the various state variable checked and reset, if necessary. Checksum verification is performed according to the polynomial 1 + x**3 + x**5 + x**7 + x**8 + x**12. In the case of setup frames the format (detail, quality, express), page length (14, 8-l/2, 5-l/4) and multiple-page indicators are extracted from the data area. Finally, under control of specified options, the header and data portions of the frame are printed with appropriate headings.

The decoding algorithm itself is called for each data frame. It produces an output consisting of a sequence of run-length pairs which can be used to form bit maps and other representations of the data. Optionally, a printed trace of the operations performed by the algorithm can be produced.

2.4. The Encoding Program​

The encoding algorithm has been implemented in the PDP-11 MACRO-11 assembly language for the RT-11 operating system. The program accepts facsimile data in 16-bit run-length format or bit-map format. The input data would normally be in a file, possibly obtained by translating some other representation (e.g., T.4 format) to run-length or bit-map format. The program produces an output consisting of data compressed in Dacom 450 format and packed in 585-bit frames along with the corresponding header and checksum information.

The encoding program needs to be careful about how to break data across frames and how many bits of data to insert in each frame. The rules mentioned in section 2.2. help to solve the first problem. The second problem is a little less understood. The problem arises because data bits are required by the printing mechanism at a constant rate, but successive frames transmitted at the line rate can contain different amounts of decoded information, leading to buffer overrun in extreme cases.

In order to compensate for the rate mismatch, it has been found sufficient to control the size of the data portion of the frame according to a simple set of empirical rules which produce results quite similar to the scanner iteslf. According to these rules, a frame is "full" when it contains more than 500 bits of data or when the data represents more than 4800*X pels (or columns) of information,

where   X = 2 for transmission rate 2.4 kbs,
X = 1 for transmission rate 4.8 kbs,
X = 1/2 for transmission rate 9.6 kbs.

2.5. Dacom 450 File Formats​

Dacom 450 facsimile data is ordinarily stored as an RT-11 file in the so-called UCL format [4]. In this format, each 585-bit frame is stored in a 76-byte record. The first byte specifies the length of the record, the second specifies a command and the remaining 72 bytes contain the 585 bits of the original Dacom 450 frame zero-filled at the end. The command byte is coded as follows:

a. 56 (70 octal): The data field contains a setup frame (the first record of the file). The length byte is 76 (114 octal).

b. 57 (71 octal): The data field contains a data frame (the remaining records in the file except the last one). The length byte is 76 (114 octal).

c. 58 (72 octal): End of file (the last frame of the file). There is no data field and the length byte is 2.

2.6. Run-Length and Bit-Map File Formats​

The decode program produces 16-bit run length words as its output. Each run is encoded in a 16-bit word, with white in positive and black in negative two's complement values. A zero word terminates each line, with the trailing white run suppressed if present. An all-white line is encoded as a single run of length one followed by a zero word. The file is terminated by a line of length zero, that is, a single zero word.

Bit-map files consist of a four-byte header followed by the data. The header consists of two 2-byte quantities, the first of which represents the number of pels in a line and the second the number of lines in the page. Each scanning line of data is represented in an integral number of bytes, the last byte of a line zero-filled if necessary.