/******************************************************************************
 * glob.c - Chapter 6 sample code                                             *
 *                                                                            *
 * To be used with mach64 sample code.                                        *
 * This Module contains all the global variable declarations.                 *
 *                                                                            *
 * Copyright (c) 1994-1997 ATI Technologies Inc.  All rights reserved.        *
 ******************************************************************************/

#include "main.h"

// Global variables.

unsigned int IO_REGISTER[64] =
{
    0x02EC, // MM index 00: CRTC_H_TOTAL_DISP
    0x06EC, // MM index 01: CRTC_H_SYNC_STRT_WID
    0x0AEC, // MM index 02: CRTC_V_TOTAL_DISP
    0x0EEC, // MM index 03: CRTC_V_SYNC_STRT_WID
    0x12EC, // MM index 04: CRTC_VLINE_CRNT_VLINE
    0x16EC, // MM index 05: CRTC_OFF_PITCH
    0x1AEC, // MM index 06: CRTC_INT_CNTL
    0x1EEC, // MM index 07: CRTC_GEN_CNTL
    0,      // MM index 08: <unused>
    0,      // MM index 09: <unused>
    0,      // MM index 0A: <unused>
    0,      // MM index 0B: <unused>
    0,      // MM index 0C: <unused>
    0,      // MM index 0D: <unused>
    0,      // MM index 0E: <unused>
    0,      // MM index 0F: <unused>
    0x22EC, // MM index 10: OVR_CLR
    0x26EC, // MM index 11: OVR_WID_LEFT_RIGHT
    0x2AEC, // MM index 12: OVR_WID_TOP_BOTTOM
    0,      // MM index 13: <unused>
    0,      // MM index 14: <unused>
    0,      // MM index 15: <unused>
    0,      // MM index 16: <unused>
    0,      // MM index 17: <unused>
    0x2EEC, // MM index 18: CUR_CLR0
    0x32EC, // MM index 19: CUR_CLR1
    0x36EC, // MM index 1A: CUR_OFFSET
    0x3AEC, // MM index 1B: CUR_HORZ_VERT_POSN
    0x3EEC, // MM index 1C: CUR_HORZ_VERT_OFF
    0,      // MM index 1D: <unused>
    0x7AEC, // MM index 1E: GP_IO (only available on mach64VT)
    0,      // MM index 1F: GP_IO_CNTL (only available on mach64VT)
    0x42EC, // MM index 20: SCRATCH_REG0
    0x46EC, // MM index 21: SCRATCH_REG1
    0,      // MM index 22: <unused>
    0,      // MM index 23: <unused>
    0x4AEC, // MM index 24: CLOCK_SEL_CNTL
    0,      // MM index 25: <unused>
    0,      // MM index 26: <unused>
    0,      // MM index 27: <unused>
    0x4EEC, // MM index 28: BUS_CNTL
    0,      // MM index 29: <unused>
    0,      // MM index 2A: <unused>
    0,      // MM index 2B: <unused>
    0x52EC, // MM index 2C: MEM_CNTL
    0x56EC, // MM index 2D: MEM_VGA_WP_SEL
    0x5AEC, // MM index 2E: MEM_VGA_RP_SEL
    0,      // MM index 2F: <unused>
    0x5EEC, // MM index 30: DAC_REGS
    0x62EC, // MM index 31: DAC_CNTL
    0,      // MM index 32: <unused>
    0,      // MM index 33: <unused>
    0x66EC, // MM index 34: GEN_TEST_CNTL
    0,      // MM index 35: <unused>
    0,      // MM index 36: <unused>
    0x6AEC, // MM index 37: CONFIG_CNTL
    0x6EEC, // MM index 38: CONFIG_CHIP_ID
    0x72EC, // MM index 39: CONFIG_STAT0
    0x76EC, // MM index 3A: CONFIG_STAT1
    0,      // MM index 3B: <unused>
    0,      // MM index 3C: <unused>
    0,      // MM index 3D: <unused>
    0,      // MM index 3E: <unused>
    0       // MM index 3F: <unused>
};
modecfg MODE_INFO = {0};
query_structure QUERY_DATA = {0};
io_query IO_DATA = {0};
int OLD_MODE = 0;
int GMODE_RES = 640;
int GCLR_DEPTH = 8;
palette SAVEPALETTE[256] = {0};
hwcursor CURSORDATA = {0};
