]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * The contents of this file constitute Original Code as defined in and | |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
11 | * | |
12 | * This Original Code and all software distributed under the License are | |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | #include <driverkit/ppc/IOMacOSTypes.h> | |
23 | #include "IOMacOSVideo.h" | |
24 | #include <stdlib.h> | |
25 | ||
26 | struct TimingToEDID { | |
27 | UInt32 timingID; | |
28 | UInt8 spare; | |
29 | UInt8 establishedBit; | |
30 | UInt16 standardTiming; | |
31 | }; | |
32 | typedef struct TimingToEDID TimingToEDID; | |
33 | ||
34 | #define MAKESTD(h,a,r) ( (((h/8)-31)<<8) | (a<<6) | (r-60) ) | |
35 | ||
36 | static const TimingToEDID timingToEDID[] = { | |
37 | { timingApple_512x384_60hz, 0, 0xff, MAKESTD( 512,1,60) }, | |
38 | { timingApple_640x480_67hz, 0, 0x04, MAKESTD( 640,1,67) }, | |
39 | { timingVESA_640x480_60hz, 0, 0x05, MAKESTD( 640,1,60) }, | |
40 | { timingVESA_640x480_72hz , 0, 0x03, MAKESTD( 640,1,72) }, | |
41 | { timingVESA_640x480_75hz, 0, 0x02, MAKESTD( 640,1,75) }, | |
42 | { timingVESA_640x480_85hz, 0, 0xff, MAKESTD( 640,1,85) }, | |
43 | { timingApple_832x624_75hz, 0, 0x0d, MAKESTD( 832,1,75) }, | |
44 | { timingVESA_800x600_56hz, 0, 0x01, MAKESTD( 800,1,56) }, | |
45 | { timingVESA_800x600_60hz, 0, 0x00, MAKESTD( 800,1,60) }, | |
46 | { timingVESA_800x600_72hz, 0, 0x0f, MAKESTD( 800,1,72) }, | |
47 | { timingVESA_800x600_75hz, 0, 0x0e, MAKESTD( 800,1,75) }, | |
48 | { timingVESA_800x600_85hz, 0, 0xff, MAKESTD( 800,1,85) }, | |
49 | { timingVESA_1024x768_60hz, 0, 0x0b, MAKESTD( 1024,1,60) }, | |
50 | { timingVESA_1024x768_70hz, 0, 0x0a, MAKESTD( 1024,1,70) }, | |
51 | { timingVESA_1024x768_75hz, 0, 0x09, MAKESTD( 1024,1,75) }, | |
52 | { timingVESA_1024x768_85hz, 0, 0xff, MAKESTD( 1024,1,85) }, | |
53 | { timingApple_1024x768_75hz, 0, 0x09, MAKESTD( 1024,1,75) }, | |
54 | { timingApple_1152x870_75hz, 0, 0x17, MAKESTD( 0000,0,00) }, | |
55 | { timingVESA_1280x960_75hz, 0, 0xff, MAKESTD( 1280,1,75) }, | |
56 | { timingVESA_1280x1024_60hz, 0, 0xff, MAKESTD( 1280,2,60) }, | |
57 | { timingVESA_1280x1024_75hz, 0, 0x08, MAKESTD( 1280,2,75) }, | |
58 | { timingVESA_1280x1024_85hz, 0, 0xff, MAKESTD( 1280,2,85) }, | |
59 | { timingVESA_1600x1200_60hz, 0, 0xff, MAKESTD( 1600,1,60) }, | |
60 | { timingVESA_1600x1200_65hz, 0, 0xff, MAKESTD( 1600,1,65) }, | |
61 | { timingVESA_1600x1200_70hz, 0, 0xff, MAKESTD( 1600,1,70) }, | |
62 | { timingVESA_1600x1200_75hz, 0, 0xff, MAKESTD( 1600,1,75) }, | |
63 | { timingVESA_1600x1200_80hz, 0, 0xff, MAKESTD( 1600,1,80) } | |
64 | }; | |
65 | ||
66 | ||
67 | void main( void ) | |
68 | { | |
69 | const TimingToEDID * lookTiming; | |
70 | ||
71 | lookTiming = timingToEDID; | |
72 | while( lookTiming < (timingToEDID + sizeof( timingToEDID) / sizeof( TimingToEDID))) { | |
73 | ||
74 | printf("%d 0x%x ", lookTiming->timingID, | |
75 | *((unsigned int *)&lookTiming->spare) ); | |
76 | lookTiming++; | |
77 | } | |
78 | printf("\n"); | |
79 | } | |
80 |