

TODO:

Special code for 24-bit rasters (i.e. compute colors) ?

What about pi and pd threshold values ?  They need to remain
0-15 for old drivers and ,agic settings.  Make sure this
is handled.  Leave thresholds at 15 and scale up when
doing pixel comparisons ?  Drivers will need to do same
since threshold will always be a 4-bit value.  Make sure that it is.

Note for compiling: driver should use the localestr/ in $V/include


for 8-bit-per-gun, modified:

DRIVER: to signify 24-bit color data is desired, printertag ColorClass
   must contain the new bit PCC_24BIT.
   Device checks driver this way:
       if((PED->ped_ColorClass & PCC_24BIT))

DEVICE: to signify the printer device is 24BIT capable, the new
   PDF_24BIT flag is set in pd_Flags1 of the PrinterData (PD) structure.


device.asm
  init pd_Flags1 to PDF_24BIT so drivers can check if device
  supports 24-bit color.  My test driver bails out with new error
  PDERR_OLDDEVICE (9) during case 5 render (pre-init) if printer
  device which called driver can not do 24-bit.

			/* Bail out if printer.device too old */
			if(!(PD->pd_Flags1 & PDF_24BIT)) {
					err = PDERR_OLDDEVICE;
					break;
				}
			}

pixel.c
  all changes commented with CAS
  changed all Ham calcs to do Ham6 or Ham8
  fiddled Hedley stuff (?)
  reduce to 4-bits-per-gun right before modern entrie line call to render
  Warning - I may have broke HAM5 and HAM7 if such exist
  new count arg to ConvertPixelArray so this function can avarage
    in skipped pixels on the fly rather than adding ColorLongs
error.c
  free ColorTmp buffer
fixcolors.c
  no changes
alias.c
  no changes
cdumprport.c
  checks driver's ColorClass for flag PCC_24BIT
  added dmatrix24 (4x4), dmatrix24_8 (8x8) and dmatrix24_16 (16x16)
  now gets 8-bit-per-gun color
  transfers 8-bit-per-gun color if driver ColorClass contains PCC_24BIT
  changed negative masks to 0xffffffff
  allocate ColorTmp buffer
floyd.c
  changed dvalue to 127
  changed 15's to 255's
  did not change roundup (+4) /8, need to ????
yrxe.c
  new count argument to ConvertPixelArray()
  changed some UWORD variables to ULONG
yrxr.c
  new count argument to ConvertPixelArray()
yexr.c
  new count argument to ConvertPixelArray()

printer.h and .i
/* new for V42 printer drivers to return as an error */
#define PDERR_OLDDEVICE		9	/* Driver needs newer printer.device */

prtbase.h and .i
#define PCC_24BIT       0x20    /* driver wants 24-bit color info (V42+) */

/* New for V42 - flag bit for Flags1 */
#define PDB_24BIT	0	/* 24-bit color printer device */
#define PDF_24BIT	1<<0	/* 24-bit color (and/or flag ) */

prtgfx.h and .i

  added to end of PrtInfo structure:
 	struct ColorInt *pi_ColorTmp;	/* PRIVATE - DO NOT USE */
	UBYTE *pi_dmatrix8;		/* pointer to 8x8 dither matrix */
	UBYTE *pi_dmatrix16;		/* pointer to 16x16 dither matrix */


from GraphicsGemsI orderdither.c

int dm[] = {
       0,   192,  48, 240,
       128,  64, 176, 112,
       32,  224,  16, 208,
       160,  96, 144,  80
       }; 
		       
int dm[] = {
       0, 192,  48, 240,  12, 204,  60, 252,
     128,  64, 176, 112, 140,  76, 188, 124,
      32, 224,  16, 208,  44, 236,  28, 220,
     160,  96, 144,  80, 172, 108, 156,  92,
       8, 200,  56, 248,   4, 196,  52, 244,
     136,  72, 184, 120, 132,  68, 180, 116,
      40, 232,  24, 216,  36, 228,  20, 212,
     168, 104, 152,  88, 164, 100, 148,  84
     }; 
