Posts Reverse Engineering the PWP Format
Post
Cancel

Reverse Engineering the PWP Format

I created this document while working with my Smith Corona PWP 78 DS, a ‘Personal Word Processor’ typewriter capable of reading and writing files to a floppy drive. It uses a proprietary .pwp format to encode files so I wanted to understand it so I could create new documents with an external computer. This is what I was able to discover.

PWP 78 DS


Header Format

1
2
3
4
?? ?? 20 20:20 20 20 20|20 20 20 20:20 4D 4C 34
44 20 27 39:32 01 00 FP|SP PS MT MB:ML ML MR MR
66 00 1A 01:00 00 00 00|00 00 00 00:00 00 00 00
00 00 00 00:00 00 00 00|00 00 00 00:00 00 00 00
CodeMeaningValuesDefault
??Size of file16-bit unsigned 
FP

Pitch

06 = 10
05 = 12
04 = 15
06

SP

Spacing

02 = single
03 = 1.5
04 = double
02

PS


Paper length


42 = 11”
46 = A4
54 = 14”
FC = No limit
42


MTTop margin 06
MBBottom margin 06
MLLeft margin16-bit unsigned48 00
MR
Right margin
16-bit unsigned
Limit is 52 02
B0 01

Rows 3-4 are tabs in 2 byte sets

First two bits of second byte are tab type:

00Normal tab
11Decimal tab
10Tab center
01Flush right

Default tabs are 66 00 and 1A 01. All positions seem to be multiples of 6.


Special Characters

10New Line
13Superscript
14Subscript
20Space
0ENew Page

Special Formatting

Bold01 [A] 01 [B] 01 [C]
Underline02 [A] 02 [B] 02 [C]
Bold Underline03 [A] 03 [B] 03 [C]
Tab07 1E 1E 1E 1E 1E [ABC]
Center08 1E 1E .. .. 1E [ABC] 0D

Supported Characters

21!
22
23#
24$
25%
26&
27
28(
29)
2A*
2B+
2C,
2D-
2E.
2F/
30
  ↕
39
0

9
3A:
3B;
3D=
3F?
40@
41
  ↕
5A
A

Z
5B[
5D]
5E^       - Connects to next character
5F_
60`       - Connects to next character
61
  ↕
7A
a

z
7E~       - Connects to next character
82é
87ç
A8¿
AB½
AC¼
BD¢
F4
F5§
This post is licensed under CC BY 4.0 by the author.