/*DDK*************************************************************************/
/*                                                                           */
/* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
/*                                                                           */
/*    The following IBM OS/2 WARP source code is provided to you solely for  */
/*    the purpose of assisting you in your development of OS/2 WARP device   */
/*    drivers. You may use this code in accordance with the IBM License      */
/*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
/*    Copyright statement may not be removed.                                */
/*                                                                           */
/*****************************************************************************/


#define INCL_DOS
#define INCL_GPIBITMAPS
#include <os2.h>
#undef INCL_DOS

#include <xgaadapt.h>
#include <edd0type.h>
#include <edderre.h>
#include <edd0extf.h>

#define INDEXED_REG  0x01

#define NUMOFINSTANCE 1

BYTE   PreModeData[] =
{
    0x18,		      // 24 bytes of mode data
    0	       , 0x04, 0x00,  // disable all interrupts
    0	       , 0x05, 0xFF,  // reset all interrupts
    0	       , 0x00, 0x04,  // set extended graphics mode
    INDEXED_REG, 0x64, 0x00,  // palette mask - blank display
    0	       , 0x01, 0x00,  // no 64k video memory aperture
    0	       , 0x08, 0x00,  // video memory aperture index
    0	       , 0x06, 0x00,  // virtual memory control
    0	       , 0x09, 0x03   // memory access - 8bpp Intel (MUST be last
			      // because code modifies it).
};


BYTE   PostModeData[] =
{
    0x18,		      // 24 bytes of mode data
    INDEXED_REG, 0x36, 0x00,  // sprite control
    INDEXED_REG, 0x40, 0x00,  // start address low
    INDEXED_REG, 0x41, 0x00,  // start address medium
    INDEXED_REG, 0x42, 0x00,  // start address high
    INDEXED_REG, 0x43, 0x50,  // buffer pitch low (640 bytes)		  !!
    INDEXED_REG, 0x44, 0x00,  // buffer pitch high			  !!
    INDEXED_REG, 0x51, 0x03,  // display mode 2 - 8bpp (magnify 1 x 1)	  !!
    INDEXED_REG, 0x55, 0x00   // border color
			      // (Note that values marked by !! are modified
			      // depending on the bits per pel and screen width
			      // and their positions within the table are hard
			      // coded relative to the end of the table.)
};



