home *** CD-ROM | disk | FTP | other *** search
- #undef NINE8
- #undef TARGA16
-
- #define ATT6300PC /* bg 9/25/87 */
- #undef ZENITHPC /* bg 9/25/87 */
-
- #if defined(ATT6300PC)
- # define TARGA_BASE_ADDR 0xA0000000
- # undef ZENITHPC
- #endif
-
- #if defined(ZENITHPC)
- # define TARGA_BASE_ADDR 0xD0000000
- # undef ATT6300PC
- #endif
-
- #if defined(TARGA32)
- # define TARGAS
- # define TARG1632
- # define COLSIZE unsigned long
- # define TNUMB 2 /* 2**TNUMB bytes/pixel */
- # define SEGSHIFT 4 /* 4 (div/16) for TARGA32 */
- # define TARMSK 0x1fff
- #endif
-
- #if defined(TARGAM8)
- # define TARGAS
- # define COLSIZE unsigned char
- # define TNUMB 0 /* 2**TNUMB bytes/pixel */
- # define SEGSHIFT 6 /* 4 (div/64) for TARGAM8 */
- # define TARMSK 0x7fff
- #endif
-
- #if defined(TARGA16)
- # define TARGAS
- # define TARG1632
- # define COLSIZE unsigned short
- # define TNUMB 1 /* 2**TNUMB bytes/pixel */
- # define SEGSHIFT 5 /* 5 (div/32) for TARGA16 */
- # define TARMSK 0x3fff
- #endif
-
- #if defined(NINE8)
- # define COLSIZE unsigned char
- # define TNUMB 0 /* 2**TNUMB bytes/pixel */
- # define NNVBIT (0x20)
- # define NNSTATS ((unsigned char *)(0xC0000000))
- # define NNSEGL ((unsigned char *)(0xC0000705))
- # define NNSEGH ((unsigned char *)(0xC0000706))
- # define NNDAT ((unsigned char *)(0xA0000000))
- # define NNRED ((unsigned char *)(0xC0000100))
- # define NNGRN ((unsigned char *)(0xC0000200))
- # define NNBLU ((unsigned char *)(0xC0000300))
- # define NNZOOM ((unsigned char *)(0xC0000700))
- #endif
-
- #define YMAX 484
- #define XMAX 512
- /* the two below are in tardev.h
- #define IOBASE 0x220
- #define DESTREG (IOBASE+0x802)
- */
- /*
- * define a macro to check bounds
- * of a single point
- */
- #define clipp(x,y) \
- (y < winminy || y > winmaxy || \
- x < winminx || x > winmaxx)
- /*
- * set register for correct y
- * and evaluate to address of point
- */
-
- #ifdef NINE8
- # define FLIP -1
- /* set register for correct y stripe
- * and evaluate to address of point
- */
- # define POINT(x,y) ( \
- *NNSEGL = (y) & 0x80, \
- *NNSEGH = ((y) >> 1) & 0x80, \
- NNDAT + (((y) & 0x7f) <<9 ) + (x) )
- #else
- /* for TARGAs */
- # define FLIP 1
- # define POINT(x,y) \
- (outp(DESTREG, y >> SEGSHIFT), \
- ((COLSIZE *)TARGA_BASE_ADDR + ((x | y << 9) & TARMSK)))
-
- extern struct TARStruct *targa;
- # define POKE(a,b,c,d) memcpy(a,b, c, d )
- # define PEEK(a,b,c,d) memcpy(c, a,b, d)
- # define TCHAR ((unsigned char *)(TARGA_BASE_ADDR))
- # define TLONG ((COLSIZE *)(TARGA_BASE_ADDR))
- #endif
-
- extern int tmode,xormode;
-