[comp.sys.atari.st] deskjet pageformatter

HOESEL@HGRRUG52.BITNET (08/07/89)

I have problems with understanding the pageformatter in the deskjet firmware.
I have a deskjet plus and thought that it has a 16kB input buffer and in
addition to that a large outputbuffer (propably more then 16kB). The page-
formatter is a program in the deskjet that allows to write on random
positions to the paper (the is the same principle as with laserprinters).
However the deskjet pageformatter is memory limited: as soon as memory
fills the topline in the buffer is printed. So you cannot write completely
random to the paper, but for subscripts and superscripts emulations (as done
by some wordprocessing programs) this is a good idea.

Now here comes my problem: if the pageformatter would work correctly, then
why do some programs succeed in outputting is such a way that more then the
usual amount of ink is used in some spots. For example the laserjet driver
of wordperfect 4.1 will emulate bold characters simply by overprinting them
slightly shifted (I know that I can change this driver, and I did, so bold
characters are now printed using the deskjet internal bold fonts). What
happens is that these slightly shifted characters do overlap and produce
twice the amount of ink. These seems very strange, given the pageformatter.
It also happens many time with the epson-emulation cardrige.

Also with some programs that produce text by using the graphic capabilities
of the deskjet it happens that only a very small row of dots is printed
at a time (much less then 50, the amount that could be printed in one
stroke of the printerhead).

could someone explain this?

remark on deskjet with atari: I heard from Michael Ritzer that it was
very easy to build a bufferchip inside the cable. use the 74hct645n chip.
get the power from pin 32 of the centronics port (on the printer side of
the cable). The 74hct645n is pin-compatible with the 245, but make sure
you use the 74hct645n. This one works (I use it now, build into a small
plastic box (the one used for commercial null-modem devicec. they are
very cheap)). use the B-pins as input and the A-pins as output. this is
done by connecting the pin 'dir' and the 'enable' pin both to ground.
The voltage drop on pin 32 is at the most 1Volt and the chip keeps working
at this level. btw. pin 32 is the !error output from the printer. it is
high until a fatal error occurs (which almost never happens))

greetings,
           frans

HOESEL@HGRRUG52

neff@hpvcfs1.HP.COM (Dave Neff) (08/09/89)

Regarding the DeskJet "pageformatter".

The DeskJet and DeskJet+ DOES NOT HAVE A PAGEFORMATTER.  It never has, it
never will.  You cannot do random cursor positions on the page.  In order
to allow for mixed text and graphics the printers try to insure you can 
do negative cursor moves of the maximum point size of text,
which is 2/3 of an inch on the DeskJet+ (36 point theoretical maximum
font).  Hence you can send 2/3 of an inch of text, back up the cursor 2/3
an inch and then send 2/3 an inch of graphics.  The actual mixed text and
graphics algorithm is more subtle and uses variable lookahead based on the
actual point sizes used in order to give more reliable results (if there
are lots of font/enhancement changes its not always possible to even
back up 2/3 of an inch) but the above description is the basic concept.

Not only does the DeskJet and DeskJet+ not have a pageformatter it
DOES NOT HAVE A BIT IMAGE BUFFER.  Commands to print characters are
sent to a custom IC, which looks them up in ROM and prints them.  Hence
two overlapping A characters are treated the same as an A character
overlapping a B charater.  THERE IS NO BIT IMAGE BUFFER WHERE CHARACTERS
ARE SIMPLY ORED TOGETHER.   This is the reason ink will puddle if
characters are printed on top of one another. 

The DeskJet and DeskJet+ printers lack a page formatter and a bit image
buffer in order reduce the cost of the printer by reducing the need for
RAM.  We just need a couple K of RAM to build commands (or vectors) for the
custom IC when then uses DMA to get the commands and print the text.
The firmware never sees the bit image of the text.  The firmware does see
the bit image of the graphics but it is stored in a special form needed
by the custom IC for printing the graphics and for this, and other
reasons, overlapping graphics are not ORed together either.  Notice that
text and graphics are always printed in separate passes as a result of
the lack of a bit image buffer.  In some respects using a bit image
buffer in the DeskJet+ would make more sense than the current scheme
but it was leveraged from the DeskJet which lacked enough RAM for a 
bit image buffer (and the custom IC does not support a bit image buffer).

It's hard to be any clearer without going into much more technical
detail but I hope this helps.  The DeskJets have a "format buffer" which
stores approximately 2/3 inch of text (and in the case of DeskJet+
1/3 of an inch of graphics), not a page formatter.  The DeskJets have a "vector
buffer" (well, actually 2 such buffers) for sending commands to the custom
chip, not a bit image buffer.

For more details about the inner workings of the DeskJet printers try
to get the October, 1989 issue of the HP Journal.  It goes into more
detail on the above concepts.

Happy Printing,

Dave Neff
neff@hpvcfs1.HP.COM