home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / INCLUDE / PCDECL.H < prev    next >
Text File  |  1990-10-11  |  21KB  |  509 lines

  1. /*
  2.     pcdecl.h
  3.  
  4.     % declarations for PC display stuff
  5.  
  6.     5/16/88  by Ted.
  7.  
  8.     OWL-PC 1.2
  9.     Copyright (c) 1986, 1987, 1988 by Oakland Group, Inc.
  10.     ALL RIGHTS RESERVED.
  11.  
  12.     Revision History:
  13.     -----------------
  14.      8/30/88 Ted      Changed Order of args to ram_memtoseg to extract ram_CopyBox.
  15.     10/07/88 Ted    Obsoleted ram_CopyBox.
  16.     12/05/88 Ted    added mousehides
  17.     12/12/88 ted    Merged CheckKey and CheckMouse into CheckEvent.
  18.     12/13/88 jmd    Messed with dos.h include
  19.      1/12/89 ted    Separated the pchdata from the pcdata for better sharing.
  20.      2/04/89 ted    moved ilmasktab into pcdata structure from static data.
  21.      2/07/89 Ted    added timeout wait arg to hCheckEvent function.
  22.      2/28/89 ted    extracted pc event related stuff to pchard.h
  23.      3/19/89 ted    made pcdata static.
  24.      4/09/89 ted    pulled static pchdata struct out of pcdata struct.
  25.      4/26/89 ted    Moved attrmap out of info struct into pcdata.
  26.      5/09/89 ted    Renamed from pcdisp.h
  27.      6/17/89 Ted    split pc_bgPlotText into evga_Plot-, mcga_Plot-, pc_bgPlot-.
  28.      7/05/89 ted    Added fontseg, fontoffs, dispseg for font plotters.
  29.      7/07/89 ted    Added new font plotting stuff: attrcols, plotchar, etc.
  30.      7/12/89 ted    Added OSTATIC's and '_func' macros.
  31.      7/14/89 ted    Removed ilmasktab.
  32.  
  33.     11/05/89 ted    Added pc_roundbyte macros for scrbox x byte alignment.
  34.     11/05/89 ted    Added DOS_ZEROSEG macro.
  35.     11/08/89 ted    Added hdatasize pcdata element for use by dispcurr.
  36.     11/08/89 ted    Added pcdata->brmask & macro to fix pc_roundbyte macros.
  37.      2/15/90 jmd    added header for Watcom
  38.      2/15/90 ted    Moved pc_squeezecmap out to dig dir, added hist & cswap funcs.
  39.      2/22/90 ted    Moved DOS_ZEROSEG macro to pchdecl.h.
  40.      2/28/90 ted    Made pcdata->h into (VOID *).
  41.      2/28/90 ted    Added desqview #define's.
  42.      2/29/90 ted    Added OCDECL's for assembly functions.
  43.      3/28/90 jmd    ansi-fied
  44.      6/06/90 ted    Added planemask arg to ram_copy stuff for EVGA plane drawing.
  45.     10/10/90 ted    Replaced OCDECL with oasm_func for assembly funcs for TC++.
  46. */
  47.  
  48. #ifdef LATTICE
  49. #    undef LATTICE        /* Lattice re-defines byte in dos.h, this tells it not to */
  50. #    include <dos.h>    /* has outp for Lattice compiler */
  51. #    define LATTICE
  52. #else
  53. #    ifdef TC
  54. #        include <dos.h>    /* has outp for Turbo compiler */
  55. #    endif
  56. #    ifdef TCP
  57. #        include <dos.h>    /* has outp for Turbo compiler */
  58. #    endif
  59. #    ifdef __WATCOMC__
  60. #        include <conio.h>    /* has outp for Watcom compiler */
  61. #    endif
  62. #    ifdef MW
  63. #        define inp(port)                oinp(port)
  64. #        define outp(port,word)            ooutp(port,word)
  65.  
  66.         /* plinout.asm */
  67.         extern byte oinp(short int port);
  68.         extern void ooutp(short int port, byte value);
  69. #    endif
  70. #endif
  71. /* -------------------------------------------------------------------------- */
  72.  
  73. #define attrcols_func(fname)        unsigned DIGPRIV fname(byte rattr)
  74. typedef                  unsigned (DIGPRIV *attrcols_fptr)(byte rattr);
  75. #define plotchar_func(fname)        oasm_func(void, fname, (void))
  76. typedef                         oasm_fptr(void, plotchar_fptr, (void));
  77.  
  78. typedef struct _pcdata {
  79. /* Note: the assembly coded font plotter expects these variables here. */
  80.     unsigned long  fontoffs;        /* offset of current char in font table */
  81.     unsigned short fontseg;            /* segment of font table for current font */
  82.     unsigned short vidaddr;
  83.     unsigned short nsame;            /* the length in chars of the line to plot */
  84.     unsigned short starty;            /* the length in chars of the line to plot */
  85.     unsigned short splitcol;        /* the fg/bg color word */
  86.  
  87.     unsigned short dispseg;            /* segment at which display memory lies */
  88.     unsigned short ilmask;
  89.     unsigned short ilsize;
  90.     unsigned short vbincr;
  91.     unsigned short fontlines;        /* number of lines in current font */
  92.     byte nplanes;                    /* number of bitplanes on display */
  93.  
  94.     attrcols_fptr  attrcols;        /* swappable attribute tranlation function */
  95.     plotchar_fptr  plotchar;        /* swappable font plotter kernel */
  96.  
  97.     dispinfo_struct info;
  98.     struct pmap_struct dmspace;        /* pointed to by info->dispmap */
  99.     byte        attrmap[256];        /* attribute map table */
  100.     byte        *xattrmap;            /* ptr to attribute map extension for mcga */
  101.     byte        attrsize;            /* size of attrmap element in bits (there are always 256 of them) */
  102.  
  103.     int         oldmode;            /* pre-init video mode to restore from */
  104.     int            oldcursx;            /* pre-init cursor position */
  105.     int            oldcursy;
  106.     cursortype    curctype;            /* current hardware cursor type */
  107.  
  108.     boolean        retracewait;        /* flag to wait for retrace or not */
  109.  
  110.     unsigned long  fontoffs0;        /* offset of font table for current font */
  111.     unsigned short fontseg0;        /* segment of font table for current font */
  112.     unsigned long  fontoffs1;        /* offset of font table for current font */
  113.     unsigned short fontseg1;        /* segment of font table for current font */
  114.  
  115.     opcoord brmask;                    /* byte rounding mask */
  116.  
  117.     ocolmap_type colmap;            /* Shadow copy of device color map */
  118.  
  119.     VOID *h;                        /* non-display hardware dig data */
  120.     SIZE_T hdatasize;                /* size of hardware data block */
  121. } pcdata_struct;
  122.  
  123. OEXTERN pcdata_struct pcdatastruc;
  124. #define pcdata         (&pcdatastruc)
  125. /* -------------------------------------------------------------------------- */
  126. #define ramcopy_func(fname)            oasm_func(void, fname, (unsigned segm, unsigned segoffs, byte *memaddr, unsigned bwidth))
  127. typedef                        oasm_fptr(void, ramcopy_fptr, (unsigned segm, unsigned segoffs, byte *memaddr, unsigned bwidth));
  128.  
  129. #define ramclear_func(fname)        oasm_func(void, fname, (unsigned segm, unsigned segoffs, unsigned bwidth, unsigned short color))
  130. typedef                      oasm_fptr(void, ramclear_fptr, (unsigned segm, unsigned segoffs, unsigned bwidth, unsigned short color));
  131.  
  132. #define rammove_func(fname)            oasm_func(void, fname, (unsigned segm, unsigned soffs, unsigned doffs, unsigned bwidth))
  133. typedef                        oasm_fptr(void, rammove_fptr, (unsigned segm, unsigned soffs, unsigned doffs, unsigned bwidth));
  134.  
  135. #define ramplanecopy_func(fname)    void DIGPRIV fname(unsigned segm, unsigned segoffs, byte *membuf, unsigned bwidth, unsigned memoffs, unsigned planemask)
  136. typedef              void (DIGPRIV *ramplanecopy_fptr)(unsigned segm, unsigned segoffs, byte *membuf, unsigned bwidth, unsigned memoffs, unsigned planemask);
  137.  
  138. #define pc_setinfo_func(fname)        boolean DIGPRIV fname(int)
  139. typedef                boolean (DIGPRIV *pc_setinfo_fptr)(int);
  140.  
  141. /* -------------------------------------------------------------------------- */
  142. /* PCMCURR.C */
  143. extern dmode_func (pc_ModeCurrent);
  144. extern boolean    DIGPRIV pc_OpenMode(dig_struct *digp, int mode);
  145.  
  146. /* PCMCURRT.C */
  147. extern dmode_func (pc_ModeCurrText);
  148. extern boolean    DIGPRIV pc_OpenModeText(dig_struct *digp, int mode);
  149.  
  150. /* PCMGRAPH.C */
  151. extern dmode_func (pc_ModeGraphics);
  152.  
  153. /* PCBIOS.C */
  154. extern dmode_func (pc_ModeBIOS);
  155. extern dmode_func (pc_ModeBIOS0);
  156. extern dmode_func (pc_ModeBIOS1);
  157. extern dmode_func (pc_ModeBIOS2);
  158. extern dmode_func (pc_ModeBIOS3);
  159. extern dmode_func (pc_ModeBIOSEGA43);
  160. extern dmode_func (pc_ModeBIOSVGA50);
  161. extern dmode_func (pc_ModeBIOS7);
  162.  
  163. /* PCTEXT.C */
  164. extern dmode_func (pc_ModeText);
  165. extern dmode_func (pc_Mode0);
  166. extern dmode_func (pc_Mode1);
  167. extern dmode_func (pc_Mode2);
  168. extern dmode_func (pc_Mode3);
  169. extern dmode_func (pc_ModeEGA43);
  170. extern dmode_func (pc_ModeVGA50);
  171. extern dmode_func (pc_Mode7);
  172.  
  173. extern boolean    DIGPRIV pc_OpenText(dig_struct *digp, int mode);
  174.  
  175. /* PCCGA.C */
  176. extern dmode_func (pc_Mode4);
  177. extern dmode_func (pc_Mode5);
  178. extern dmode_func (pc_Mode6);
  179. extern dmode_func (pc_ModeCpq40);
  180. extern boolean    DIGPRIV pc_OpenCGA(dig_struct *digp, int mode);
  181.  
  182. /* PCEVGA.C */
  183. extern dmode_func (pc_ModeD);
  184. extern dmode_func (pc_ModeE);
  185. extern dmode_func (pc_ModeF);
  186. extern dmode_func (pc_Mode10);
  187. extern dmode_func (pc_Mode11);
  188. extern dmode_func (pc_Mode12);
  189. extern boolean    DIGPRIV pc_OpenEVGA(dig_struct *digp, int mode);
  190.  
  191. /* PCMCGA.C */
  192. extern dmode_func (pc_Mode13);
  193. extern boolean    DIGPRIV pc_OpenMCGA(dig_struct *digp, int mode);
  194.  
  195. /* PCHERC.C */
  196. extern dmode_func (pc_ModeHerc);
  197. extern boolean    DIGPRIV pc_OpenHerc(dig_struct *digp, int mode);
  198.  
  199. /* PCTEXTIN.C */
  200. extern boolean    DIGPRIV text_setinfo(int mode);
  201.  
  202. /* PCBSCROL.C */
  203. extern void        text_bScrollBoxVt(ptd_struct *ptd, opcoord nrows);
  204.  
  205. /* PCOPEN.C */
  206. extern boolean    DIGPRIV pc_OpenDIG(dig_struct *digp, int mode, pc_setinfo_fptr setinfo);
  207. extern dig_CloseDIG_func (pc_CloseDIG);
  208.  
  209. /* PCDISP.C */
  210. extern dig_dControl_func (pc_dControl);
  211. extern unsigned    short DIGPRIV pc_wordcolor(opixval color);
  212. extern void              DIGPRIV pc_bgetcursorpos(int *rowp, int *colp);
  213. extern void              DIGPRIV pc_initmode(void);
  214. extern unsigned          pc_dDummy(void);
  215.  
  216. /* PCPMAP.C */
  217. extern dig_pControl_func (pc_pControl);
  218.  
  219. /* PCPMAPIO.C */
  220. extern dig_pControl_func (pc_PmapIoReq);
  221.  
  222. /* PCGFUNCS.C */
  223. extern void        DIGPRIV pc_setgfuncs(dig_struct *digp);
  224. extern attrcols_func (pc_attrcols);
  225.  
  226. /* PCBDRAWC.C */
  227. extern dig_pDrawCursor_func (pc_bDrawCursor);
  228.  
  229. /* PCBSETCU.C */
  230. extern void        DIGPRIV pc_bsetcursortype(cursortype ctype, unsigned short nlines);
  231. extern void        DIGPRIV pc_bsetcursorpos(int row, int col);
  232.  
  233. /* PCRAMCLE.C */
  234. extern dig_pClear_func (ram_Clear);
  235. extern dig_pScrollBoxVt_func (ram_ScrollBoxVt);
  236. extern dig_pScrollBoxHz_func (ram_ScrollBoxHz);
  237.  
  238. /* PCRAMDRA.C */
  239. extern dig_pDrawPixmap_func (ram_DrawPixmap);
  240. extern dig_pReadPixmap_func (ram_ReadPixmap);
  241.  
  242. /* PCRAMCPP.C */
  243. extern void        DIGPRIV ram_copypm(opbox *scrboxp, pmap_type pmap, opcoord pmx, opcoord pmy, ramcopy_fptr copy, unsigned planemask);
  244.  
  245. /* PCPMAPIO.C - used by pmap_LoadSplash */
  246. extern void        pc_pmhist(pmap_type pmap, unsigned short *histtab);
  247. extern void        pc_pmcswap(pmap_type pmap, byte *swaptab);
  248. extern opixval    pc_pmnearcol(orgb_struct *rgb, ocolmap_type cmap);
  249.  
  250. /* pchcfunc.asm */
  251. extern oasm_func(boolean,herc_present, (void));
  252. extern oasm_func(int,     herc_getlines, (void));
  253. extern oasm_func(void,     herc_setgmode, (int hpage));
  254. extern oasm_func(void,     herc_settmode, (void));
  255.  
  256. /* pc1bitpl.asm */
  257. extern plotchar_func (pc_1bitplotchar);
  258.  
  259. /* pc2bitpl.asm */
  260. extern plotchar_func (pc_2bitplotchar);
  261.  
  262. /* pc8bitpl.asm */
  263. extern plotchar_func (pc_8bitplotchar);
  264.  
  265. /* pcevgapl.asm */
  266. extern plotchar_func (pc_evgaplotchar);
  267.  
  268. /* pchcfont.asm */
  269. OEXTERN unsigned short hercfont_seg;
  270. OEXTERN unsigned long hercfont_offs;    /* Long in case of dos-extender */
  271.  
  272. /* pcrammov.asm */
  273. extern ramcopy_func (ram_segtomem);
  274. extern ramcopy_func (ram_memtoseg);
  275. extern ramclear_func (ram_segwordset);
  276. extern rammove_func (ram_segtoseg);
  277. extern oasm_func(void, ram_mem1toseg, (unsigned segm, unsigned segoffs, byte *memaddr, unsigned byte1, unsigned blen));
  278.  
  279. /* pcramwmo.asm */
  280. extern ramclear_func (ram_wsegwordset);
  281. extern rammove_func (ram_wsegtoseg);
  282. extern oasm_func(void, ram_wmem1toseg, (unsigned segm, unsigned segoffs, byte *memaddr, unsigned byte1, unsigned blen));
  283. /* -------------------------------------------------------------------------- */
  284.  
  285. #define pc_inuse()                    (pcdata->info.devname[0] != '\0')
  286.  
  287. #define pc_attrsize()                (pcdata->attrsize)
  288.  
  289. #define pc_attrfg4bit(attr)            (pcdata->attrmap[attr] & 0x0F)
  290. #define pc_attrbg4bit(attr)            (pcdata->attrmap[attr] >> 4)
  291.  
  292. #define pc_attrfgbyte(attr)            pcdata->attrmap[attr]
  293. #define pc_attrbgbyte(attr)            pcdata->xattrmap[attr]
  294.  
  295. #define pc_initdispmap(wid, hgt)                    \
  296.     (pcdata->dmspace.width = (wid), pcdata->dmspace.height = (hgt))
  297.  
  298. #define pc_roundbyte(boxp)                            \
  299.     ((boxp)->xmin = ((boxp)->xmin + pc_brmask()) & ~pc_brmask(), \
  300.      (boxp)->xmax &= ~pc_brmask(),                    \
  301.     ((boxp)->xmin < (boxp)->xmax))
  302. #define pc_roundbytex(boxp, xp)                        \
  303.     (*(xp) -= (boxp)->xmin,                            \
  304.      pc_roundbyte(boxp) ?                            \
  305.     (*(xp) += (boxp)->xmin, TRUE) : FALSE)
  306. /* -------------------------------------------------------------------------- */
  307. /* DIG - specific pixmap stuff */
  308.  
  309. typedef struct _pcpmapx {
  310.     dispinfo_struct *dispinfo;    /* pointer to dispinfo struct describing */
  311.                                 /* layout of planes, pixbits, etc. */
  312.     odim     bytewidth;            /* number of bytes in a line of pixel map. */
  313.     byte     nshift;            /* number of unused pixels at left of each line */
  314.     byte     comptype;            /* type of compression applied to pixbuf */
  315.                                 /*  to accommodate 3rd party image headers */
  316.     byte    *pixbuf;            /* pointer to pixel map memory buffer. */
  317. } pcpmapx_struct;
  318.  
  319. #define pc_vidseg()                    (pcdata->info.dispaddr)
  320. #define pc_bwidth()                    (pcdata->info.bytewidth)
  321. #define pc_pixbits()                (pcdata->info.pixbits)
  322. #define pc_nplanes()                (pcdata->info.nplanes)
  323. #define pc_ileave()                    (pcdata->info.ileave)
  324. #define pc_ilsize()                    (pcdata->info.ilsize)
  325.  
  326. #define pc_brmask()                    (pcdata->brmask)
  327.  
  328. #define pcpmap_pmapx(pm)            ((pcpmapx_struct *) &(pm)[1])
  329. #define pcpmap_planes(pm)            ((byte **) &pcpmap_pmapx(pm)[1])
  330.  
  331. #define pcpmap_dispinfo(pm)            (pcpmap_pmapx(pm)->dispinfo)
  332. #define pcpmap_nplanes(pm)            (pcpmap_pmapx(pm)->dispinfo->nplanes)
  333. #define pcpmap_pixbits(pm)            (pcpmap_pmapx(pm)->dispinfo->pixbits)
  334. #define pcpmap_bytewidth(pm)         (pcpmap_pmapx(pm)->bytewidth)
  335. #define pcpmap_nshift(pm)             (pcpmap_pmapx(pm)->nshift)
  336. #define pcpmap_comptype(pm)         (pcpmap_pmapx(pm)->comptype)
  337. #define pcpmap_pixbuf(pm)            (pcpmap_pmapx(pm)->pixbuf)
  338.  
  339. #define pcpmap_GetPlaneSize(pmap)                    \
  340.     ((unsigned long)pcpmap_bytewidth(pmap) * (unsigned long)pmap_GetHeight(pmap))
  341.  
  342. #define pcpmap_SetDispinfo(pm, di)    (pcpmap_pmapx(pm)->dispinfo = (di))
  343. #define pcpmap_SetBytewidth(pm, bw)    (pcpmap_pmapx(pm)->bytewidth = (bw))
  344. #define pcpmap_SetNshift(pm, ns)    (pcpmap_pmapx(pm)->nshift = (ns))
  345. #define pcpmap_SetComptype(pm, ct)    (pcpmap_pmapx(pm)->comptype = (ct))
  346. #define pcpmap_SetPixbuf(pm, buf)    (pcpmap_pmapx(pm)->pixbuf = (buf))
  347. #define pc_pmheadersize(nplanes)                        \
  348.     (sizeof(struct pmap_struct) + sizeof(pcpmapx_struct) +        \
  349.     ((((nplanes) <= 1) ? 0 : (nplanes)) * sizeof(byte *)) )
  350.  
  351. #define pc_retrace()                (pcdata->retracewait)
  352. #define pc_setretrace(rw)            (pcdata->retracewait = (rw))
  353. /* -------------------------------------------------------------------------- */
  354. /* Hardware Equipment Flag Values */
  355. #define PCHFLAG_COLO    0x20
  356. #define PCHFLAG_MONO    0x30
  357.  
  358. /* -------------------------------------------------------------------------- */
  359. /* BIOS & DOS interrupt definitions */
  360. /* -------------------------------------------------------------------------- */
  361. #define BIOS_VIDINT            0x10
  362. #define VIDINT_SETVM        0x00
  363. #define VIDINT_SETT            0x01
  364. #define VIDINT_SETC            0x02
  365. #define VIDINT_GETC            0x03
  366. #define    VIDINT_SCRLUP        0x06
  367. #define    VIDINT_SCRLDN        0x07
  368. #define    VIDINT_RDCHAR        0x08
  369. #define    VIDINT_WRTCHAR        0x09
  370. #define VIDINT_GETVM        0x0F
  371. #define VIDINT_CHARGEN        0x11
  372. #define CHARGEN_ROM8X8        0x12
  373. #define VIDINT_ALTSEL        0x12
  374. #define ALTSEL_GETINFO        0x10
  375. #define ALTSEL_NEWPRTSCR    0x20
  376. #define ALTSEL_SETLINES        0x30
  377. #define SETLINES_350        0x01
  378. #define SETLINES_400        0x02
  379. #define VIDINT_MODEINFO        0x1B
  380. #define VIDINT_CPQINFO        0xBF
  381. #define CPQINFO_PLASMABIT    0x10
  382. #define VIDINT_DVSHADOW        0xFE
  383.  
  384. #define BIOS_FONTVEC        0x43
  385. #define BIOS_CGAXFONTVEC    0x1F
  386. #define BIOS_CGAFONTSEG        0xF000
  387. #define BIOS_CGAFONTOFFS    0xFA6E
  388. /* -------------------------------------------------------------------------- */
  389. /* Addresses and counts */
  390.  
  391. #define TEXT_HEIGHT        25
  392. #define TEXT_XHEIGHT    43
  393. #define TEXT_RPAGE         0
  394.  
  395. #define VID_MDAPORT 0x3B4
  396. #define VID_CGAPORT 0x3D4
  397.  
  398. #define VID_CGAADDR        0xB800
  399. #define VID_MONOADDR    0xB000
  400. #define VID_EVGAADDR    0xA000
  401. #define VID_HERC0ADDR    0xB000
  402. #define VID_HERC1ADDR    0xB800
  403.  
  404. #define VID_CGABLOCK    0x2000
  405. #define VID_HERCBLOCK    0x2000
  406. /* -------------------------------------------------------------------------- */
  407. /* Default color palette structure initializations */
  408.  
  409. #ifndef DEFDEFCMAPS
  410.  
  411.     extern ocolmap_struct(2) pcdefmcmap;
  412.     extern ocolmap_struct(16) pcdefcmap;
  413.     extern ocolmap_struct(256) pcdefmcgamap;
  414.  
  415. #else
  416.  
  417. #    define PC_DEF_MCMAPINIT    { 0, 2, {{0x00, 0x00, 0x00}, {0xFF, 0xFF, 0xFF}} }
  418. #    define PC_DEF_CMAPINIT        { 0, 16, {            \
  419.         {0x00,0x00,0x00},{0x00,0x00,0xAB},{0x00,0xAB,0x00},{0x00,0xAB,0xAB},    \
  420.         {0xAB,0x00,0x00},{0xAB,0x00,0xAB},{0xAB,0x57,0x00},{0xAB,0xAB,0xAB},    \
  421.         {0x57,0x57,0x57},{0x57,0x57,0xFF},{0x57,0xFF,0x57},{0x57,0xFF,0xFF},    \
  422.         {0xFF,0x57,0x57},{0xFF,0x57,0xFF},{0xFF,0xFF,0x57},{0xFF,0xFF,0xFF}        \
  423.         }}
  424.  
  425. #    define PC_DEF_MCGAMAPINIT0    { 0, 256, {            \
  426.         {0x00,0x00,0x00},{0x00,0x00,0xAB},{0x00,0xAB,0x00},{0x00,0xAB,0xAB},    \
  427.         {0xAB,0x00,0x00},{0xAB,0x00,0xAB},{0xAB,0x57,0x00},{0xAB,0xAB,0xAB},    \
  428.         {0x57,0x57,0x57},{0x57,0x57,0xFF},{0x57,0xFF,0x57},{0x57,0xFF,0xFF},    \
  429.         {0xFF,0x57,0x57},{0xFF,0x57,0xFF},{0xFF,0xFF,0x57},{0xFF,0xFF,0xFF},    \
  430.         \
  431.         {0x00,0x00,0x00},{0x17,0x17,0x17},{0x23,0x23,0x23},{0x2F,0x2F,0x2F},    \
  432.         {0x3B,0x3B,0x3B},{0x47,0x47,0x47},{0x53,0x53,0x53},{0x63,0x63,0x63},    \
  433.         {0x73,0x73,0x73},{0x83,0x83,0x83},{0x93,0x93,0x93},{0xA3,0xA3,0xA3},    \
  434.         {0xB3,0xB3,0xB3},{0xCB,0xCB,0xCB},{0xE3,0xE3,0xE3},{0xFF,0xFF,0xFF},
  435. #    define PC_DEF_MCGAMAPINIT2                        \
  436.         {0x00,0x00,0xFF},{0x43,0x00,0xFF},{0x7F,0x00,0xFF},{0xBF,0x00,0xFF},    \
  437.         {0xFF,0x00,0xFF},{0xFF,0x00,0xBF},{0xFF,0x00,0x7F},{0xFF,0x00,0x43},    \
  438.         {0xFF,0x00,0x00},{0xFF,0x43,0x00},{0xFF,0x7F,0x00},{0xFF,0xBF,0x00},    \
  439.         {0xFF,0xFF,0x00},{0xBF,0xFF,0x00},{0x7F,0xFF,0x00},{0x43,0xFF,0x00},    \
  440.         \
  441.         {0x00,0xFF,0x00},{0x00,0xFF,0x43},{0x00,0xFF,0x7F},{0x00,0xFF,0xBF},    \
  442.         {0x00,0xFF,0xFF},{0x00,0xBF,0xFF},{0x00,0x7F,0xFF},{0x00,0x43,0xFF},    \
  443.         {0x7F,0x7F,0xFF},{0x9F,0x7F,0xFF},{0xBF,0x7F,0xFF},{0xDF,0x7F,0xFF},    \
  444.         {0xFF,0x7F,0xFF},{0xFF,0x7F,0xDF},{0xFF,0x7F,0xBF},{0xFF,0x7F,0x9F},
  445. #    define PC_DEF_MCGAMAPINIT4                        \
  446.         {0xFF,0x7F,0x7F},{0xFF,0x9F,0x7F},{0xFF,0xBF,0x7F},{0xFF,0xDF,0x7F},    \
  447.         {0xFF,0xFF,0x7F},{0xDF,0xFF,0x7F},{0xBF,0xFF,0x7F},{0x9F,0xFF,0x7F},    \
  448.         {0x7F,0xFF,0x7F},{0x7F,0xFF,0x9F},{0x7F,0xFF,0xBF},{0x7F,0xFF,0xDF},    \
  449.         {0x7F,0xFF,0xFF},{0x7F,0xDF,0xFF},{0x7F,0xBF,0xFF},{0x7F,0x9F,0xFF},    \
  450.         \
  451.         {0xB3,0xB3,0xFF},{0xC7,0xB3,0xFF},{0xDB,0xB3,0xFF},{0xEB,0xB3,0xFF},    \
  452.         {0xFF,0xB3,0xFF},{0xFF,0xB3,0xEB},{0xFF,0xB3,0xDB},{0xFF,0xB3,0xC7},    \
  453.         {0xFF,0xB3,0xB3},{0xFF,0xC7,0xB3},{0xFF,0xDB,0xB3},{0xFF,0xEB,0xB3},    \
  454.         {0xFF,0xFF,0xB3},{0xEB,0xFF,0xB3},{0xDB,0xFF,0xB3},{0xC7,0xFF,0xB3},
  455. #    define PC_DEF_MCGAMAPINIT6                        \
  456.         {0xB3,0xFF,0xB3},{0xB3,0xFF,0xC7},{0xB3,0xFF,0xDB},{0xB3,0xFF,0xEB},    \
  457.         {0xB3,0xFF,0xFF},{0xB3,0xEB,0xFF},{0xB3,0xDB,0xFF},{0xB3,0xC7,0xFF},    \
  458.         {0x00,0x00,0x73},{0x1F,0x00,0x73},{0x3B,0x00,0x73},{0x57,0x00,0x73},    \
  459.         {0x73,0x00,0x73},{0x73,0x00,0x57},{0x73,0x00,0x3B},{0x73,0x00,0x1F},    \
  460.         \
  461.         {0x73,0x00,0x00},{0x73,0x1F,0x00},{0x73,0x3B,0x00},{0x73,0x57,0x00},    \
  462.         {0x73,0x73,0x00},{0x57,0x73,0x00},{0x3B,0x73,0x00},{0x1F,0x73,0x00},    \
  463.         {0x00,0x73,0x00},{0x00,0x73,0x1F},{0x00,0x73,0x3B},{0x00,0x73,0x57},    \
  464.         {0x00,0x73,0x73},{0x00,0x57,0x73},{0x00,0x3B,0x73},{0x00,0x1F,0x73},
  465. #    define PC_DEF_MCGAMAPINIT8                        \
  466.         {0x3B,0x3B,0x73},{0x47,0x3B,0x73},{0x57,0x3B,0x73},{0x63,0x3B,0x73},    \
  467.         {0x73,0x3B,0x73},{0x73,0x3B,0x63},{0x73,0x3B,0x57},{0x73,0x3B,0x47},    \
  468.         {0x73,0x3B,0x3B},{0x73,0x47,0x3B},{0x73,0x57,0x3B},{0x73,0x63,0x3B},    \
  469.         {0x73,0x73,0x3B},{0x63,0x73,0x3B},{0x57,0x73,0x3B},{0x47,0x73,0x3B},    \
  470.         \
  471.         {0x3B,0x73,0x3B},{0x3B,0x73,0x47},{0x3B,0x73,0x57},{0x3B,0x73,0x63},    \
  472.         {0x3B,0x73,0x73},{0x3B,0x63,0x73},{0x3B,0x57,0x73},{0x3B,0x47,0x73},    \
  473.         {0x53,0x53,0x73},{0x5B,0x53,0x73},{0x63,0x53,0x73},{0x6B,0x53,0x73},    \
  474.         {0x73,0x53,0x73},{0x73,0x53,0x6B},{0x73,0x53,0x63},{0x73,0x53,0x5B},
  475. #    define PC_DEF_MCGAMAPINITA                        \
  476.         {0x73,0x53,0x53},{0x73,0x5B,0x53},{0x73,0x63,0x53},{0x73,0x6B,0x53},    \
  477.         {0x73,0x73,0x53},{0x6B,0x73,0x53},{0x63,0x73,0x53},{0x5B,0x73,0x53},    \
  478.         {0x53,0x73,0x53},{0x53,0x73,0x5B},{0x53,0x73,0x63},{0x53,0x73,0x6B},    \
  479.         {0x53,0x73,0x73},{0x53,0x6B,0x73},{0x53,0x63,0x73},{0x53,0x5B,0x73},    \
  480.         \
  481.         {0x00,0x00,0x43},{0x13,0x00,0x43},{0x23,0x00,0x43},{0x33,0x00,0x43},    \
  482.         {0x43,0x00,0x43},{0x43,0x00,0x33},{0x43,0x00,0x23},{0x43,0x00,0x13},    \
  483.         {0x43,0x00,0x00},{0x43,0x13,0x00},{0x43,0x23,0x00},{0x43,0x33,0x00},    \
  484.         {0x43,0x43,0x00},{0x33,0x43,0x00},{0x23,0x43,0x00},{0x13,0x43,0x00},
  485. #    define PC_DEF_MCGAMAPINITC                        \
  486.         {0x00,0x43,0x00},{0x00,0x43,0x13},{0x00,0x43,0x23},{0x00,0x43,0x33},    \
  487.         {0x00,0x43,0x43},{0x00,0x33,0x43},{0x00,0x23,0x43},{0x00,0x13,0x43},    \
  488.         {0x23,0x23,0x43},{0x2B,0x23,0x43},{0x33,0x23,0x43},{0x3B,0x23,0x43},    \
  489.         {0x43,0x23,0x43},{0x43,0x23,0x3B},{0x43,0x23,0x33},{0x43,0x23,0x2B},    \
  490.         \
  491.         {0x43,0x23,0x23},{0x43,0x2B,0x23},{0x43,0x33,0x23},{0x43,0x3B,0x23},    \
  492.         {0x43,0x43,0x23},{0x3B,0x43,0x23},{0x33,0x43,0x23},{0x2B,0x43,0x23},    \
  493.         {0x23,0x43,0x23},{0x23,0x43,0x2B},{0x23,0x43,0x33},{0x23,0x43,0x3B},    \
  494.         {0x23,0x43,0x43},{0x23,0x3B,0x43},{0x23,0x33,0x43},{0x23,0x2B,0x43},
  495. #    define PC_DEF_MCGAMAPINITE                        \
  496.         {0x2F,0x2F,0x43},{0x33,0x2F,0x43},{0x37,0x2F,0x43},{0x3F,0x2F,0x43},    \
  497.         {0x43,0x2F,0x43},{0x43,0x2F,0x3F},{0x43,0x2F,0x37},{0x43,0x2F,0x33},    \
  498.         {0x43,0x2F,0x2F},{0x43,0x33,0x2F},{0x43,0x37,0x2F},{0x43,0x3F,0x2F},    \
  499.         {0x43,0x43,0x2F},{0x3F,0x43,0x2F},{0x37,0x43,0x2F},{0x33,0x43,0x2F},    \
  500.         \
  501.         {0x2F,0x43,0x2F},{0x2F,0x43,0x33},{0x2F,0x43,0x37},{0x2F,0x43,0x3F},    \
  502.         {0x2F,0x43,0x43},{0x2F,0x3F,0x43},{0x2F,0x37,0x43},{0x2F,0x33,0x43},    \
  503.         {0x3F,0x3F,0x3F},{0x3F,0x3F,0x3F},{0x3F,0x3F,0x3F},{0x3F,0x3F,0x3F},    \
  504.         {0x3F,0x3F,0x3F},{0x3F,0x3F,0x3F},{0x3F,0x3F,0x3F},{0x7F,0x7F,0x7F}        \
  505.         }}
  506. #endif
  507. /* -------------------------------------------------------------------------- */
  508.  
  509.