stever@videovax.UUCP (02/04/87)
In article <3326@cbosgd.ATT.COM>, Bill Thacker (gwe@cbosgd.UUCP) writes: > The story of the film so far: > > First the sun was formed, and the earth cooled down, then the dinosaurs > died, then people gripe about slow printing... One thing I have discovered while reading the section on printers in the ROM Kernal Manual is that in graphics mode, the printer.device calls render.c once per non-blank pixel -- and if it is a color printer, then once per color per pixel! Thus, even if no interpolation (called "resampling" by some writers) is being done, there is quite a bit of overhead involved in setting up a line of output. I don't know what the cost (in microseconds) is for a subroutine call, but for a single head pass on my JX-80, there are 960 pixels horizontally, eight pixels vertically, and four print colors, which may be used individually or in combination. If we assume we are printing a DPAINT picture, the full width of the page, and that 40% of the pixels require mixing two colors, the calculation is as follows: 960 * 8 * ((0.6 * 1) + (0.4 * 2)) = 10,752 calls to render.c (per head pass) If we further assume (probably quite optimistically) that each call to render.c takes only 100 microseconds, it will take more than a second just to put the data for a head pass into the output buffer. Undoubtedly, the Apple ][ printer interface that Bill referred to is able to use special knowledge of the printer to allow much faster graphic rendering. Also, it probably had the original bit-map directly available to it, allowing it to access each byte directly and process 8 pixels at a time. What Commodore-Amiga has done is make it possible to interface to almost any conceivable printer! Because the data is transmitted to the printer driver in bit-map form, the printer driver can be written to accomodate some pretty arcane graphics formats. Further, interpolation (or any other processing -- solarization, anyone?) is possible despite the very simple printer drivers (render.c, et. al.) because the very fact that interpolation or other processing occurs is completely hidden behind the general-purpose interface. The slowness that results is the price that must be paid for generality. There is room for improvement, however, in how the printer drivers manage the printers. This is an area I am continuing to investigate. Steve Rice ---------------------------------------------------------------------------- {decvax | hplabs | ihnp4 | uw-beaver}!tektronix!videovax!stever