home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) 1992, 1993 NeXT Computer, Inc. All rights reserved.
- *
- * ATIModes.c - Mode definitions for the ATi display driver.
- *
- * HISTORY
- * 07 Oct 92 Joe Pasqua
- * Created.
- * 01 June 93 Mike Paquette
- * Rewrite: Convert from Corsair device driver to general MACH32 chipset
- * driver. Add support for multiple DACs and CRT setups.
- * Add 8 bit monochrome support. Add support for non-Cosair
- * implementations.
- * 7 July 1993 Derek B Clegg
- * Cleaned up for external release.
- */
- #import "ATIModes.h"
-
- const ATI_DACSetup ATI_DAC_Setup_15BPP = {
- 0, 1, 0x0d, 0x402A, 0x00, 0x03, 0xA0, IO_15BitsPerPixel
- };
-
- const ATI_DACSetup ATI_DAC_Setup_8BPP = {
- 0, 0x30, 0x2d, 0x401A, 0xFF, 0x03, 0x00, IO_8BitsPerPixel
- };
-
- /* 800 x 600, 60Hz, noninterlaced for slow/double clocked DACS (Bt481,ATT491)
- * Note that this programs an 80 MHz dot clock, the current maximum. */
- static const ATI_CRTCSetup ATI_crt_800_60_SlowDAC = {
- 800, 600, 0x83, 0x63, 0x68, 0x10, 0x4E3, 0x4ab, 0x4B0, 0x04, 0x23,
- 0x062C, 0,
- };
-
- /* 800 x 600, 72Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_800_72 = {
- 800, 600, 0x82, 0x63, 0x6A, 0x0F, 0x537, 0x4ab, 0x4F8, 0x06, 0x23,
- 0x0610, 0,
- };
-
- /* 800 x 600, 60Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_800_60 = {
- 800, 600, 0x83, 0x63, 0x68, 0x10, 0x4E3, 0x4ab, 0x4B0, 0x04, 0x23,
- 0x0630, 0,
- };
-
- /* 1024 x 768, 76Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_1024_76 = {
- 1024, 768, 0xa2, 0x7f, 0x87, 0x0B, 0x64A, 0x5ff, 0x60B, 0x04, 0x23,
- 0x062c, 0,
- };
-
- /* 1024 x 768, 72Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_1024_72 = {
- 1024, 768, 0xa1, 0x7f, 0x82, 0x10, 0x649, 0x5ff, 0x602, 0x26, 0x23,
- 0x0638, 0,
- };
-
- /* 1024 x 768, 60Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_1024_60 = {
- 1024, 768, 0xa7, 0x7f, 0x85, 0x08, 0x63B, 0x5ff, 0x600, 0x04, 0x23,
- 0x063C, 0,
- };
-
- /* 1120 x 832, 60Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_1120_60 = {
- 1120, 832, 0xAB, 0x8B, 0x91, 0x0C, 0x6E8, 0x67F, 0x685, 0x0C, 0x23,
- 0x0638, 0,
- };
-
- /* 1120 x 832, 68Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_1120_68 = {
- 1120, 832, 0xAB, 0x8B, 0x91, 0x0C, 0x6C8, 0x67F, 0x681, 0x06, 0x23,
- 0x062C, 0,
- };
-
- /* 1280 x 1024, 60Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_1280_60 = {
- 1280, 1024, 0xD6, 0x9f, 0xA9, 0x2E, 0x852, 0x7ff, 0x800, 0x25, 0x23,
- 0x0628, 1,
- };
-
- #if 0
-
- /* These values are provided for reference only. Current DACs exhibit
- * instability when driven at these high rates. */
-
- /* 1280 x 1024, 74Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_1280_74 = {
- 1280, 1024, 0xD5, 0x9f, 0xA3, 0x12, 0x84B, 0x7ff, 0x7FF, 0x05, 0x23,
- 0x0620, 1,
- };
-
- /* 1280 x 1024, 70Hz, noninterlaced. */
- static const ATI_CRTCSetup ATI_crt_1280_70 = {
- 1280, 1024, 0xD2, 0x9f, 0xA9, 0x0E, 0x851, 0x7ff, 0x800, 0x05, 0x23,
- 0x0604, 1,
- };
-
- #endif
-
- const IODisplayInfo ATIMode[] = {
- { 800, 600, 800, 1600, 72, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
- "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_800_72 },
- { 800, 600, 800, 1600, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
- "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_800_60 },
- { 1024, 768, 1024, 2048, 76, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
- "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1024_76 },
- { 1024, 768, 1024, 2048, 72, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
- "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1024_72 },
- { 1024, 768, 1024, 2048, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
- "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1024_60 },
- { 1120, 832, 1120, 2240, 68, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
- "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1120_68 },
- { 1120, 832, 1120, 2240, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
- "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1120_60 },
- { 800, 600, 800, 800, 72, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_800_72 },
- { 800, 600, 800, 800, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_800_60 },
- { 1024, 768, 1024, 1024, 76, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1024_76 },
- { 1024, 768, 1024, 1024, 72, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1024_72 },
- { 1024, 768, 1024, 1024, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1024_60 },
- { 1120, 832, 1120, 1120, 68, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1120_68 },
- { 1120, 832, 1120, 1120, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1120_60 },
- { 1280, 1024, 1280, 1280, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1280_60 },
- { 800, 600, 800, 800, 72, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_800_72 },
- { 800, 600, 800, 800, 60, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_800_60 },
- { 1024, 768, 1024, 1024, 76, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1024_76 },
- { 1024, 768, 1024, 1024, 72, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1024_72 },
- { 1024, 768, 1024, 1024, 60, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1024_60 },
- { 1120, 832, 1120, 1120, 68, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1120_68 },
- { 1120, 832, 1120, 1120, 60, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1120_60 },
- { 1280, 1024, 1280, 1280, 60, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1280_60 },
- };
-
- const int ATIModeCount = (sizeof(ATIMode)/sizeof(ATIMode[0]));
-
- const IODisplayInfo ATISlowDACMode[] = {
- { 800, 600, 800, 1600, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
- "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_800_60_SlowDAC },
- { 800, 600, 800, 800, 72, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_800_72 },
- { 800, 600, 800, 800, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_800_60 },
- { 1024, 768, 1024, 1024, 76, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1024_76 },
- { 1024, 768, 1024, 1024, 72, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1024_72 },
- { 1024, 768, 1024, 1024, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
- "WWWWWWWW", 0, (void *)&ATI_crt_1024_60 },
- { 800, 600, 800, 800, 72, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_800_72 },
- { 800, 600, 800, 800, 60, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_800_60 },
- { 1024, 768, 1024, 1024, 76, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1024_76 },
- { 1024, 768, 1024, 1024, 72, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1024_72 },
- { 1024, 768, 1024, 1024, 60, 0, IO_8BitsPerPixel, IO_RGBColorSpace,
- "PPPPPPPP", 0, (void *)&ATI_crt_1024_60 },
- };
-
- const int ATISlowDACModeCount =
- (sizeof(ATISlowDACMode)/sizeof(ATISlowDACMode[0]));
-