home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / Videotoolbox 96-08-22-c.sit / VideoToolbox / (Demos) / TestGDVideo.c < prev    next >
MacBinary  |  1996-03-05  |  17.3 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: TestGDVideo.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Mar 5 02:02:23 1996, modified Tue Mar 5 02:02:23 1996, creator 'CWIE', type ASCII, 16724 bytes "TestGDVideo.c" , at 0x41d4 654 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 54 65 73 74 47 44 | 56 69 64 65 6f 2e 63 00 |..TestGD|Video.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 41 54 00 | 00 02 8e ad 61 97 7f ad |.....AT.|....a...|
|00000060| 61 97 7f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |a.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 db 0d 00 00 |........|........|
|00000080| 2f 2a 20 0d 54 65 73 74 | 47 44 56 69 64 65 6f 2e |/* .Test|GDVideo.|
|00000090| 63 20 62 79 20 44 65 6e | 69 73 20 47 2e 20 50 65 |c by Den|is G. Pe|
|000000a0| 6c 6c 69 0d 54 65 73 74 | 73 20 61 6c 6c 20 74 68 |lli.Test|s all th|
|000000b0| 65 20 64 6f 63 75 6d 65 | 6e 74 65 64 20 43 6f 6e |e docume|nted Con|
|000000c0| 74 72 6f 6c 20 61 6e 64 | 20 53 74 61 74 75 73 20 |trol and| Status |
|000000d0| 63 61 6c 6c 73 20 69 6d | 70 6c 65 6d 65 6e 74 65 |calls im|plemente|
|000000e0| 64 20 69 6e 20 47 44 56 | 69 64 65 6f 2e 63 0d 54 |d in GDV|ideo.c.T|
|000000f0| 68 65 20 63 61 6c 6c 73 | 20 61 72 65 20 64 6f 63 |he calls| are doc|
|00000100| 75 6d 65 6e 74 65 64 20 | 69 6e 20 44 65 73 69 67 |umented |in Desig|
|00000110| 6e 69 6e 67 20 43 61 72 | 64 73 20 61 6e 64 20 44 |ning Car|ds and D|
|00000120| 72 69 76 65 72 73 2c 20 | 33 72 64 20 45 64 69 74 |rivers, |3rd Edit|
|00000130| 69 6f 6e 2e 0d 0d 54 68 | 65 20 6d 61 69 6e 20 70 |ion...Th|e main p|
|00000140| 75 72 70 6f 73 65 20 6f | 66 20 74 68 69 73 20 70 |urpose o|f this p|
|00000150| 72 6f 67 72 61 6d 20 69 | 73 20 74 6f 20 66 69 6e |rogram i|s to fin|
|00000160| 64 20 62 75 67 73 20 69 | 6e 20 76 69 64 65 6f 20 |d bugs i|n video |
|00000170| 64 72 69 76 65 72 73 2e | 20 49 66 20 79 6f 75 20 |drivers.| If you |
|00000180| 64 6f 0d 66 69 6e 64 20 | 61 20 62 75 67 20 74 68 |do.find |a bug th|
|00000190| 61 74 20 69 73 6e 27 74 | 20 61 6c 72 65 61 64 79 |at isn't| already|
|000001a0| 20 6c 69 73 74 65 64 20 | 69 6e 20 74 68 65 20 74 | listed |in the t|
|000001b0| 61 62 6c 65 20 61 74 20 | 74 68 65 20 65 6e 64 20 |able at |the end |
|000001c0| 6f 66 20 d2 56 69 64 65 | 6f 20 73 79 6e 63 68 d3 |of .Vide|o synch.|
|000001d0| 0d 74 68 65 6e 20 70 6c | 65 61 73 65 20 73 65 6e |.then pl|ease sen|
|000001e0| 64 20 69 74 20 74 6f 20 | 64 65 6e 69 73 40 78 70 |d it to |denis@xp|
|000001f0| 2e 70 73 79 63 68 2e 6e | 79 75 2e 65 64 75 20 0d |.psych.n|yu.edu .|
|00000200| 0d 55 6e 66 6f 72 74 75 | 6e 61 74 65 6c 79 2c 20 |.Unfortu|nately, |
|00000210| 74 68 65 20 6d 6f 73 74 | 20 63 6f 6d 6d 6f 6e 20 |the most| common |
|00000220| 77 61 79 20 74 6f 20 64 | 69 73 63 6f 76 65 72 20 |way to d|iscover |
|00000230| 61 20 6e 65 77 20 62 75 | 67 20 69 73 20 66 6f 72 |a new bu|g is for|
|00000240| 20 74 68 69 73 20 70 72 | 6f 67 72 61 6d 20 74 6f | this pr|ogram to|
|00000250| 0d 63 72 61 73 68 2e 20 | 50 6c 65 61 73 65 20 72 |.crash. |Please r|
|00000260| 65 70 6f 72 74 20 63 72 | 61 73 68 65 73 20 74 6f |eport cr|ashes to|
|00000270| 20 64 65 6e 69 73 40 78 | 70 2e 70 73 79 63 68 2e | denis@x|p.psych.|
|00000280| 6e 79 75 2e 65 64 75 0d | 0d 42 55 47 53 3a 0d 0d |nyu.edu.|.BUGS:..|
|00000290| 48 49 53 54 4f 52 59 3a | 0d 38 2f 31 31 2f 38 39 |HISTORY:|.8/11/89|
|000002a0| 09 64 67 70 09 77 72 6f | 74 65 20 69 74 0d 33 2f |.dgp.wro|te it.3/|
|000002b0| 32 33 2f 39 30 09 64 67 | 70 09 69 6e 74 72 6f 64 |23/90.dg|p.introd|
|000002c0| 75 63 65 64 20 73 70 65 | 63 69 61 6c 20 63 61 73 |uced spe|cial cas|
|000002d0| 65 20 63 6f 6e 64 69 74 | 69 6f 6e 61 6c 73 20 74 |e condit|ionals t|
|000002e0| 6f 20 73 6b 69 70 20 74 | 65 73 74 73 20 6b 6e 6f |o skip t|ests kno|
|000002f0| 77 6e 20 74 6f 20 63 72 | 61 73 68 0d 09 09 09 70 |wn to cr|ash....p|
|00000300| 61 72 74 69 63 75 6c 61 | 72 20 64 72 69 76 65 72 |articula|r driver|
|00000310| 73 2e 0d 33 2f 32 33 2f | 39 30 09 64 67 70 09 6d |s..3/23/|90.dgp.m|
|00000320| 61 64 65 20 69 74 20 63 | 6f 6d 70 61 74 69 62 6c |ade it c|ompatibl|
|00000330| 65 20 77 69 74 68 20 4d | 50 57 20 43 2c 20 61 73 |e with M|PW C, as|
|00000340| 20 61 20 74 6f 6f 6c 2e | 0d 33 2f 32 34 2f 39 30 | a tool.|.3/24/90|
|00000350| 09 64 67 70 09 6d 61 64 | 65 20 73 6f 6d 65 20 6f |.dgp.mad|e some o|
|00000360| 66 20 74 68 65 20 70 72 | 69 6e 74 6f 75 74 73 20 |f the pr|intouts |
|00000370| 6c 65 73 73 20 63 72 79 | 70 74 69 63 2e 0d 33 2f |less cry|ptic..3/|
|00000380| 33 31 2f 39 30 09 64 67 | 70 09 69 6e 74 72 6f 64 |31/90.dg|p.introd|
|00000390| 75 63 65 64 20 52 65 73 | 74 6f 72 65 44 65 76 69 |uced Res|toreDevi|
|000003a0| 63 65 43 6c 75 74 20 61 | 66 74 65 72 20 53 65 74 |ceClut a|fter Set|
|000003b0| 4d 6f 64 65 20 63 61 6c | 6c 2e 0d 37 2f 31 32 2f |Mode cal|l..7/12/|
|000003c0| 39 30 09 64 67 70 09 74 | 69 64 69 65 64 20 75 70 |90.dgp.t|idied up|
|000003d0| 20 74 68 65 20 69 6e 69 | 74 69 61 6c 20 70 72 69 | the ini|tial pri|
|000003e0| 6e 74 66 0d 37 2f 31 39 | 2f 39 30 09 64 67 70 09 |ntf.7/19|/90.dgp.|
|000003f0| 52 65 6e 61 6d 65 64 20 | 56 69 64 65 6f 54 65 73 |Renamed |VideoTes|
|00000400| 74 2e 63 20 0d 09 09 09 | 4f 70 65 6e 20 26 20 63 |t.c ....|Open & c|
|00000410| 6c 6f 73 65 20 61 20 77 | 69 6e 64 6f 77 20 6f 6e |lose a w|indow on|
|00000420| 20 65 61 63 68 20 73 63 | 72 65 65 6e 20 61 6e 64 | each sc|reen and|
|00000430| 20 44 72 61 77 4d 65 6e | 75 42 61 72 28 29 0d 09 | DrawMen|uBar()..|
|00000440| 09 09 73 6f 20 74 68 61 | 74 20 51 75 69 63 6b 44 |..so tha|t QuickD|
|00000450| 72 61 77 20 77 69 6c 6c | 20 72 65 73 74 6f 72 65 |raw will| restore|
|00000460| 20 65 61 63 68 20 73 63 | 72 65 65 6e 2e 0d 37 2f | each sc|reen..7/|
|00000470| 32 38 2f 39 30 09 64 67 | 70 09 69 74 61 6c 69 63 |28/90.dg|p.italic|
|00000480| 69 7a 65 64 20 6e 61 6d | 65 20 6f 66 20 62 6f 6f |ized nam|e of boo|
|00000490| 6b 2e 0d 39 2f 39 2f 39 | 30 09 64 67 70 09 41 64 |k..9/9/9|0.dgp.Ad|
|000004a0| 64 65 64 20 71 75 69 74 | 20 62 79 20 43 6f 6d 6d |ded quit| by Comm|
|000004b0| 61 6e 64 2d 2e 20 66 6f | 72 20 67 72 61 63 65 66 |and-. fo|r gracef|
|000004c0| 75 6c 20 65 78 69 74 20 | 66 72 6f 6d 20 62 61 64 |ul exit |from bad|
|000004d0| 20 73 69 74 75 61 74 69 | 6f 6e 73 2e 0d 31 30 2f | situati|ons..10/|
|000004e0| 31 37 2f 39 30 20 64 67 | 70 20 52 65 6d 6f 76 65 |17/90 dg|p Remove|
|000004f0| 64 20 75 6e 75 73 65 64 | 20 76 61 72 69 61 62 6c |d unused| variabl|
|00000500| 65 73 2e 20 52 65 70 6c | 61 63 65 64 20 54 52 55 |es. Repl|aced TRU|
|00000510| 45 20 26 20 46 41 4c 53 | 45 20 62 79 20 31 20 26 |E & FALS|E by 1 &|
|00000520| 20 30 2e 0d 31 30 2f 32 | 30 2f 39 30 09 64 67 70 | 0..10/2|0/90.dgp|
|00000530| 09 41 70 70 6c 65 20 68 | 61 73 20 72 65 6e 61 6d |.Apple h|as renam|
|00000540| 65 64 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 20 61 |ed the c|ontrol a|
|00000550| 6e 64 20 73 74 61 74 75 | 73 20 63 61 6c 6c 73 2c |nd statu|s calls,|
|00000560| 20 73 6f 20 49 20 66 6f | 6c 6c 6f 77 65 64 20 73 | so I fo|llowed s|
|00000570| 75 69 74 3a 0d 09 09 09 | 09 47 44 47 65 74 50 61 |uit:....|.GDGetPa|
|00000580| 67 65 42 61 73 65 20 72 | 65 70 6c 61 63 65 73 20 |geBase r|eplaces |
|00000590| 47 44 47 65 74 42 61 73 | 65 41 64 64 72 0d 09 09 |GDGetBas|eAddr...|
|000005a0| 09 09 47 44 52 65 73 65 | 74 20 72 65 70 6c 61 63 |..GDRese|t replac|
|000005b0| 65 73 20 47 44 49 6e 69 | 74 0d 09 09 09 09 47 44 |es GDIni|t.....GD|
|000005c0| 47 72 61 79 50 61 67 65 | 20 72 65 70 6c 61 63 65 |GrayPage| replace|
|000005d0| 20 47 44 47 72 61 79 53 | 63 72 65 65 6e 0d 09 09 | GDGrayS|creen...|
|000005e0| 09 09 47 44 47 65 74 50 | 61 67 65 43 6e 74 20 72 |..GDGetP|ageCnt r|
|000005f0| 65 70 6c 61 63 65 73 20 | 47 44 47 65 74 50 61 67 |eplaces |GDGetPag|
|00000600| 65 73 0d 31 30 2f 32 32 | 2f 39 30 20 64 67 70 20 |es.10/22|/90 dgp |
|00000610| 50 72 69 6e 74 20 6f 75 | 74 20 6e 75 6d 62 65 72 |Print ou|t number|
|00000620| 20 6f 66 20 70 61 67 65 | 73 20 66 6f 72 20 61 6c | of page|s for al|
|00000630| 6c 20 6d 6f 64 65 73 2c | 20 6e 6f 74 20 6a 75 73 |l modes,| not jus|
|00000640| 74 20 63 75 72 72 65 6e | 74 20 6d 6f 64 65 2e 0d |t curren|t mode..|
|00000650| 09 09 20 64 67 70 20 52 | 65 73 74 6f 72 65 20 63 |.. dgp R|estore c|
|00000660| 6c 75 74 20 6d 61 6e 75 | 61 6c 6c 79 20 73 69 6e |lut manu|ally sin|
|00000670| 63 65 20 52 65 73 74 6f | 72 65 44 65 76 69 63 65 |ce Resto|reDevice|
|00000680| 43 6c 75 74 28 29 20 64 | 6f 65 73 6e 27 74 0d 09 |Clut() d|oesn't..|
|00000690| 09 20 09 77 6f 72 6b 20 | 6f 6e 20 4e 75 56 69 73 |. .work |on NuVis|
|000006a0| 74 61 2e 0d 31 30 2f 32 | 38 2f 39 30 20 64 67 70 |ta..10/2|8/90 dgp|
|000006b0| 20 4f 6e 6c 79 20 74 65 | 73 74 20 47 65 74 49 6e | Only te|st GetIn|
|000006c0| 74 65 72 72 75 70 74 20 | 26 20 53 65 74 49 6e 74 |terrupt |& SetInt|
|000006d0| 65 72 72 75 70 74 20 69 | 66 20 53 79 73 74 65 6d |errupt i|f System|
|000006e0| 20 69 73 20 36 2e 30 35 | 20 6f 72 20 68 69 67 68 | is 6.05| or high|
|000006f0| 65 72 2e 20 54 68 69 73 | 0d 09 09 09 61 76 6f 69 |er. This|....avoi|
|00000700| 64 73 20 53 65 74 49 6e | 74 65 72 72 75 70 74 28 |ds SetIn|terrupt(|
|00000710| 29 20 63 72 61 73 68 20 | 6f 6e 20 6f 6c 64 20 41 |) crash |on old A|
|00000720| 70 70 6c 65 20 54 46 42 | 20 76 69 64 65 6f 20 64 |pple TFB| video d|
|00000730| 72 69 76 65 72 2e 0d 32 | 2f 31 32 2f 39 31 09 64 |river..2|/12/91.d|
|00000740| 67 70 09 50 72 65 63 65 | 64 65 64 20 47 44 47 72 |gp.Prece|ded GDGr|
|00000750| 61 79 50 61 67 65 28 29 | 20 63 61 6c 6c 20 62 79 |ayPage()| call by|
|00000760| 20 47 44 53 65 74 4d 6f | 64 65 28 29 20 74 6f 20 | GDSetMo|de() to |
|00000770| 63 75 72 65 20 63 72 61 | 73 68 20 77 68 65 6e 20 |cure cra|sh when |
|00000780| 72 75 6e 6e 69 6e 67 0d | 09 09 09 70 72 6f 67 72 |running.|...progr|
|00000790| 61 6d 20 69 6d 6d 65 64 | 69 61 74 65 6c 79 20 61 |am immed|iately a|
|000007a0| 66 74 65 72 20 72 65 62 | 6f 6f 74 69 6e 67 2e 20 |fter reb|ooting. |
|000007b0| 4d 79 73 74 65 72 69 6f | 75 73 2e 0d 09 09 09 41 |Mysterio|us.....A|
|000007c0| 64 64 65 64 20 53 65 6c | 65 63 74 57 69 6e 64 6f |dded Sel|ectWindo|
|000007d0| 77 28 29 20 61 74 20 65 | 6e 64 20 6f 66 20 70 72 |w() at e|nd of pr|
|000007e0| 6f 67 72 61 6d 2e 0d 33 | 2f 39 2f 39 31 09 64 67 |ogram..3|/9/91.dg|
|000007f0| 70 09 50 72 69 6e 74 20 | 6f 75 74 20 6d 6f 64 65 |p.Print |out mode|
|00000800| 20 6e 61 6d 65 73 2e 0d | 34 2f 31 35 2f 39 31 09 | names..|4/15/91.|
|00000810| 64 67 70 09 4d 61 6b 65 | 20 73 75 72 65 20 74 68 |dgp.Make| sure th|
|00000820| 61 74 20 6e 65 77 20 70 | 61 6c 65 74 74 65 20 6d |at new p|alette m|
|00000830| 61 6e 61 67 65 72 20 65 | 78 69 73 74 73 20 62 65 |anager e|xists be|
|00000840| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 52 65 73 |fore cal|ling Res|
|00000850| 74 6f 72 65 44 65 76 69 | 63 65 43 6c 75 74 2e 0d |toreDevi|ceClut..|
|00000860| 09 09 09 54 68 61 6e 6b | 73 20 74 6f 20 43 68 75 |...Thank|s to Chu|
|00000870| 63 6b 20 53 74 65 69 6e | 20 66 6f 72 20 61 6c 65 |ck Stein| for ale|
|00000880| 72 74 69 6e 67 20 6d 65 | 20 74 6f 20 74 68 65 20 |rting me| to the |
|00000890| 62 75 67 2e 0d 36 2f 36 | 2f 39 31 09 64 67 70 09 |bug..6/6|/91.dgp.|
|000008a0| 54 69 6d 65 20 61 6e 64 | 20 70 72 69 6e 74 20 6f |Time and| print o|
|000008b0| 75 74 20 68 6f 77 20 6c | 6f 6e 67 20 47 44 53 65 |ut how l|ong GDSe|
|000008c0| 74 45 6e 74 72 69 65 73 | 20 74 61 6b 65 73 2e 0d |tEntries| takes..|
|000008d0| 38 2f 32 34 2f 39 31 09 | 64 67 70 09 4d 61 64 65 |8/24/91.|dgp.Made|
|000008e0| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|000008f0| 20 54 48 49 4e 4b 20 43 | 20 35 2e 30 2e 0d 31 2f | THINK C| 5.0..1/|
|00000900| 31 39 2f 39 32 09 64 67 | 70 09 43 6f 73 6d 65 74 |19/92.dg|p.Cosmet|
|00000910| 69 63 20 69 6d 70 72 6f | 76 65 6d 65 6e 74 73 20 |ic impro|vements |
|00000920| 74 6f 20 74 68 65 20 70 | 72 69 6e 74 6f 75 74 2e |to the p|rintout.|
|00000930| 0d 32 2f 32 35 2f 39 32 | 09 64 67 70 09 50 75 74 |.2/25/92|.dgp.Put|
|00000940| 20 74 69 6d 69 6e 67 20 | 69 6e 66 6f 20 69 6e 20 | timing |info in |
|00000950| 62 6f 6c 64 2e 0d 38 2f | 32 32 2f 39 32 09 64 67 |bold..8/|22/92.dg|
|00000960| 70 20 44 69 73 70 6c 61 | 79 20 72 65 73 75 6c 74 |p Displa|y result|
|00000970| 73 20 6f 66 20 63 61 6c | 6c 69 6e 67 20 47 44 46 |s of cal|ling GDF|
|00000980| 72 61 6d 65 52 61 74 65 | 28 29 20 61 6e 64 20 47 |rameRate|() and G|
|00000990| 44 46 72 61 6d 65 73 50 | 65 72 43 6c 75 74 55 70 |DFramesP|erClutUp|
|000009a0| 64 61 74 65 28 29 2e 0d | 38 2f 32 37 2f 39 32 09 |date()..|8/27/92.|
|000009b0| 64 67 70 09 72 65 70 6c | 61 63 65 20 53 79 73 45 |dgp.repl|ace SysE|
|000009c0| 6e 76 69 72 6f 6e 73 28 | 29 20 62 79 20 47 65 73 |nvirons(|) by Ges|
|000009d0| 74 61 6c 74 28 29 0d 31 | 32 2f 31 37 2f 39 32 20 |talt().1|2/17/92 |
|000009e0| 64 67 70 20 65 6e 68 61 | 6e 63 65 64 20 74 6f 20 |dgp enha|nced to |
|000009f0| 77 6f 72 6b 20 77 69 74 | 68 20 61 6e 79 20 64 61 |work wit|h any da|
|00000a00| 63 20 73 69 7a 65 2e 0d | 31 32 2f 33 30 2f 39 32 |c size..|12/30/92|
|00000a10| 20 64 67 70 20 55 73 65 | 20 47 44 43 6c 75 74 53 | dgp Use| GDClutS|
|00000a20| 69 7a 65 28 29 20 74 6f | 20 64 65 74 65 72 6d 69 |ize() to| determi|
|00000a30| 6e 65 20 63 6c 75 74 20 | 73 69 7a 65 2e 0d 31 2f |ne clut |size..1/|
|00000a40| 36 2f 39 33 09 64 67 70 | 09 54 69 64 69 65 64 20 |6/93.dgp|.Tidied |
|00000a50| 75 70 20 74 68 65 20 63 | 73 63 47 65 74 45 6e 74 |up the c|scGetEnt|
|00000a60| 72 69 65 73 2f 63 73 63 | 53 65 74 45 6e 74 72 69 |ries/csc|SetEntri|
|00000a70| 65 73 20 63 6f 64 65 2c | 20 6e 6f 77 20 74 68 61 |es code,| now tha|
|00000a80| 74 20 77 65 20 64 6f 6e | 27 74 20 68 61 76 65 0d |t we don|'t have.|
|00000a90| 09 09 09 74 6f 20 74 65 | 73 74 20 66 6f 72 20 74 |...to te|st for t|
|00000aa0| 68 65 20 4d 61 63 20 49 | 49 63 69 20 64 72 69 76 |he Mac I|Ici driv|
|00000ab0| 65 72 2e 0d 09 09 09 53 | 6b 69 70 20 63 73 63 47 |er.....S|kip cscG|
|00000ac0| 65 74 45 6e 74 72 69 65 | 73 20 6f 6e 20 52 65 6c |etEntrie|s on Rel|
|00000ad0| 61 78 20 64 72 69 76 65 | 72 2e 0d 31 2f 37 2f 39 |ax drive|r..1/7/9|
|00000ae0| 33 20 64 67 70 09 31 2e | 31 20 46 69 72 73 74 20 |3 dgp.1.|1 First |
|00000af0| 6e 75 6d 62 65 72 65 64 | 20 76 65 72 73 69 6f 6e |numbered| version|
|00000b00| 2e 0d 31 2f 31 38 2f 39 | 33 09 64 67 70 09 52 65 |..1/18/9|3.dgp.Re|
|00000b10| 6e 61 6d 65 64 20 4d 6f | 64 65 4e 61 6d 65 28 29 |named Mo|deName()|
|00000b20| 20 74 6f 20 47 44 4d 6f | 64 65 4e 61 6d 65 28 29 | to GDMo|deName()|
|00000b30| 2e 0d 31 2f 31 38 2f 39 | 33 09 64 67 70 09 4d 6f |..1/18/9|3.dgp.Mo|
|00000b40| 76 65 64 20 74 68 65 20 | 63 6f 64 65 20 74 68 61 |ved the |code tha|
|00000b50| 74 20 63 68 65 63 6b 65 | 64 20 66 6f 72 20 62 61 |t checke|d for ba|
|00000b60| 64 20 64 72 69 76 65 72 | 73 20 69 6e 74 6f 20 47 |d driver|s into G|
|00000b70| 44 47 65 74 45 6e 74 72 | 69 65 73 28 29 20 69 6e |DGetEntr|ies() in|
|00000b80| 20 47 44 56 69 64 65 6f | 2e 63 2c 0d 09 09 09 77 | GDVideo|.c,....w|
|00000b90| 68 65 72 65 20 69 74 20 | 62 65 6c 6f 6e 67 73 2e |here it |belongs.|
|00000ba0| 0d 32 2f 31 2f 39 33 09 | 64 67 70 20 52 65 70 6f |.2/1/93.|dgp Repo|
|00000bb0| 72 74 20 77 68 65 74 68 | 65 72 20 64 72 69 76 65 |rt wheth|er drive|
|00000bc0| 72 20 69 73 20 52 41 4d | 2d 20 6f 72 20 52 4f 4d |r is RAM|- or ROM|
|00000bd0| 2d 62 61 73 65 64 2e 0d | 32 2f 35 2f 39 33 09 64 |-based..|2/5/93.d|
|00000be0| 67 70 09 31 2e 32 2e 20 | 52 65 63 6f 6d 70 69 6c |gp.1.2. |Recompil|
|00000bf0| 65 64 20 77 69 74 68 20 | 6c 61 74 65 73 74 20 76 |ed with |latest v|
|00000c00| 65 72 73 69 6f 6e 20 6f | 66 20 47 44 56 69 64 65 |ersion o|f GDVide|
|00000c10| 6f 2c 20 77 68 69 63 68 | 20 6e 6f 77 20 73 75 70 |o, which| now sup|
|00000c20| 70 6f 72 74 73 0d 09 09 | 09 70 61 74 63 68 69 6e |ports...|.patchin|
|00000c30| 67 20 6f 66 20 4d 61 63 | 20 49 49 63 69 20 52 4f |g of Mac| IIci RO|
|00000c40| 4d 2d 62 61 73 65 64 20 | 64 72 69 76 65 72 2e 0d |M-based |driver..|
|00000c50| 32 2f 36 2f 39 33 09 64 | 67 70 09 31 2e 33 2e 20 |2/6/93.d|gp.1.3. |
|00000c60| 52 65 70 6f 72 74 20 52 | 4f 4d 20 76 65 72 73 69 |Report R|OM versi|
|00000c70| 6f 6e 2c 20 69 66 20 64 | 72 69 76 65 72 20 69 73 |on, if d|river is|
|00000c80| 20 52 4f 4d 2d 62 61 73 | 65 64 2e 0d 32 2f 37 2f | ROM-bas|ed..2/7/|
|00000c90| 39 33 09 64 67 70 09 31 | 2e 34 2e 20 52 65 63 6f |93.dgp.1|.4. Reco|
|00000ca0| 6d 70 69 6c 65 64 20 61 | 66 74 65 72 20 66 69 78 |mpiled a|fter fix|
|00000cb0| 69 6e 67 20 65 6e 64 6c | 65 73 73 20 6c 6f 6f 70 |ing endl|ess loop|
|00000cc0| 20 69 6e 20 50 61 74 63 | 68 4d 61 63 49 49 63 69 | in Patc|hMacIIci|
|00000cd0| 56 69 64 65 6f 44 72 69 | 76 65 72 0d 09 09 09 69 |VideoDri|ver....i|
|00000ce0| 6e 20 47 44 56 69 64 65 | 6f 2e 63 0d 32 2f 31 38 |n GDVide|o.c.2/18|
|00000cf0| 2f 39 33 09 64 67 70 09 | 31 2e 35 20 4d 61 64 65 |/93.dgp.|1.5 Made|
|00000d00| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00000d10| 20 50 6f 77 65 72 42 6f | 6f 6b 20 31 36 30 2c 20 | PowerBo|ok 160, |
|00000d20| 62 79 20 6f 6d 69 74 74 | 69 6e 67 20 63 61 6c 6c |by omitt|ing call|
|00000d30| 20 74 6f 20 47 44 53 65 | 74 49 6e 74 65 72 72 75 | to GDSe|tInterru|
|00000d40| 70 74 2e 0d 32 2f 32 32 | 2f 39 33 09 64 67 70 09 |pt..2/22|/93.dgp.|
|00000d50| 31 2e 36 20 4e 6f 20 6c | 6f 6e 67 65 72 20 61 73 |1.6 No l|onger as|
|00000d60| 73 75 6d 65 20 74 68 61 | 74 20 64 72 69 76 65 72 |sume tha|t driver|
|00000d70| 20 75 73 65 73 20 61 20 | 76 65 72 73 69 6f 6e 20 | uses a |version |
|00000d80| 30 20 67 61 6d 6d 61 20 | 74 61 62 6c 65 2e 0d 34 |0 gamma |table..4|
|00000d90| 2f 31 37 2f 39 33 09 64 | 67 70 09 31 2e 37 20 52 |/17/93.d|gp.1.7 R|
|00000da0| 65 70 6c 61 63 65 64 20 | 6f 62 73 6f 6c 65 74 65 |eplaced |obsolete|
|00000db0| 20 47 44 46 72 61 6d 65 | 73 50 65 72 43 6c 75 74 | GDFrame|sPerClut|
|00000dc0| 55 70 64 61 74 65 20 61 | 6e 64 20 47 44 54 69 6d |Update a|nd GDTim|
|00000dd0| 65 43 6c 75 74 55 70 64 | 61 74 65 20 62 79 20 0d |eClutUpd|ate by .|
|00000de0| 09 09 09 47 44 54 69 6d | 65 43 6c 75 74 2e 0d 37 |...GDTim|eClut..7|
|00000df0| 2f 37 2f 39 33 09 64 67 | 70 09 31 2e 38 20 41 20 |/7/93.dg|p.1.8 A |
|00000e00| 62 69 74 20 6d 6f 72 65 | 20 65 72 72 6f 72 20 63 |bit more| error c|
|00000e10| 68 65 63 6b 69 6e 67 20 | 6f 66 20 47 44 47 65 74 |hecking |of GDGet|
|00000e20| 47 61 6d 6d 61 2e 0d 37 | 2f 32 39 2f 39 34 20 64 |Gamma..7|/29/94 d|
|00000e30| 67 70 20 45 6c 69 6d 69 | 6e 61 74 65 64 20 75 73 |gp Elimi|nated us|
|00000e40| 65 20 6f 66 20 22 23 73 | 22 20 70 72 69 6e 74 66 |e of "#s|" printf|
|00000e50| 20 66 6f 72 6d 61 74 2c | 20 73 69 6e 63 65 20 69 | format,| since i|
|00000e60| 74 27 73 20 6e 6f 74 20 | 73 75 70 70 6f 72 74 65 |t's not |supporte|
|00000e70| 64 20 62 79 0d 09 09 09 | 4d 65 74 72 6f 77 65 72 |d by....|Metrower|
|00000e80| 6b 73 20 43 6f 64 65 57 | 61 72 72 69 6f 72 20 43 |ks CodeW|arrior C|
|00000e90| 2e 0d 39 2f 35 2f 39 34 | 20 64 67 70 20 72 65 6d |..9/5/94| dgp rem|
|00000ea0| 6f 76 65 64 20 61 73 73 | 75 6d 70 74 69 6f 6e 20 |oved ass|umption |
|00000eb0| 69 6e 20 70 72 69 6e 74 | 66 27 73 20 74 68 61 74 |in print|f's that|
|00000ec0| 20 69 6e 74 3d 3d 73 68 | 6f 72 74 2e 0d 35 2f 32 | int==sh|ort..5/2|
|00000ed0| 32 2f 39 35 20 64 67 70 | 20 66 69 78 65 64 20 6d |2/95 dgp| fixed m|
|00000ee0| 69 6e 6f 72 20 62 75 67 | 20 72 65 70 6f 72 74 65 |inor bug| reporte|
|00000ef0| 64 20 62 79 20 4d 69 63 | 68 61 65 6c 20 50 65 6c |d by Mic|hael Pel|
|00000f00| 69 6b 61 6e 3a 0d 09 09 | 09 73 79 73 74 65 6d 56 |ikan:...|.systemV|
|00000f10| 65 72 73 69 6f 6e 20 77 | 61 73 20 6e 65 76 65 72 |ersion w|as never|
|00000f20| 20 70 72 6f 70 65 72 6c | 79 20 69 6e 69 74 69 61 | properl|y initia|
|00000f30| 6c 69 7a 65 64 2e 0d 2a | 2f 0d 23 69 6e 63 6c 75 |lized..*|/.#inclu|
|00000f40| 64 65 20 22 56 69 64 65 | 6f 54 6f 6f 6c 62 6f 78 |de "Vide|oToolbox|
|00000f50| 2e 68 22 0d 2f 2f 23 69 | 6e 63 6c 75 64 65 20 3c |.h".//#i|nclude <|
|00000f60| 46 69 6c 65 73 2e 68 3e | 0d 2f 2f 23 69 6e 63 6c |Files.h>|.//#incl|
|00000f70| 75 64 65 20 3c 4d 65 6e | 75 73 2e 68 3e 0d 23 69 |ude <Men|us.h>.#i|
|00000f80| 66 20 55 4e 49 56 45 52 | 53 41 4c 5f 48 45 41 44 |f UNIVER|SAL_HEAD|
|00000f90| 45 52 53 0d 09 23 69 6e | 63 6c 75 64 65 20 3c 4c |ERS..#in|clude <L|
|00000fa0| 6f 77 4d 65 6d 2e 68 3e | 0d 23 65 6c 73 65 0d 09 |owMem.h>|.#else..|
|00000fb0| 23 64 65 66 69 6e 65 20 | 4c 4d 47 65 74 4d 42 61 |#define |LMGetMBa|
|00000fc0| 72 48 65 69 67 68 74 28 | 29 20 28 2a 20 28 73 68 |rHeight(|) (* (sh|
|00000fd0| 6f 72 74 20 2a 29 20 30 | 78 30 42 41 41 29 0d 09 |ort *) 0|x0BAA)..|
|00000fe0| 23 64 65 66 69 6e 65 20 | 4c 4d 53 65 74 4d 42 61 |#define |LMSetMBa|
|00000ff0| 72 48 65 69 67 68 74 28 | 4d 42 61 72 48 65 69 67 |rHeight(|MBarHeig|
|00001000| 68 74 56 61 6c 75 65 29 | 20 28 28 2a 20 28 73 68 |htValue)| ((* (sh|
|00001010| 6f 72 74 20 2a 29 20 30 | 78 30 42 41 41 29 20 3d |ort *) 0|x0BAA) =|
|00001020| 20 28 4d 42 61 72 48 65 | 69 67 68 74 56 61 6c 75 | (MBarHe|ightValu|
|00001030| 65 29 29 0d 23 65 6e 64 | 69 66 0d 23 69 66 20 55 |e)).#end|if.#if U|
|00001040| 4e 49 56 45 52 53 41 4c | 5f 48 45 41 44 45 52 53 |NIVERSAL|_HEADERS|
|00001050| 3c 32 0d 09 65 6e 75 6d | 7b 64 52 41 4d 42 61 73 |<2..enum|{dRAMBas|
|00001060| 65 64 4d 61 73 6b 3d 30 | 78 30 30 34 30 7d 3b 09 |edMask=0|x0040};.|
|00001070| 2f 2a 20 64 43 74 6c 44 | 72 69 76 65 72 20 69 73 |/* dCtlD|river is|
|00001080| 20 61 20 68 61 6e 64 6c | 65 20 28 31 29 20 6f 72 | a handl|e (1) or|
|00001090| 20 70 6f 69 6e 74 65 72 | 20 28 30 29 20 2a 2f 0d | pointer| (0) */.|
|000010a0| 23 65 6e 64 69 66 0d 69 | 6e 74 20 50 61 74 63 68 |#endif.i|nt Patch|
|000010b0| 4d 61 63 49 49 63 69 56 | 69 64 65 6f 44 72 69 76 |MacIIciV|ideoDriv|
|000010c0| 65 72 28 76 6f 69 64 29 | 3b 0d 76 6f 69 64 20 47 |er(void)|;.void G|
|000010d0| 61 6d 6d 61 52 65 70 6f | 72 74 28 47 61 6d 6d 61 |ammaRepo|rt(Gamma|
|000010e0| 54 62 6c 20 2a 67 61 6d | 6d 61 29 3b 0d 76 6f 69 |Tbl *gam|ma);.voi|
|000010f0| 64 20 6d 61 69 6e 28 76 | 6f 69 64 29 3b 0d 76 6f |d main(v|oid);.vo|
|00001100| 69 64 20 54 65 73 74 47 | 44 56 69 64 65 6f 28 76 |id TestG|DVideo(v|
|00001110| 6f 69 64 29 3b 0d 73 74 | 61 74 69 63 20 76 6f 69 |oid);.st|atic voi|
|00001120| 64 20 45 72 72 6f 72 28 | 69 6e 74 20 65 72 72 6f |d Error(|int erro|
|00001130| 72 29 3b 0d 23 64 65 66 | 69 6e 65 20 56 45 52 53 |r);.#def|ine VERS|
|00001140| 49 4f 4e 20 22 31 2e 38 | 22 0d 23 64 65 66 69 6e |ION "1.8|".#defin|
|00001150| 65 20 53 43 52 45 45 4e | 53 20 38 0d 73 74 61 74 |e SCREEN|S 8.stat|
|00001160| 69 63 20 42 6f 6f 6c 65 | 61 6e 20 70 72 69 6e 74 |ic Boole|an print|
|00001170| 47 61 6d 6d 61 54 61 62 | 6c 65 3d 30 3b 09 2f 2f |GammaTab|le=0;.//|
|00001180| 20 53 65 74 20 74 68 69 | 73 20 74 6f 20 31 20 74 | Set thi|s to 1 t|
|00001190| 6f 20 65 6e 61 62 6c 65 | 20 70 72 69 6e 74 69 6e |o enable| printin|
|000011a0| 67 20 6f 66 20 67 61 6d | 6d 61 20 74 61 62 6c 65 |g of gam|ma table|
|000011b0| 2e 0d 0d 76 6f 69 64 20 | 6d 61 69 6e 28 76 6f 69 |...void |main(voi|
|000011c0| 64 29 0d 7b 0d 09 53 74 | 61 63 6b 47 72 6f 77 28 |d).{..St|ackGrow(|
|000011d0| 32 30 30 30 30 29 3b 0d | 09 52 65 71 75 69 72 65 |20000);.|.Require|
|000011e0| 28 67 65 73 74 61 6c 74 | 38 42 69 74 51 44 29 3b |(gestalt|8BitQD);|
|000011f0| 0d 09 54 65 73 74 47 44 | 56 69 64 65 6f 28 29 3b |..TestGD|Video();|
|00001200| 0d 7d 0d 09 0d 43 57 69 | 6e 64 6f 77 50 74 72 20 |.}...CWi|ndowPtr |
|00001210| 63 77 3b 09 09 09 2f 2f | 20 6a 75 73 74 20 66 6f |cw;...//| just fo|
|00001220| 72 20 70 6f 6b 69 6e 67 | 20 61 72 6f 75 6e 64 20 |r poking| around |
|00001230| 69 6e 20 74 68 65 20 64 | 65 62 75 67 67 65 72 0d |in the d|ebugger.|
|00001240| 47 44 48 61 6e 64 6c 65 | 20 6d 61 69 6e 44 65 76 |GDHandle| mainDev|
|00001250| 69 63 65 3b 09 2f 2f 20 | 6a 75 73 74 20 66 6f 72 |ice;.// |just for|
|00001260| 20 70 6f 6b 69 6e 67 20 | 61 72 6f 75 6e 64 20 69 | poking |around i|
|00001270| 6e 20 74 68 65 20 64 65 | 62 75 67 67 65 72 0d 76 |n the de|bugger.v|
|00001280| 6f 69 64 20 54 65 73 74 | 47 44 56 69 64 65 6f 28 |oid Test|GDVideo(|
|00001290| 76 6f 69 64 29 0d 7b 0d | 09 57 69 6e 64 6f 77 50 |void).{.|.WindowP|
|000012a0| 74 72 20 77 69 6e 64 6f | 77 5b 53 43 52 45 45 4e |tr windo|w[SCREEN|
|000012b0| 53 5d 2c 6f 6c 64 50 6f | 72 74 3b 0d 09 73 74 61 |S],oldPo|rt;..sta|
|000012c0| 74 69 63 20 43 6f 6c 6f | 72 53 70 65 63 20 6d 79 |tic Colo|rSpec my|
|000012d0| 54 61 62 6c 65 5b 31 30 | 32 34 5d 3b 09 2f 2f 20 |Table[10|24];.// |
|000012e0| 45 6e 6f 75 67 68 20 66 | 6f 72 20 31 30 2d 62 69 |Enough f|or 10-bi|
|000012f0| 74 20 64 61 63 73 0d 09 | 43 6f 6c 6f 72 53 70 65 |t dacs..|ColorSpe|
|00001300| 63 20 62 6c 61 63 6b 3d | 7b 30 2c 30 2c 30 2c 30 |c black=|{0,0,0,0|
|00001310| 7d 3b 0d 09 57 69 6e 64 | 6f 77 50 74 72 20 74 68 |};..Wind|owPtr th|
|00001320| 65 57 69 6e 64 6f 77 3b | 0d 09 47 44 48 61 6e 64 |eWindow;|..GDHand|
|00001330| 6c 65 20 64 65 76 69 63 | 65 3b 0d 09 73 68 6f 72 |le devic|e;..shor|
|00001340| 74 20 69 2c 65 72 72 6f | 72 2c 73 63 72 65 65 6e |t i,erro|r,screen|
|00001350| 2c 6d 6f 64 65 2c 70 61 | 67 65 2c 70 61 67 65 73 |,mode,pa|ge,pages|
|00001360| 2c 73 74 61 72 74 2c 63 | 6f 75 6e 74 2c 70 69 78 |,start,c|ount,pix|
|00001370| 65 6c 53 69 7a 65 2c 74 | 79 70 65 2c 63 6c 75 74 |elSize,t|ype,clut|
|00001380| 53 69 7a 65 3b 0d 09 73 | 68 6f 72 74 20 74 65 78 |Size;..s|hort tex|
|00001390| 74 53 69 7a 65 3d 31 32 | 2c 64 61 63 53 69 7a 65 |tSize=12|,dacSize|
|000013a0| 2c 64 61 74 61 53 69 7a | 65 2c 64 61 74 61 43 6e |,dataSiz|e,dataCn|
|000013b0| 74 2c 66 6f 6e 74 4e 75 | 6d 62 65 72 2c 77 68 65 |t,fontNu|mber,whe|
|000013c0| 72 65 3b 0d 09 73 68 6f | 72 74 20 67 61 6d 6d 61 |re;..sho|rt gamma|
|000013d0| 44 61 74 61 57 69 64 74 | 68 3b 0d 09 6c 6f 6e 67 |DataWidt|h;..long|
|000013e0| 20 73 79 73 74 65 6d 56 | 65 72 73 69 6f 6e 3d 30 | systemV|ersion=0|
|000013f0| 3b 0d 09 42 6f 6f 6c 65 | 61 6e 20 66 6c 61 67 2c |;..Boole|an flag,|
|00001400| 6b 65 65 70 57 61 69 74 | 69 6e 67 3b 0d 09 47 61 |keepWait|ing;..Ga|
|00001410| 6d 6d 61 54 62 6c 20 2a | 67 61 6d 6d 61 3d 4e 55 |mmaTbl *|gamma=NU|
|00001420| 4c 4c 2c 2a 6d 79 47 61 | 6d 6d 61 3d 4e 55 4c 4c |LL,*myGa|mma=NULL|
|00001430| 3b 0d 09 63 68 61 72 20 | 2a 6e 61 6d 65 3b 0d 09 |;..char |*name;..|
|00001440| 50 74 72 20 62 61 73 65 | 41 64 64 72 3b 0d 09 52 |Ptr base|Addr;..R|
|00001450| 65 63 74 20 6d 79 52 65 | 63 74 3b 0d 09 64 6f 75 |ect myRe|ct;..dou|
|00001460| 62 6c 65 20 66 3b 0d 09 | 75 6e 73 69 67 6e 65 64 |ble f;..|unsigned|
|00001470| 20 63 68 61 72 20 2a 62 | 79 74 65 3b 0d 09 75 6e | char *b|yte;..un|
|00001480| 73 69 67 6e 65 64 20 73 | 68 6f 72 74 20 2a 77 6f |signed s|hort *wo|
|00001490| 72 64 3b 0d 09 42 6f 6f | 6c 65 61 6e 20 70 61 74 |rd;..Boo|lean pat|
|000014a0| 63 68 3b 0d 09 63 68 61 | 72 20 74 79 70 65 4e 61 |ch;..cha|r typeNa|
|000014b0| 6d 65 5b 5d 5b 31 36 5d | 3d 7b 22 63 6c 75 74 54 |me[][16]|={"clutT|
|000014c0| 79 70 65 22 2c 22 66 69 | 78 65 64 54 79 70 65 22 |ype","fi|xedType"|
|000014d0| 2c 22 64 69 72 65 63 74 | 54 79 70 65 22 7d 3b 0d |,"direct|Type"};.|
|000014e0| 09 41 75 78 44 43 45 20 | 2a 2a 61 75 78 44 43 45 |.AuxDCE |**auxDCE|
|000014f0| 48 61 6e 64 6c 65 3b 0d | 09 6c 6f 6e 67 20 73 69 |Handle;.|.long si|
|00001500| 7a 65 3b 0d 09 50 74 72 | 20 70 74 72 3b 0d 09 6c |ze;..Ptr| ptr;..l|
|00001510| 6f 6e 67 20 72 6f 6d 53 | 69 7a 65 2c 72 6f 6d 56 |ong romS|ize,romV|
|00001520| 65 72 73 69 6f 6e 3b 0d | 09 64 6f 75 62 6c 65 20 |ersion;.|.double |
|00001530| 73 2c 66 72 61 6d 65 73 | 2c 6d 69 73 73 69 6e 67 |s,frames|,missing|
|00001540| 46 72 61 6d 65 73 2c 66 | 72 61 6d 65 52 61 74 65 |Frames,f|rameRate|
|00001550| 3b 0d 09 45 76 65 6e 74 | 52 65 63 6f 72 64 20 65 |;..Event|Record e|
|00001560| 76 65 6e 74 3b 0d 09 0d | 09 49 6e 69 74 47 72 61 |vent;...|.InitGra|
|00001570| 66 28 26 71 64 2e 74 68 | 65 50 6f 72 74 29 3b 0d |f(&qd.th|ePort);.|
|00001580| 09 49 6e 69 74 46 6f 6e | 74 73 28 29 3b 0d 09 49 |.InitFon|ts();..I|
|00001590| 6e 69 74 57 69 6e 64 6f | 77 73 28 29 3b 0d 09 49 |nitWindo|ws();..I|
|000015a0| 6e 69 74 43 75 72 73 6f | 72 28 29 3b 0d 09 47 65 |nitCurso|r();..Ge|
|000015b0| 74 50 6f 72 74 28 26 6f | 6c 64 50 6f 72 74 29 3b |tPort(&o|ldPort);|
|000015c0| 0d 09 5f 61 74 65 78 69 | 74 28 52 65 73 74 6f 72 |.._atexi|t(Restor|
|000015d0| 65 43 6c 75 74 73 29 3b | 0d 09 70 61 74 63 68 3d |eCluts);|..patch=|
|000015e0| 50 61 74 63 68 4d 61 63 | 49 49 63 69 56 69 64 65 |PatchMac|IIciVide|
|000015f0| 6f 44 72 69 76 65 72 28 | 29 3b 0d 09 47 65 73 74 |oDriver(|);..Gest|
|00001600| 61 6c 74 28 67 65 73 74 | 61 6c 74 53 79 73 74 65 |alt(gest|altSyste|
|00001610| 6d 56 65 72 73 69 6f 6e | 2c 26 73 79 73 74 65 6d |mVersion|,&system|
|00001620| 56 65 72 73 69 6f 6e 29 | 3b 0d 09 66 6f 72 28 73 |Version)|;..for(s|
|00001630| 63 72 65 65 6e 3d 30 3b | 73 63 72 65 65 6e 3c 53 |creen=0;|screen<S|
|00001640| 43 52 45 45 4e 53 3b 73 | 63 72 65 65 6e 2b 2b 29 |CREENS;s|creen++)|
|00001650| 7b 0d 09 09 53 65 74 50 | 6f 72 74 28 6f 6c 64 50 |{...SetP|ort(oldP|
|00001660| 6f 72 74 29 3b 0d 09 09 | 64 65 76 69 63 65 20 3d |ort);...|device =|
|00001670| 20 47 65 74 53 63 72 65 | 65 6e 44 65 76 69 63 65 | GetScre|enDevice|
|00001680| 28 73 63 72 65 65 6e 29 | 3b 0d 09 09 69 66 28 64 |(screen)|;...if(d|
|00001690| 65 76 69 63 65 20 3d 3d | 20 4e 55 4c 4c 29 20 62 |evice ==| NULL) b|
|000016a0| 72 65 61 6b 3b 0d 0d 09 | 09 2f 2a 0d 09 09 46 6f |reak;...|./*...Fo|
|000016b0| 72 20 72 65 61 73 6f 6e | 73 20 74 68 61 74 20 49 |r reason|s that I|
|000016c0| 20 64 6f 6e 27 74 20 75 | 6e 64 65 72 73 74 61 6e | don't u|nderstan|
|000016d0| 64 2c 20 63 61 6c 6c 69 | 6e 67 20 63 73 63 47 72 |d, calli|ng cscGr|
|000016e0| 61 79 50 61 67 65 28 29 | 20 66 69 72 73 74 2c 0d |ayPage()| first,.|
|000016f0| 09 09 69 6d 6d 65 64 69 | 61 74 65 6c 79 20 61 66 |..immedi|ately af|
|00001700| 74 65 72 20 72 65 62 6f | 6f 74 69 6e 67 2c 20 72 |ter rebo|oting, r|
|00001710| 65 73 75 6c 74 73 20 69 | 6e 20 61 20 63 72 61 73 |esults i|n a cras|
|00001720| 68 20 77 68 65 6e 20 75 | 73 69 6e 67 20 61 6e 20 |h when u|sing an |
|00001730| 41 70 70 6c 65 27 73 0d | 09 09 6f 6c 64 20 22 54 |Apple's.|..old "T|
|00001740| 6f 62 79 22 20 76 69 64 | 65 6f 20 63 61 72 64 2e |oby" vid|eo card.|
|00001750| 20 50 72 65 63 65 64 69 | 6e 67 20 74 68 65 20 63 | Precedi|ng the c|
|00001760| 61 6c 6c 20 62 79 0d 09 | 09 61 20 63 61 6c 6c 20 |all by..|.a call |
|00001770| 74 6f 20 63 73 63 53 65 | 74 4d 6f 64 65 28 29 20 |to cscSe|tMode() |
|00001780| 63 75 72 65 73 20 74 68 | 65 20 73 79 6d 70 74 6f |cures th|e sympto|
|00001790| 6d 2e 20 4c 61 74 65 72 | 20 63 61 6c 6c 73 20 74 |m. Later| calls t|
|000017a0| 6f 20 63 73 63 47 72 61 | 79 50 61 67 65 28 29 0d |o cscGra|yPage().|
|000017b0| 09 09 73 65 65 6d 20 74 | 6f 20 61 6c 77 61 79 73 |..seem t|o always|
|000017c0| 20 77 6f 72 6b 20 66 69 | 6e 65 2e 20 50 72 65 73 | work fi|ne. Pres|
|000017d0| 75 6d 61 62 6c 79 20 73 | 6f 6d 65 74 68 69 6e 67 |umably s|omething|
|000017e0| 20 69 73 20 6e 6f 74 20 | 70 72 6f 70 65 72 6c 79 | is not |properly|
|000017f0| 20 69 6e 69 74 69 61 6c | 69 7a 65 64 0d 09 09 69 | initial|ized...i|
|00001800| 6e 20 74 68 65 20 41 70 | 70 6c 65 20 76 69 64 65 |n the Ap|ple vide|
|00001810| 6f 20 63 61 72 64 20 64 | 72 69 76 65 72 2e 20 28 |o card d|river. (|
|00001820| 54 6f 62 79 20 63 61 72 | 64 20 64 72 69 76 65 72 |Toby car|d driver|
|00001830| 20 76 65 72 73 69 6f 6e | 20 34 2e 29 0d 09 09 2a | version| 4.)...*|
|00001840| 2f 0d 09 09 65 72 72 6f | 72 3d 47 44 47 65 74 4d |/...erro|r=GDGetM|
|00001850| 6f 64 65 28 64 65 76 69 | 63 65 2c 26 6d 6f 64 65 |ode(devi|ce,&mode|
|00001860| 2c 26 70 61 67 65 2c 26 | 62 61 73 65 41 64 64 72 |,&page,&|baseAddr|
|00001870| 29 3b 0d 09 09 65 72 72 | 6f 72 3d 47 44 53 65 74 |);...err|or=GDSet|
|00001880| 4d 6f 64 65 28 64 65 76 | 69 63 65 2c 6d 6f 64 65 |Mode(dev|ice,mode|
|00001890| 2c 70 61 67 65 2c 26 62 | 61 73 65 41 64 64 72 29 |,page,&b|aseAddr)|
|000018a0| 3b 0d 09 09 47 44 52 65 | 73 74 6f 72 65 44 65 76 |;...GDRe|storeDev|
|000018b0| 69 63 65 43 6c 75 74 28 | 64 65 76 69 63 65 29 3b |iceClut(|device);|
|000018c0| 0d 09 09 0d 09 09 65 72 | 72 6f 72 3d 47 44 47 72 |......er|ror=GDGr|
|000018d0| 61 79 50 61 67 65 28 64 | 65 76 69 63 65 2c 70 61 |ayPage(d|evice,pa|
|000018e0| 67 65 29 3b 0d 09 09 69 | 66 28 73 63 72 65 65 6e |ge);...i|f(screen|
|000018f0| 3d 3d 30 29 44 72 61 77 | 4d 65 6e 75 42 61 72 28 |==0)Draw|MenuBar(|
|00001900| 29 3b 09 2f 2a 20 72 65 | 73 74 6f 72 65 20 6d 65 |);./* re|store me|
|00001910| 6e 75 20 62 61 72 20 61 | 66 74 65 72 20 47 72 61 |nu bar a|fter Gra|
|00001920| 79 53 63 72 65 65 6e 20 | 2a 2f 0d 0d 09 09 2f 2a |yScreen |*/..../*|
|00001930| 20 4f 70 65 6e 20 77 69 | 6e 64 6f 77 20 2a 2f 0d | Open wi|ndow */.|
|00001940| 09 09 6d 79 52 65 63 74 | 20 3d 20 28 2a 64 65 76 |..myRect| = (*dev|
|00001950| 69 63 65 29 2d 3e 67 64 | 52 65 63 74 3b 09 2f 2a |ice)->gd|Rect;./*|
|00001960| 20 72 65 63 74 20 6f 66 | 20 64 65 73 69 72 65 64 | rect of| desired|
|00001970| 20 73 63 72 65 65 6e 20 | 69 6e 20 67 6c 6f 62 61 | screen |in globa|
|00001980| 6c 20 63 6f 6f 72 64 69 | 6e 61 74 65 73 20 2a 2f |l coordi|nates */|
|00001990| 0d 09 09 69 66 28 73 63 | 72 65 65 6e 3d 3d 30 29 |...if(sc|reen==0)|
|000019a0| 6d 79 52 65 63 74 2e 74 | 6f 70 2b 3d 4c 4d 47 65 |myRect.t|op+=LMGe|
|000019b0| 74 4d 42 61 72 48 65 69 | 67 68 74 28 29 3b 09 2f |tMBarHei|ght();./|
|000019c0| 2a 20 61 6c 6c 6f 77 20 | 66 6f 72 20 6d 65 6e 75 |* allow |for menu|
|000019d0| 20 62 61 72 20 2a 2f 0d | 09 09 6d 79 52 65 63 74 | bar */.|..myRect|
|000019e0| 2e 74 6f 70 2b 3d 31 37 | 3b 09 09 09 09 09 09 09 |.top+=17|;.......|
|000019f0| 09 2f 2a 20 61 6c 6c 6f | 77 20 66 6f 72 20 74 69 |./* allo|w for ti|
|00001a00| 74 6c 65 20 62 61 72 20 | 2a 2f 0d 09 09 49 6e 73 |tle bar |*/...Ins|
|00001a10| 65 74 52 65 63 74 28 26 | 6d 79 52 65 63 74 2c 31 |etRect(&|myRect,1|
|00001a20| 2c 31 29 3b 0d 09 09 6e | 61 6d 65 3d 47 44 43 61 |,1);...n|ame=GDCa|
|00001a30| 72 64 4e 61 6d 65 28 64 | 65 76 69 63 65 29 3b 0d |rdName(d|evice);.|
|00001a40| 09 09 63 32 70 73 74 72 | 28 6e 61 6d 65 29 3b 0d |..c2pstr|(name);.|
|00001a50| 09 09 77 69 6e 64 6f 77 | 5b 73 63 72 65 65 6e 5d |..window|[screen]|
|00001a60| 3d 0d 09 09 09 4e 65 77 | 43 57 69 6e 64 6f 77 28 |=....New|CWindow(|
|00001a70| 4e 55 4c 4c 2c 26 6d 79 | 52 65 63 74 2c 28 75 6e |NULL,&my|Rect,(un|
|00001a80| 73 69 67 6e 65 64 20 63 | 68 61 72 20 2a 29 6e 61 |signed c|har *)na|
|00001a90| 6d 65 2c 54 52 55 45 2c | 64 6f 63 75 6d 65 6e 74 |me,TRUE,|document|
|00001aa0| 50 72 6f 63 2c 28 57 69 | 6e 64 6f 77 50 74 72 29 |Proc,(Wi|ndowPtr)|
|00001ab0| 20 2d 31 4c 2c 54 52 55 | 45 2c 31 32 33 4c 29 3b | -1L,TRU|E,123L);|
|00001ac0| 0d 09 09 63 77 3d 28 43 | 57 69 6e 64 6f 77 50 74 |...cw=(C|WindowPt|
|00001ad0| 72 29 77 69 6e 64 6f 77 | 5b 73 63 72 65 65 6e 5d |r)window|[screen]|
|00001ae0| 3b 09 2f 2f 20 6a 75 73 | 74 20 66 6f 72 20 70 6f |;.// jus|t for po|
|00001af0| 6b 69 6e 67 20 61 72 6f | 75 6e 64 20 69 6e 20 74 |king aro|und in t|
|00001b00| 68 65 20 64 65 62 75 67 | 67 65 72 0d 09 09 6d 61 |he debug|ger...ma|
|00001b10| 69 6e 44 65 76 69 63 65 | 3d 47 65 74 4d 61 69 6e |inDevice|=GetMain|
|00001b20| 44 65 76 69 63 65 28 29 | 3b 09 09 2f 2f 20 6a 75 |Device()|;..// ju|
|00001b30| 73 74 20 66 6f 72 20 70 | 6f 6b 69 6e 67 20 61 72 |st for p|oking ar|
|00001b40| 6f 75 6e 64 20 69 6e 20 | 74 68 65 20 64 65 62 75 |ound in |the debu|
|00001b50| 67 67 65 72 0d 09 09 2f | 2a 20 57 72 69 74 65 20 |gger.../|* Write |
|00001b60| 69 6e 20 77 69 6e 64 6f | 77 20 2a 2f 0d 09 09 53 |in windo|w */...S|
|00001b70| 65 74 50 6f 72 74 28 77 | 69 6e 64 6f 77 5b 73 63 |etPort(w|indow[sc|
|00001b80| 72 65 65 6e 5d 29 3b 0d | 09 09 6d 79 52 65 63 74 |reen]);.|..myRect|
|00001b90| 3d 77 69 6e 64 6f 77 5b | 73 63 72 65 65 6e 5d 2d |=window[|screen]-|
|00001ba0| 3e 70 6f 72 74 52 65 63 | 74 3b 0d 09 09 47 65 74 |>portRec|t;...Get|
|00001bb0| 46 4e 75 6d 28 22 5c 70 | 54 69 6d 65 73 22 2c 26 |FNum("\p|Times",&|
|00001bc0| 66 6f 6e 74 4e 75 6d 62 | 65 72 29 3b 0d 09 09 54 |fontNumb|er);...T|
|00001bd0| 65 78 74 46 6f 6e 74 28 | 66 6f 6e 74 4e 75 6d 62 |extFont(|fontNumb|
|00001be0| 65 72 29 3b 0d 09 09 54 | 65 78 74 53 69 7a 65 28 |er);...T|extSize(|
|00001bf0| 74 65 78 74 53 69 7a 65 | 29 3b 0d 09 09 44 72 61 |textSize|);...Dra|
|00001c00| 77 50 72 69 6e 74 66 28 | 22 5c 6e 22 29 3b 0d 09 |wPrintf(|"\n");..|
|00001c10| 09 69 66 28 73 63 72 65 | 65 6e 3d 3d 30 29 44 72 |.if(scre|en==0)Dr|
|00001c20| 61 77 50 72 69 6e 74 66 | 28 22 57 65 6c 63 6f 6d |awPrintf|("Welcom|
|00001c30| 65 20 74 6f 20 54 65 73 | 74 47 44 56 69 64 65 6f |e to Tes|tGDVideo|
|00001c40| 20 22 20 56 45 52 53 49 | 4f 4e 20 22 2e 20 4e 6f | " VERSI|ON ". No|
|00001c50| 77 20 74 65 73 74 69 6e | 67 20 61 6c 6c 20 79 6f |w testin|g all yo|
|00001c60| 75 72 20 76 69 64 65 6f | 20 64 72 69 76 65 72 73 |ur video| drivers|
|00001c70| 2e 22 0d 09 09 22 20 50 | 6c 65 61 73 65 20 72 65 |."..." P|lease re|
|00001c80| 70 6f 72 74 20 61 6e 79 | 20 63 72 61 73 68 20 74 |port any| crash t|
|00001c90| 6f 20 64 65 6e 69 73 40 | 78 70 2e 70 73 79 63 68 |o denis@|xp.psych|
|00001ca0| 2e 6e 79 75 2e 65 64 75 | 5c 6e 22 29 3b 0d 0d 09 |.nyu.edu|\n");...|
|00001cb0| 09 44 72 61 77 50 72 69 | 6e 74 66 28 22 44 72 69 |.DrawPri|ntf("Dri|
|00001cc0| 76 65 72 3a 20 25 73 20 | 76 65 72 73 69 6f 6e 20 |ver: %s |version |
|00001cd0| 25 64 22 2c 47 44 4e 61 | 6d 65 53 74 72 28 64 65 |%d",GDNa|meStr(de|
|00001ce0| 76 69 63 65 29 2c 28 69 | 6e 74 29 47 44 56 65 72 |vice),(i|nt)GDVer|
|00001cf0| 73 69 6f 6e 28 64 65 76 | 69 63 65 29 29 3b 0d 09 |sion(dev|ice));..|
|00001d00| 09 61 75 78 44 43 45 48 | 61 6e 64 6c 65 20 3d 20 |.auxDCEH|andle = |
|00001d10| 28 41 75 78 44 43 45 20 | 2a 2a 29 20 47 65 74 44 |(AuxDCE |**) GetD|
|00001d20| 43 74 6c 45 6e 74 72 79 | 28 28 2a 64 65 76 69 63 |CtlEntry|((*devic|
|00001d30| 65 29 2d 3e 67 64 52 65 | 66 4e 75 6d 29 3b 0d 09 |e)->gdRe|fNum);..|
|00001d40| 09 69 66 28 28 2a 2a 61 | 75 78 44 43 45 48 61 6e |.if((**a|uxDCEHan|
|00001d50| 64 6c 65 29 2e 64 43 74 | 6c 46 6c 61 67 73 20 26 |dle).dCt|lFlags &|
|00001d60| 20 64 52 41 4d 42 61 73 | 65 64 4d 61 73 6b 29 7b | dRAMBas|edMask){|
|00001d70| 0d 09 09 09 2f 2a 20 52 | 41 4d 2d 62 61 73 65 64 |..../* R|AM-based|
|00001d80| 20 64 72 69 76 65 72 2e | 20 2a 2f 0d 09 09 09 73 | driver.| */....s|
|00001d90| 69 7a 65 3d 47 65 74 48 | 61 6e 64 6c 65 53 69 7a |ize=GetH|andleSiz|
|00001da0| 65 28 28 48 61 6e 64 6c | 65 29 28 2a 2a 61 75 78 |e((Handl|e)(**aux|
|00001db0| 44 43 45 48 61 6e 64 6c | 65 29 2e 64 43 74 6c 44 |DCEHandl|e).dCtlD|
|00001dc0| 72 69 76 65 72 29 3b 0d | 09 09 09 44 72 61 77 50 |river);.|...DrawP|
|00001dd0| 72 69 6e 74 66 28 22 2c | 20 6f 63 63 75 70 79 69 |rintf(",| occupyi|
|00001de0| 6e 67 20 25 6c 64 20 62 | 79 74 65 73 20 69 6e 20 |ng %ld b|ytes in |
|00001df0| 52 41 4d 2e 22 2c 73 69 | 7a 65 29 3b 0d 09 09 7d |RAM.",si|ze);...}|
|00001e00| 65 6c 73 65 7b 0d 09 09 | 09 2f 2a 20 52 4f 4d 2d |else{...|./* ROM-|
|00001e10| 62 61 73 65 64 20 64 72 | 69 76 65 72 2e 20 2a 2f |based dr|iver. */|
|00001e20| 0d 09 09 09 70 74 72 3d | 28 2a 2a 61 75 78 44 43 |....ptr=|(**auxDC|
|00001e30| 45 48 61 6e 64 6c 65 29 | 2e 64 43 74 6c 44 72 69 |EHandle)|.dCtlDri|
|00001e40| 76 65 72 3b 0d 09 09 09 | 47 65 73 74 61 6c 74 28 |ver;....|Gestalt(|
|00001e50| 67 65 73 74 61 6c 74 52 | 4f 4d 53 69 7a 65 2c 26 |gestaltR|OMSize,&|
|00001e60| 72 6f 6d 53 69 7a 65 29 | 3b 0d 09 09 09 47 65 73 |romSize)|;....Ges|
|00001e70| 74 61 6c 74 28 67 65 73 | 74 61 6c 74 52 4f 4d 56 |talt(ges|taltROMV|
|00001e80| 65 72 73 69 6f 6e 2c 26 | 72 6f 6d 56 65 72 73 69 |ersion,&|romVersi|
|00001e90| 6f 6e 29 3b 0d 09 09 09 | 44 72 61 77 50 72 69 6e |on);....|DrawPrin|
|00001ea0| 74 66 28 22 2c 20 61 74 | 20 30 78 25 6c 78 20 69 |tf(", at| 0x%lx i|
|00001eb0| 6e 20 52 4f 4d 2e 20 25 | 6c 64 20 4b 20 52 4f 4d |n ROM. %|ld K ROM|
|00001ec0| 20 76 65 72 73 69 6f 6e | 20 25 6c 64 20 28 25 6c | version| %ld (%l|
|00001ed0| 64 29 2e 22 0d 09 09 09 | 09 2c 70 74 72 2c 72 6f |d)."....|.,ptr,ro|
|00001ee0| 6d 53 69 7a 65 2f 31 30 | 32 34 2c 72 6f 6d 56 65 |mSize/10|24,romVe|
|00001ef0| 72 73 69 6f 6e 25 32 35 | 36 2c 28 72 6f 6d 56 65 |rsion%25|6,(romVe|
|00001f00| 72 73 69 6f 6e 2f 32 35 | 36 29 29 3b 0d 09 09 7d |rsion/25|6));...}|
|00001f10| 0d 09 09 44 72 61 77 50 | 72 69 6e 74 66 28 22 5c |...DrawP|rintf("\|
|00001f20| 6e 22 29 3b 0d 09 09 69 | 66 28 47 65 74 44 65 76 |n");...i|f(GetDev|
|00001f30| 69 63 65 53 6c 6f 74 28 | 64 65 76 69 63 65 29 3e |iceSlot(|device)>|
|00001f40| 3d 30 29 44 72 61 77 50 | 72 69 6e 74 66 28 22 53 |=0)DrawP|rintf("S|
|00001f50| 6c 6f 74 3a 20 25 64 5c | 6e 22 2c 28 69 6e 74 29 |lot: %d\|n",(int)|
|00001f60| 47 65 74 44 65 76 69 63 | 65 53 6c 6f 74 28 64 65 |GetDevic|eSlot(de|
|00001f70| 76 69 63 65 29 29 3b 0d | 09 09 65 6c 73 65 20 44 |vice));.|..else D|
|00001f80| 72 61 77 50 72 69 6e 74 | 66 28 22 53 6c 6f 74 3a |rawPrint|f("Slot:|
|00001f90| 20 6e 6f 6e 65 5c 6e 22 | 29 3b 0d 09 0d 09 09 44 | none\n"|);.....D|
|00001fa0| 72 61 77 50 72 69 6e 74 | 66 28 22 47 72 61 79 50 |rawPrint|f("GrayP|
|00001fb0| 61 67 65 3a 20 22 29 3b | 0d 09 09 69 66 28 65 72 |age: ");|...if(er|
|00001fc0| 72 6f 72 29 20 45 72 72 | 6f 72 28 65 72 72 6f 72 |ror) Err|or(error|
|00001fd0| 29 3b 0d 09 09 65 6c 73 | 65 20 44 72 61 77 50 72 |);...els|e DrawPr|
|00001fe0| 69 6e 74 66 28 22 6f 6b | 5c 6e 22 29 3b 0d 0d 09 |intf("ok|\n");...|
|00001ff0| 09 44 72 61 77 50 72 69 | 6e 74 66 28 22 63 73 63 |.DrawPri|ntf("csc|
|00002000| 47 65 74 4d 6f 64 65 3a | 20 22 29 3b 0d 09 09 65 |GetMode:| ");...e|
|00002010| 72 72 6f 72 3d 47 44 47 | 65 74 4d 6f 64 65 28 64 |rror=GDG|etMode(d|
|00002020| 65 76 69 63 65 2c 26 6d | 6f 64 65 2c 26 70 61 67 |evice,&m|ode,&pag|
|00002030| 65 2c 26 62 61 73 65 41 | 64 64 72 29 3b 0d 09 09 |e,&baseA|ddr);...|
|00002040| 69 66 28 65 72 72 6f 72 | 29 20 45 72 72 6f 72 28 |if(error|) Error(|
|00002050| 65 72 72 6f 72 29 3b 0d | 09 09 65 6c 73 65 20 44 |error);.|..else D|
|00002060| 72 61 77 50 72 69 6e 74 | 66 28 22 25 64 2d 62 69 |rawPrint|f("%d-bi|
|00002070| 74 20 6d 6f 64 65 2c 20 | 70 61 67 65 20 25 64 20 |t mode, |page %d |
|00002080| 62 61 73 65 20 61 64 64 | 72 65 73 73 20 30 78 25 |base add|ress 0x%|
|00002090| 6c 58 5c 6e 22 0d 09 09 | 09 2c 28 69 6e 74 29 47 |lX\n"...|.,(int)G|
|000020a0| 44 50 69 78 65 6c 53 69 | 7a 65 28 64 65 76 69 63 |DPixelSi|ze(devic|
|000020b0| 65 29 2c 28 69 6e 74 29 | 70 61 67 65 2c 62 61 73 |e),(int)|page,bas|
|000020c0| 65 41 64 64 72 29 3b 0d | 09 0d 09 09 44 72 61 77 |eAddr);.|....Draw|
|000020d0| 50 72 69 6e 74 66 28 22 | 63 73 63 53 65 74 4d 6f |Printf("|cscSetMo|
|000020e0| 64 65 3a 20 22 29 3b 0d | 09 09 65 72 72 6f 72 3d |de: ");.|..error=|
|000020f0| 47 44 53 65 74 4d 6f 64 | 65 28 64 65 76 69 63 65 |GDSetMod|e(device|
|00002100| 2c 6d 6f 64 65 2c 70 61 | 67 65 2c 26 62 61 73 65 |,mode,pa|ge,&base|
|00002110| 41 64 64 72 29 3b 0d 09 | 09 69 66 28 65 72 72 6f |Addr);..|.if(erro|
|00002120| 72 29 20 45 72 72 6f 72 | 28 65 72 72 6f 72 29 3b |r) Error|(error);|
|00002130| 0d 09 09 65 6c 73 65 20 | 44 72 61 77 50 72 69 6e |...else |DrawPrin|
|00002140| 74 66 28 22 6f 6b 5c 6e | 22 29 3b 0d 0d 09 09 2f |tf("ok\n|");..../|
|00002150| 2a 20 0d 09 09 09 47 44 | 53 65 74 4d 6f 64 65 20 |* ....GD|SetMode |
|00002160| 68 61 73 20 74 68 65 20 | 61 6e 6e 6f 79 69 6e 67 |has the |annoying|
|00002170| 20 73 69 64 65 20 65 66 | 66 65 63 74 20 6f 66 20 | side ef|fect of |
|00002180| 0d 09 09 09 73 65 74 74 | 69 6e 67 20 74 68 65 20 |....sett|ing the |
|00002190| 63 6c 75 74 20 74 6f 20 | 75 6e 69 66 6f 72 6d 20 |clut to |uniform |
|000021a0| 67 72 61 79 2c 20 73 6f | 20 6c 65 74 27 73 20 72 |gray, so| let's r|
|000021b0| 65 73 74 6f 72 65 20 74 | 68 65 20 63 6c 75 74 2e |estore t|he clut.|
|000021c0| 0d 09 09 2a 2f 0d 09 09 | 47 44 52 65 73 74 6f 72 |...*/...|GDRestor|
|000021d0| 65 44 65 76 69 63 65 43 | 6c 75 74 28 64 65 76 69 |eDeviceC|lut(devi|
|000021e0| 63 65 29 3b 0d 0d 09 09 | 66 6f 72 28 69 3d 30 78 |ce);....|for(i=0x|
|000021f0| 38 30 3b 69 3c 3d 30 78 | 38 35 3b 69 2b 2b 29 7b |80;i<=0x|85;i++){|
|00002200| 0d 09 09 09 70 69 78 65 | 6c 53 69 7a 65 3d 47 44 |....pixe|lSize=GD|
|00002210| 4d 6f 64 65 50 69 78 65 | 6c 53 69 7a 65 28 64 65 |ModePixe|lSize(de|
|00002220| 76 69 63 65 2c 69 29 3b | 0d 09 09 09 69 66 28 70 |vice,i);|....if(p|
|00002230| 69 78 65 6c 53 69 7a 65 | 3e 30 29 7b 0d 09 09 09 |ixelSize|>0){....|
|00002240| 09 44 72 61 77 50 72 69 | 6e 74 66 28 22 63 73 63 |.DrawPri|ntf("csc|
|00002250| 47 65 74 50 61 67 65 43 | 6e 74 3a 20 22 29 3b 0d |GetPageC|nt: ");.|
|00002260| 09 09 09 09 65 72 72 6f | 72 3d 47 44 47 65 74 50 |....erro|r=GDGetP|
|00002270| 61 67 65 43 6e 74 28 64 | 65 76 69 63 65 2c 69 2c |ageCnt(d|evice,i,|
|00002280| 26 70 61 67 65 73 29 3b | 0d 09 09 09 09 69 66 28 |&pages);|.....if(|
|00002290| 65 72 72 6f 72 29 44 72 | 61 77 50 72 69 6e 74 66 |error)Dr|awPrintf|
|000022a0| 28 22 25 64 2d 62 69 74 | 20 6d 6f 64 65 20 6e 2f |("%d-bit| mode n/|
|000022b0| 61 5c 6e 22 2c 28 69 6e | 74 29 70 69 78 65 6c 53 |a\n",(in|t)pixelS|
|000022c0| 69 7a 65 29 3b 0d 09 09 | 09 09 65 6c 73 65 20 44 |ize);...|..else D|
|000022d0| 72 61 77 50 72 69 6e 74 | 66 28 22 25 64 2d 62 69 |rawPrint|f("%d-bi|
|000022e0| 74 20 6d 6f 64 65 20 68 | 61 73 20 25 64 20 70 61 |t mode h|as %d pa|
|000022f0| 67 65 73 20 61 76 61 69 | 6c 61 62 6c 65 5c 6e 22 |ges avai|lable\n"|
|00002300| 2c 28 69 6e 74 29 70 69 | 78 65 6c 53 69 7a 65 2c |,(int)pi|xelSize,|
|00002310| 28 69 6e 74 29 70 61 67 | 65 73 29 3b 0d 09 09 09 |(int)pag|es);....|
|00002320| 7d 0d 09 09 7d 0d 0d 09 | 09 44 72 61 77 50 72 69 |}...}...|.DrawPri|
|00002330| 6e 74 66 28 22 63 73 63 | 47 65 74 50 61 67 65 42 |ntf("csc|GetPageB|
|00002340| 61 73 65 3a 20 22 29 3b | 0d 09 09 70 61 67 65 3d |ase: ");|...page=|
|00002350| 30 3b 09 2f 2a 20 41 73 | 6b 20 66 6f 72 20 66 69 |0;./* As|k for fi|
|00002360| 72 73 74 20 70 61 67 65 | 20 2a 2f 0d 09 09 65 72 |rst page| */...er|
|00002370| 72 6f 72 3d 47 44 47 65 | 74 50 61 67 65 42 61 73 |ror=GDGe|tPageBas|
|00002380| 65 28 64 65 76 69 63 65 | 2c 70 61 67 65 2c 26 62 |e(device|,page,&b|
|00002390| 61 73 65 41 64 64 72 29 | 3b 0d 09 09 69 66 28 65 |aseAddr)|;...if(e|
|000023a0| 72 72 6f 72 29 20 45 72 | 72 6f 72 28 65 72 72 6f |rror) Er|ror(erro|
|000023b0| 72 29 3b 0d 09 09 65 6c | 73 65 20 44 72 61 77 50 |r);...el|se DrawP|
|000023c0| 72 69 6e 74 66 28 22 25 | 64 2d 62 69 74 20 6d 6f |rintf("%|d-bit mo|
|000023d0| 64 65 2c 20 70 61 67 65 | 20 25 64 20 62 61 73 65 |de, page| %d base|
|000023e0| 20 61 64 64 72 65 73 73 | 20 30 78 25 6c 58 5c 6e | address| 0x%lX\n|
|000023f0| 22 0d 09 09 09 2c 28 69 | 6e 74 29 47 44 4d 6f 64 |"....,(i|nt)GDMod|
|00002400| 65 50 69 78 65 6c 53 69 | 7a 65 28 64 65 76 69 63 |ePixelSi|ze(devic|
|00002410| 65 2c 6d 6f 64 65 29 2c | 28 69 6e 74 29 70 61 67 |e,mode),|(int)pag|
|00002420| 65 2c 62 61 73 65 41 64 | 64 72 29 3b 0d 09 09 69 |e,baseAd|dr);...i|
|00002430| 66 28 70 61 67 65 73 3e | 31 29 7b 0d 09 09 09 44 |f(pages>|1){....D|
|00002440| 72 61 77 50 72 69 6e 74 | 66 28 22 63 73 63 47 65 |rawPrint|f("cscGe|
|00002450| 74 50 61 67 65 42 61 73 | 65 3a 20 22 29 3b 0d 09 |tPageBas|e: ");..|
|00002460| 09 09 70 61 67 65 3d 31 | 3b 09 2f 2a 20 41 73 6b |..page=1|;./* Ask|
|00002470| 20 66 6f 72 20 73 65 63 | 6f 6e 64 20 70 61 67 65 | for sec|ond page|
|00002480| 20 2a 2f 0d 09 09 09 65 | 72 72 6f 72 3d 47 44 47 | */....e|rror=GDG|
|00002490| 65 74 50 61 67 65 42 61 | 73 65 28 64 65 76 69 63 |etPageBa|se(devic|
|000024a0| 65 2c 70 61 67 65 2c 26 | 62 61 73 65 41 64 64 72 |e,page,&|baseAddr|
|000024b0| 29 3b 0d 09 09 09 69 66 | 28 65 72 72 6f 72 29 20 |);....if|(error) |
|000024c0| 45 72 72 6f 72 28 65 72 | 72 6f 72 29 3b 0d 09 09 |Error(er|ror);...|
|000024d0| 09 65 6c 73 65 20 44 72 | 61 77 50 72 69 6e 74 66 |.else Dr|awPrintf|
|000024e0| 28 22 25 64 2d 62 69 74 | 20 6d 6f 64 65 2c 20 70 |("%d-bit| mode, p|
|000024f0| 61 67 65 20 25 64 20 62 | 61 73 65 20 61 64 64 72 |age %d b|ase addr|
|00002500| 65 73 73 20 30 78 25 6c | 58 5c 6e 22 0d 09 09 09 |ess 0x%l|X\n"....|
|00002510| 09 2c 28 69 6e 74 29 47 | 44 4d 6f 64 65 50 69 78 |.,(int)G|DModePix|
|00002520| 65 6c 53 69 7a 65 28 64 | 65 76 69 63 65 2c 6d 6f |elSize(d|evice,mo|
|00002530| 64 65 29 2c 28 69 6e 74 | 29 70 61 67 65 2c 62 61 |de),(int|)page,ba|
|00002540| 73 65 41 64 64 72 29 3b | 0d 09 09 7d 0d 09 0d 09 |seAddr);|...}....|
|00002550| 09 44 72 61 77 50 72 69 | 6e 74 66 28 22 63 73 63 |.DrawPri|ntf("csc|
|00002560| 47 65 74 47 72 61 79 3a | 20 22 29 3b 0d 09 09 65 |GetGray:| ");...e|
|00002570| 72 72 6f 72 3d 47 44 47 | 65 74 47 72 61 79 28 64 |rror=GDG|etGray(d|
|00002580| 65 76 69 63 65 2c 26 66 | 6c 61 67 29 3b 0d 09 09 |evice,&f|lag);...|
|00002590| 69 66 28 65 72 72 6f 72 | 29 20 45 72 72 6f 72 28 |if(error|) Error(|
|000025a0| 65 72 72 6f 72 29 3b 0d | 09 09 65 6c 73 65 20 44 |error);.|..else D|
|000025b0| 72 61 77 50 72 69 6e 74 | 66 28 22 66 6c 61 67 20 |rawPrint|f("flag |
|000025c0| 25 64 5c 6e 22 2c 28 69 | 6e 74 29 66 6c 61 67 29 |%d\n",(i|nt)flag)|
|000025d0| 3b 0d 09 0d 09 09 44 72 | 61 77 50 72 69 6e 74 66 |;.....Dr|awPrintf|
|000025e0| 28 22 63 73 63 53 65 74 | 47 72 61 79 3a 20 22 29 |("cscSet|Gray: ")|
|000025f0| 3b 0d 09 09 66 6c 61 67 | 3d 30 3b 0d 09 09 65 72 |;...flag|=0;...er|
|00002600| 72 6f 72 3d 47 44 53 65 | 74 47 72 61 79 28 64 65 |ror=GDSe|tGray(de|
|00002610| 76 69 63 65 2c 66 6c 61 | 67 29 3b 0d 09 09 69 66 |vice,fla|g);...if|
|00002620| 28 65 72 72 6f 72 29 20 | 45 72 72 6f 72 28 65 72 |(error) |Error(er|
|00002630| 72 6f 72 29 3b 0d 09 09 | 65 6c 73 65 20 44 72 61 |ror);...|else Dra|
|00002640| 77 50 72 69 6e 74 66 28 | 22 6f 6b 5c 6e 22 29 3b |wPrintf(|"ok\n");|
|00002650| 0d 09 0d 09 09 2f 2a 20 | 47 65 74 49 6e 74 65 72 |...../* |GetInter|
|00002660| 72 75 70 74 20 63 72 61 | 73 68 65 73 20 74 68 65 |rupt cra|shes the|
|00002670| 20 4e 75 56 69 73 74 61 | 20 64 72 69 76 65 72 2e | NuVista| driver.|
|00002680| 20 20 2a 2f 0d 09 09 69 | 66 28 21 45 71 75 61 6c | */...i|f(!Equal|
|00002690| 53 74 72 69 6e 67 28 22 | 5c 70 2e 44 69 73 70 6c |String("|\p.Displ|
|000026a0| 61 79 5f 56 69 64 65 6f | 5f 4e 75 56 69 73 74 61 |ay_Video|_NuVista|
|000026b0| 22 2c 47 44 4e 61 6d 65 | 28 64 65 76 69 63 65 29 |",GDName|(device)|
|000026c0| 2c 30 2c 30 29 29 7b 0d | 09 09 09 2f 2a 20 53 65 |,0,0)){.|.../* Se|
|000026d0| 74 49 6e 74 65 72 72 75 | 70 74 20 63 72 61 73 68 |tInterru|pt crash|
|000026e0| 65 73 20 74 68 65 20 6f | 6c 64 20 41 70 70 6c 65 |es the o|ld Apple|
|000026f0| 20 64 72 69 76 65 72 2e | 20 20 2a 2f 0d 09 09 09 | driver.| */....|
|00002700| 69 66 28 73 79 73 74 65 | 6d 56 65 72 73 69 6f 6e |if(syste|mVersion|
|00002710| 3e 3d 30 78 36 30 35 29 | 7b 0d 09 09 09 09 44 72 |>=0x605)|{.....Dr|
|00002720| 61 77 50 72 69 6e 74 66 | 28 22 63 73 63 47 65 74 |awPrintf|("cscGet|
|00002730| 49 6e 74 65 72 72 75 70 | 74 3a 20 22 29 3b 0d 09 |Interrup|t: ");..|
|00002740| 09 09 09 65 72 72 6f 72 | 3d 47 44 47 65 74 49 6e |...error|=GDGetIn|
|00002750| 74 65 72 72 75 70 74 28 | 64 65 76 69 63 65 2c 26 |terrupt(|device,&|
|00002760| 66 6c 61 67 29 3b 0d 09 | 09 09 09 69 66 28 65 72 |flag);..|...if(er|
|00002770| 72 6f 72 29 20 45 72 72 | 6f 72 28 65 72 72 6f 72 |ror) Err|or(error|
|00002780| 29 3b 0d 09 09 09 09 65 | 6c 73 65 20 44 72 61 77 |);.....e|lse Draw|
|00002790| 50 72 69 6e 74 66 28 22 | 25 64 5c 6e 22 2c 28 69 |Printf("|%d\n",(i|
|000027a0| 6e 74 29 66 6c 61 67 29 | 3b 0d 09 09 0d 09 09 09 |nt)flag)|;.......|
|000027b0| 09 69 66 28 30 29 7b 0d | 09 09 09 09 09 2f 2f 20 |.if(0){.|.....// |
|000027c0| 64 69 73 61 62 6c 65 64 | 20 27 63 61 75 73 65 20 |disabled| 'cause |
|000027d0| 69 74 20 63 72 61 73 68 | 65 73 20 62 75 69 6c 74 |it crash|es built|
|000027e0| 2d 69 6e 20 76 69 64 65 | 6f 20 6f 6e 20 50 6f 77 |-in vide|o on Pow|
|000027f0| 65 72 42 6f 6f 6b 20 31 | 36 30 0d 09 09 09 09 09 |erBook 1|60......|
|00002800| 44 72 61 77 50 72 69 6e | 74 66 28 22 63 73 63 53 |DrawPrin|tf("cscS|
|00002810| 65 74 49 6e 74 65 72 72 | 75 70 74 3a 20 22 29 3b |etInterr|upt: ");|
|00002820| 0d 09 09 09 09 09 65 72 | 72 6f 72 3d 47 44 53 65 |......er|ror=GDSe|
|00002830| 74 49 6e 74 65 72 72 75 | 70 74 28 64 65 76 69 63 |tInterru|pt(devic|
|00002840| 65 2c 66 6c 61 67 29 3b | 0d 09 09 09 09 09 69 66 |e,flag);|......if|
|00002850| 28 65 72 72 6f 72 29 20 | 45 72 72 6f 72 28 65 72 |(error) |Error(er|
|00002860| 72 6f 72 29 3b 0d 09 09 | 09 09 09 65 6c 73 65 20 |ror);...|...else |
|00002870| 44 72 61 77 50 72 69 6e | 74 66 28 22 6f 6b 5c 6e |DrawPrin|tf("ok\n|
|00002880| 22 29 3b 0d 09 09 09 09 | 7d 0d 09 09 09 7d 0d 09 |");.....|}....}..|
|00002890| 09 09 65 6c 73 65 20 44 | 72 61 77 50 72 69 6e 74 |..else D|rawPrint|
|000028a0| 66 28 22 a5 a5 a5 a5 a5 | 53 6b 69 70 70 69 6e 67 |f(".....|Skipping|
|000028b0| 20 47 65 74 49 6e 74 65 | 72 72 75 70 74 20 26 20 | GetInte|rrupt & |
|000028c0| 53 65 74 49 6e 74 65 72 | 72 75 70 74 2e 5c 6e 22 |SetInter|rupt.\n"|
|000028d0| 29 3b 0d 09 09 7d 0d 09 | 09 65 6c 73 65 20 44 72 |);...}..|.else Dr|
|000028e0| 61 77 50 72 69 6e 74 66 | 28 22 a5 a5 a5 a5 a5 53 |awPrintf|(".....S|
|000028f0| 6b 69 70 70 69 6e 67 20 | 47 65 74 49 6e 74 65 72 |kipping |GetInter|
|00002900| 72 75 70 74 20 26 20 53 | 65 74 49 6e 74 65 72 72 |rupt & S|etInterr|
|00002910| 75 70 74 20 74 6f 20 61 | 76 6f 69 64 20 6b 6e 6f |upt to a|void kno|
|00002920| 77 6e 20 62 75 67 20 69 | 6e 20 25 73 2e 5c 6e 22 |wn bug i|n %s.\n"|
|00002930| 2c 47 44 43 61 72 64 4e | 61 6d 65 28 64 65 76 69 |,GDCardN|ame(devi|
|00002940| 63 65 29 29 3b 0d 0d 09 | 09 44 72 61 77 50 72 69 |ce));...|.DrawPri|
|00002950| 6e 74 66 28 22 63 73 63 | 47 65 74 47 61 6d 6d 61 |ntf("csc|GetGamma|
|00002960| 3a 20 22 29 3b 0d 09 09 | 67 61 6d 6d 61 3d 4e 55 |: ");...|gamma=NU|
|00002970| 4c 4c 3b 0d 09 09 65 72 | 72 6f 72 3d 47 44 47 65 |LL;...er|ror=GDGe|
|00002980| 74 47 61 6d 6d 61 28 64 | 65 76 69 63 65 2c 26 67 |tGamma(d|evice,&g|
|00002990| 61 6d 6d 61 29 3b 0d 09 | 09 69 66 28 65 72 72 6f |amma);..|.if(erro|
|000029a0| 72 29 20 45 72 72 6f 72 | 28 65 72 72 6f 72 29 3b |r) Error|(error);|
|000029b0| 0d 09 09 65 6c 73 65 20 | 47 61 6d 6d 61 52 65 70 |...else |GammaRep|
|000029c0| 6f 72 74 28 67 61 6d 6d | 61 29 3b 0d 09 09 69 66 |ort(gamm|a);...if|
|000029d0| 28 21 65 72 72 6f 72 20 | 26 26 20 67 61 6d 6d 61 |(!error |&& gamma|
|000029e0| 21 3d 4e 55 4c 4c 29 67 | 61 6d 6d 61 44 61 74 61 |!=NULL)g|ammaData|
|000029f0| 57 69 64 74 68 3d 67 61 | 6d 6d 61 2d 3e 67 44 61 |Width=ga|mma->gDa|
|00002a00| 74 61 57 69 64 74 68 3b | 0d 09 09 65 6c 73 65 20 |taWidth;|...else |
|00002a10| 67 61 6d 6d 61 44 61 74 | 61 57 69 64 74 68 3d 30 |gammaDat|aWidth=0|
|00002a20| 3b 0d 09 09 0d 09 09 44 | 72 61 77 50 72 69 6e 74 |;......D|rawPrint|
|00002a30| 66 28 22 63 73 63 53 65 | 74 47 61 6d 6d 61 3a 20 |f("cscSe|tGamma: |
|00002a40| 22 29 3b 0d 09 09 69 66 | 28 67 61 6d 6d 61 3d 3d |");...if|(gamma==|
|00002a50| 4e 55 4c 4c 20 7c 7c 20 | 67 61 6d 6d 61 2d 3e 67 |NULL || |gamma->g|
|00002a60| 44 61 74 61 57 69 64 74 | 68 3d 3d 30 29 7b 0d 09 |DataWidt|h==0){..|
|00002a70| 09 09 2f 2f 20 47 65 74 | 20 74 68 65 20 64 61 63 |..// Get| the dac|
|00002a80| 27 73 20 73 69 7a 65 20 | 66 72 6f 6d 20 74 68 65 |'s size |from the|
|00002a90| 20 63 75 72 72 65 6e 74 | 20 67 61 6d 6d 61 20 74 | current| gamma t|
|00002aa0| 61 62 6c 65 2e 0d 09 09 | 09 69 66 28 67 61 6d 6d |able....|.if(gamm|
|00002ab0| 61 21 3d 4e 55 4c 4c 20 | 26 26 20 67 61 6d 6d 61 |a!=NULL |&& gamma|
|00002ac0| 2d 3e 67 44 61 74 61 57 | 69 64 74 68 21 3d 30 29 |->gDataW|idth!=0)|
|00002ad0| 7b 0d 09 09 09 09 64 61 | 63 53 69 7a 65 3d 67 61 |{.....da|cSize=ga|
|00002ae0| 6d 6d 61 2d 3e 67 44 61 | 74 61 57 69 64 74 68 3b |mma->gDa|taWidth;|
|00002af0| 0d 09 09 09 09 64 61 74 | 61 43 6e 74 3d 67 61 6d |.....dat|aCnt=gam|
|00002b00| 6d 61 2d 3e 67 44 61 74 | 61 43 6e 74 3b 0d 09 09 |ma->gDat|aCnt;...|
|00002b10| 09 7d 65 6c 73 65 7b 20 | 2f 2f 20 54 68 65 20 64 |.}else{ |// The d|
|00002b20| 72 69 76 65 72 20 77 6f | 6e 27 74 20 74 65 6c 6c |river wo|n't tell|
|00002b30| 20 75 73 2c 20 73 6f 20 | 61 73 73 75 6d 65 20 38 | us, so |assume 8|
|00002b40| 2d 62 69 74 20 64 61 63 | 73 2e 0d 09 09 09 09 64 |-bit dac|s......d|
|00002b50| 61 63 53 69 7a 65 3d 38 | 3b 0d 09 09 09 09 64 61 |acSize=8|;.....da|
|00002b60| 74 61 43 6e 74 3d 31 4c | 3c 3c 64 61 63 53 69 7a |taCnt=1L|<<dacSiz|
|00002b70| 65 3b 0d 09 09 09 7d 0d | 09 09 09 69 66 28 64 61 |e;....}.|...if(da|
|00002b80| 63 53 69 7a 65 3c 3d 38 | 29 64 61 74 61 53 69 7a |cSize<=8|)dataSiz|
|00002b90| 65 3d 31 3b 0d 09 09 09 | 65 6c 73 65 20 64 61 74 |e=1;....|else dat|
|00002ba0| 61 53 69 7a 65 3d 32 3b | 0d 09 09 09 6d 79 47 61 |aSize=2;|....myGa|
|00002bb0| 6d 6d 61 3d 28 47 61 6d | 6d 61 54 62 6c 20 2a 29 |mma=(Gam|maTbl *)|
|00002bc0| 4e 65 77 50 74 72 28 73 | 69 7a 65 6f 66 28 47 61 |NewPtr(s|izeof(Ga|
|00002bd0| 6d 6d 61 54 62 6c 29 2b | 64 61 74 61 43 6e 74 2a |mmaTbl)+|dataCnt*|
|00002be0| 64 61 74 61 53 69 7a 65 | 29 3b 0d 09 09 09 61 73 |dataSize|);....as|
|00002bf0| 73 65 72 74 28 6d 79 47 | 61 6d 6d 61 21 3d 4e 55 |sert(myG|amma!=NU|
|00002c00| 4c 4c 29 3b 0d 09 09 09 | 6d 79 47 61 6d 6d 61 2d |LL);....|myGamma-|
|00002c10| 3e 67 56 65 72 73 69 6f | 6e 3d 30 3b 0d 09 09 09 |>gVersio|n=0;....|
|00002c20| 6d 79 47 61 6d 6d 61 2d | 3e 67 54 79 70 65 3d 30 |myGamma-|>gType=0|
|00002c30| 3b 0d 09 09 09 6d 79 47 | 61 6d 6d 61 2d 3e 67 46 |;....myG|amma->gF|
|00002c40| 6f 72 6d 75 6c 61 53 69 | 7a 65 3d 30 3b 0d 09 09 |ormulaSi|ze=0;...|
|00002c50| 09 6d 79 47 61 6d 6d 61 | 2d 3e 67 43 68 61 6e 43 |.myGamma|->gChanC|
|00002c60| 6e 74 3d 31 3b 0d 09 09 | 09 6d 79 47 61 6d 6d 61 |nt=1;...|.myGamma|
|00002c70| 2d 3e 67 44 61 74 61 43 | 6e 74 3d 64 61 74 61 43 |->gDataC|nt=dataC|
|00002c80| 6e 74 3b 0d 09 09 09 6d | 79 47 61 6d 6d 61 2d 3e |nt;....m|yGamma->|
|00002c90| 67 44 61 74 61 57 69 64 | 74 68 3d 64 61 63 53 69 |gDataWid|th=dacSi|
|00002ca0| 7a 65 3b 0d 09 09 09 62 | 79 74 65 3d 28 75 6e 73 |ze;....b|yte=(uns|
|00002cb0| 69 67 6e 65 64 20 63 68 | 61 72 20 2a 29 6d 79 47 |igned ch|ar *)myG|
|00002cc0| 61 6d 6d 61 2d 3e 67 46 | 6f 72 6d 75 6c 61 44 61 |amma->gF|ormulaDa|
|00002cd0| 74 61 2b 6d 79 47 61 6d | 6d 61 2d 3e 67 46 6f 72 |ta+myGam|ma->gFor|
|00002ce0| 6d 75 6c 61 53 69 7a 65 | 3b 0d 09 09 09 77 6f 72 |mulaSize|;....wor|
|00002cf0| 64 3d 28 75 6e 73 69 67 | 6e 65 64 20 73 68 6f 72 |d=(unsig|ned shor|
|00002d00| 74 20 2a 29 62 79 74 65 | 3b 0d 09 09 09 69 66 28 |t *)byte|;....if(|
|00002d10| 6d 79 47 61 6d 6d 61 2d | 3e 67 44 61 74 61 57 69 |myGamma-|>gDataWi|
|00002d20| 64 74 68 3c 3d 38 29 0d | 09 09 09 09 66 6f 72 28 |dth<=8).|....for(|
|00002d30| 69 3d 30 3b 69 3c 6d 79 | 47 61 6d 6d 61 2d 3e 67 |i=0;i<my|Gamma->g|
|00002d40| 44 61 74 61 43 6e 74 3b | 69 2b 2b 29 20 62 79 74 |DataCnt;|i++) byt|
|00002d50| 65 5b 69 5d 3d 69 3b 0d | 09 09 09 65 6c 73 65 0d |e[i]=i;.|...else.|
|00002d60| 09 09 09 09 66 6f 72 28 | 69 3d 30 3b 69 3c 6d 79 |....for(|i=0;i<my|
|00002d70| 47 61 6d 6d 61 2d 3e 67 | 44 61 74 61 43 6e 74 3b |Gamma->g|DataCnt;|
|00002d80| 69 2b 2b 29 20 77 6f 72 | 64 5b 69 5d 3d 69 3b 0d |i++) wor|d[i]=i;.|
|00002d90| 09 09 09 67 61 6d 6d 61 | 3d 6d 79 47 61 6d 6d 61 |...gamma|=myGamma|
|00002da0| 3b 0d 09 09 7d 65 6c 73 | 65 20 6d 79 47 61 6d 6d |;...}els|e myGamm|
|00002db0| 61 3d 4e 55 4c 4c 3b 0d | 09 09 65 72 72 6f 72 3d |a=NULL;.|..error=|
|00002dc0| 47 44 53 65 74 47 61 6d | 6d 61 28 64 65 76 69 63 |GDSetGam|ma(devic|
|00002dd0| 65 2c 67 61 6d 6d 61 29 | 3b 0d 09 09 69 66 28 65 |e,gamma)|;...if(e|
|00002de0| 72 72 6f 72 29 20 45 72 | 72 6f 72 28 65 72 72 6f |rror) Er|ror(erro|
|00002df0| 72 29 3b 0d 09 09 65 6c | 73 65 20 44 72 61 77 50 |r);...el|se DrawP|
|00002e00| 72 69 6e 74 66 28 22 6f | 6b 2e 5c 6e 22 29 3b 0d |rintf("o|k.\n");.|
|00002e10| 09 09 69 66 28 6d 79 47 | 61 6d 6d 61 21 3d 4e 55 |..if(myG|amma!=NU|
|00002e20| 4c 4c 29 7b 0d 09 09 09 | 44 69 73 70 6f 73 50 74 |LL){....|DisposPt|
|00002e30| 72 28 28 50 74 72 29 6d | 79 47 61 6d 6d 61 29 3b |r((Ptr)m|yGamma);|
|00002e40| 0d 09 09 09 6d 79 47 61 | 6d 6d 61 3d 4e 55 4c 4c |....myGa|mma=NULL|
|00002e50| 3b 0d 09 09 7d 0d 0d 09 | 44 72 61 77 50 72 69 6e |;...}...|DrawPrin|
|00002e60| 74 66 28 22 63 73 63 47 | 65 74 47 61 6d 6d 61 3a |tf("cscG|etGamma:|
|00002e70| 20 22 29 3b 0d 09 67 61 | 6d 6d 61 3d 4e 55 4c 4c | ");..ga|mma=NULL|
|00002e80| 3b 0d 09 65 72 72 6f 72 | 3d 47 44 47 65 74 47 61 |;..error|=GDGetGa|
|00002e90| 6d 6d 61 28 64 65 76 69 | 63 65 2c 26 67 61 6d 6d |mma(devi|ce,&gamm|
|00002ea0| 61 29 3b 0d 09 69 66 28 | 65 72 72 6f 72 29 20 45 |a);..if(|error) E|
|00002eb0| 72 72 6f 72 28 65 72 72 | 6f 72 29 3b 0d 09 65 6c |rror(err|or);..el|
|00002ec0| 73 65 20 47 61 6d 6d 61 | 52 65 70 6f 72 74 28 67 |se Gamma|Report(g|
|00002ed0| 61 6d 6d 61 29 3b 0d 09 | 69 66 28 21 65 72 72 6f |amma);..|if(!erro|
|00002ee0| 72 20 26 26 20 67 61 6d | 6d 61 21 3d 4e 55 4c 4c |r && gam|ma!=NULL|
|00002ef0| 29 67 61 6d 6d 61 44 61 | 74 61 57 69 64 74 68 3d |)gammaDa|taWidth=|
|00002f00| 67 61 6d 6d 61 2d 3e 67 | 44 61 74 61 57 69 64 74 |gamma->g|DataWidt|
|00002f10| 68 3b 0d 09 65 6c 73 65 | 20 67 61 6d 6d 61 44 61 |h;..else| gammaDa|
|00002f20| 74 61 57 69 64 74 68 3d | 30 3b 0d 09 0d 09 09 2f |taWidth=|0;...../|
|00002f30| 2f 20 63 73 63 47 65 74 | 45 6e 74 72 69 65 73 0d |/ cscGet|Entries.|
|00002f40| 09 09 73 74 61 72 74 3d | 30 3b 0d 09 09 63 6f 75 |..start=|0;...cou|
|00002f50| 6e 74 3d 47 44 43 6c 75 | 74 53 69 7a 65 28 64 65 |nt=GDClu|tSize(de|
|00002f60| 76 69 63 65 29 2d 31 3b | 0d 09 09 69 66 28 63 6f |vice)-1;|...if(co|
|00002f70| 75 6e 74 3e 73 69 7a 65 | 6f 66 28 6d 79 54 61 62 |unt>size|of(myTab|
|00002f80| 6c 65 29 2f 73 69 7a 65 | 6f 66 28 6d 79 54 61 62 |le)/size|of(myTab|
|00002f90| 6c 65 5b 30 5d 29 2d 31 | 29 0d 09 09 09 63 6f 75 |le[0])-1|)....cou|
|00002fa0| 6e 74 3d 73 69 7a 65 6f | 66 28 6d 79 54 61 62 6c |nt=sizeo|f(myTabl|
|00002fb0| 65 29 2f 73 69 7a 65 6f | 66 28 6d 79 54 61 62 6c |e)/sizeo|f(myTabl|
|00002fc0| 65 5b 30 5d 29 2d 31 3b | 0d 09 09 44 72 61 77 50 |e[0])-1;|...DrawP|
|00002fd0| 72 69 6e 74 66 28 22 63 | 73 63 47 65 74 45 6e 74 |rintf("c|scGetEnt|
|00002fe0| 72 69 65 73 3a 20 22 29 | 3b 0d 09 09 65 72 72 6f |ries: ")|;...erro|
|00002ff0| 72 3d 47 44 47 65 74 45 | 6e 74 72 69 65 73 28 64 |r=GDGetE|ntries(d|
|00003000| 65 76 69 63 65 2c 73 74 | 61 72 74 2c 63 6f 75 6e |evice,st|art,coun|
|00003010| 74 2c 6d 79 54 61 62 6c | 65 29 3b 0d 09 09 69 66 |t,myTabl|e);...if|
|00003020| 28 65 72 72 6f 72 29 45 | 72 72 6f 72 28 65 72 72 |(error)E|rror(err|
|00003030| 6f 72 29 3b 0d 09 09 65 | 6c 73 65 20 44 72 61 77 |or);...e|lse Draw|
|00003040| 50 72 69 6e 74 66 28 22 | 6f 6b 5c 6e 22 29 3b 0d |Printf("|ok\n");.|
|00003050| 09 09 0d 09 09 2f 2f 20 | 63 73 63 53 65 74 45 6e |.....// |cscSetEn|
|00003060| 74 72 69 65 73 0d 09 09 | 63 6f 75 6e 74 3d 47 44 |tries...|count=GD|
|00003070| 43 6c 75 74 53 69 7a 65 | 28 64 65 76 69 63 65 29 |ClutSize|(device)|
|00003080| 2d 31 3b 0d 09 09 73 77 | 69 74 63 68 28 28 2a 64 |-1;...sw|itch((*d|
|00003090| 65 76 69 63 65 29 2d 3e | 67 64 54 79 70 65 29 7b |evice)->|gdType){|
|000030a0| 0d 09 09 09 63 61 73 65 | 20 63 6c 75 74 54 79 70 |....case| clutTyp|
|000030b0| 65 3a 0d 09 09 09 09 44 | 72 61 77 50 72 69 6e 74 |e:.....D|rawPrint|
|000030c0| 66 28 22 63 73 63 53 65 | 74 45 6e 74 72 69 65 73 |f("cscSe|tEntries|
|000030d0| 3a 20 22 29 3b 0d 09 09 | 09 09 65 72 72 6f 72 3d |: ");...|..error=|
|000030e0| 47 44 53 65 74 45 6e 74 | 72 69 65 73 28 64 65 76 |GDSetEnt|ries(dev|
|000030f0| 69 63 65 2c 30 2c 63 6f | 75 6e 74 2c 28 28 2a 2a |ice,0,co|unt,((**|
|00003100| 28 2a 2a 28 2a 2a 64 65 | 76 69 63 65 29 2e 67 64 |(**(**de|vice).gd|
|00003110| 50 4d 61 70 29 2e 70 6d | 54 61 62 6c 65 29 29 2e |PMap).pm|Table)).|
|00003120| 63 74 54 61 62 6c 65 29 | 3b 0d 09 09 09 09 69 66 |ctTable)|;.....if|
|00003130| 28 65 72 72 6f 72 29 45 | 72 72 6f 72 28 65 72 72 |(error)E|rror(err|
|00003140| 6f 72 29 3b 0d 09 09 09 | 09 65 6c 73 65 20 44 72 |or);....|.else Dr|
|00003150| 61 77 50 72 69 6e 74 66 | 28 22 6f 6b 5c 6e 22 29 |awPrintf|("ok\n")|
|00003160| 3b 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |;.....br|eak;....|
|00003170| 63 61 73 65 20 64 69 72 | 65 63 74 54 79 70 65 3a |case dir|ectType:|
|00003180| 0d 09 09 09 09 44 72 61 | 77 50 72 69 6e 74 66 28 |.....Dra|wPrintf(|
|00003190| 22 44 69 72 65 63 74 53 | 65 74 45 6e 74 72 69 65 |"DirectS|etEntrie|
|000031a0| 73 3a 20 22 29 3b 0d 09 | 09 09 09 65 72 72 6f 72 |s: ");..|...error|
|000031b0| 3d 47 44 44 69 72 65 63 | 74 53 65 74 45 6e 74 72 |=GDDirec|tSetEntr|
|000031c0| 69 65 73 28 64 65 76 69 | 63 65 2c 30 2c 30 2c 26 |ies(devi|ce,0,0,&|
|000031d0| 62 6c 61 63 6b 29 3b 0d | 09 09 09 09 69 66 28 65 |black);.|....if(e|
|000031e0| 72 72 6f 72 29 45 72 72 | 6f 72 28 65 72 72 6f 72 |rror)Err|or(error|
|000031f0| 29 3b 0d 09 09 09 09 65 | 6c 73 65 20 44 72 61 77 |);.....e|lse Draw|
|00003200| 50 72 69 6e 74 66 28 22 | 6f 6b 5c 6e 22 29 3b 0d |Printf("|ok\n");.|
|00003210| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 63 61 |....brea|k;....ca|
|00003220| 73 65 20 66 69 78 65 64 | 54 79 70 65 3a 0d 09 09 |se fixed|Type:...|
|00003230| 09 09 44 72 61 77 50 72 | 69 6e 74 66 28 22 41 20 |..DrawPr|intf("A |
|00003240| 66 69 78 65 64 54 79 70 | 65 20 63 6c 75 74 20 63 |fixedTyp|e clut c|
|00003250| 61 6e 6e 6f 74 20 62 65 | 20 6d 6f 64 69 66 69 65 |annot be| modifie|
|00003260| 64 2e 5c 6e 22 29 3b 0d | 09 09 09 09 62 72 65 61 |d.\n");.|....brea|
|00003270| 6b 3b 0d 09 09 7d 0d 09 | 09 0d 09 09 2f 2f 20 4d |k;...}..|....// M|
|00003280| 69 73 63 65 6c 6c 61 6e | 65 6f 75 73 0d 09 09 63 |iscellan|eous...c|
|00003290| 6c 75 74 53 69 7a 65 3d | 47 44 43 6c 75 74 53 69 |lutSize=|GDClutSi|
|000032a0| 7a 65 28 64 65 76 69 63 | 65 29 3b 0d 09 09 70 69 |ze(devic|e);...pi|
|000032b0| 78 65 6c 53 69 7a 65 3d | 31 3c 3c 28 6d 6f 64 65 |xelSize=|1<<(mode|
|000032c0| 26 37 29 3b 0d 09 09 74 | 79 70 65 3d 28 2a 64 65 |&7);...t|ype=(*de|
|000032d0| 76 69 63 65 29 2d 3e 67 | 64 54 79 70 65 3b 0d 09 |vice)->g|dType;..|
|000032e0| 09 44 72 61 77 50 72 69 | 6e 74 66 28 22 43 75 72 |.DrawPri|ntf("Cur|
|000032f0| 72 65 6e 74 6c 79 20 69 | 6e 20 6d 6f 64 65 20 25 |rently i|n mode %|
|00003300| 64 2c 20 70 69 78 65 6c | 53 69 7a 65 20 25 64 20 |d, pixel|Size %d |
|00003310| 62 69 74 73 2c 20 63 6c | 75 74 53 69 7a 65 20 25 |bits, cl|utSize %|
|00003320| 64 20 65 6e 74 72 69 65 | 73 2c 20 25 73 22 0d 09 |d entrie|s, %s"..|
|00003330| 09 09 2c 28 69 6e 74 29 | 6d 6f 64 65 2c 28 69 6e |..,(int)|mode,(in|
|00003340| 74 29 70 69 78 65 6c 53 | 69 7a 65 2c 28 69 6e 74 |t)pixelS|ize,(int|
|00003350| 29 63 6c 75 74 53 69 7a | 65 2c 74 79 70 65 4e 61 |)clutSiz|e,typeNa|
|00003360| 6d 65 5b 74 79 70 65 5d | 29 3b 0d 09 09 69 66 28 |me[type]|);...if(|
|00003370| 67 61 6d 6d 61 44 61 74 | 61 57 69 64 74 68 21 3d |gammaDat|aWidth!=|
|00003380| 30 29 44 72 61 77 50 72 | 69 6e 74 66 28 22 2c 20 |0)DrawPr|intf(", |
|00003390| 64 61 63 53 69 7a 65 20 | 25 64 20 62 69 74 73 22 |dacSize |%d bits"|
|000033a0| 2c 28 69 6e 74 29 67 61 | 6d 6d 61 44 61 74 61 57 |,(int)ga|mmaDataW|
|000033b0| 69 64 74 68 29 3b 0d 09 | 09 44 72 61 77 50 72 69 |idth);..|.DrawPri|
|000033c0| 6e 74 66 28 22 2e 5c 6e | 22 29 3b 0d 0d 09 09 54 |ntf(".\n|");....T|
|000033d0| 65 78 74 46 61 63 65 28 | 62 6f 6c 64 29 3b 0d 09 |extFace(|bold);..|
|000033e0| 09 66 3d 47 44 46 72 61 | 6d 65 52 61 74 65 28 64 |.f=GDFra|meRate(d|
|000033f0| 65 76 69 63 65 29 3b 0d | 09 09 44 72 61 77 50 72 |evice);.|..DrawPr|
|00003400| 69 6e 74 66 28 22 25 2e | 31 66 20 48 7a 20 66 72 |intf("%.|1f Hz fr|
|00003410| 61 6d 65 20 72 61 74 65 | 20 28 25 2e 31 66 20 6d |ame rate| (%.1f m|
|00003420| 73 29 2e 5c 6e 22 2c 66 | 2c 31 30 30 30 2e 30 2f |s).\n",f|,1000.0/|
|00003430| 66 29 3b 0d 09 09 69 66 | 28 28 2a 64 65 76 69 63 |f);...if|((*devic|
|00003440| 65 29 2d 3e 67 64 54 79 | 70 65 21 3d 66 69 78 65 |e)->gdTy|pe!=fixe|
|00003450| 64 54 79 70 65 29 7b 0d | 09 09 09 69 66 28 28 2a |dType){.|...if((*|
|00003460| 64 65 76 69 63 65 29 2d | 3e 67 64 54 79 70 65 3d |device)-|>gdType=|
|00003470| 3d 63 6c 75 74 54 79 70 | 65 29 6e 61 6d 65 3d 22 |=clutTyp|e)name="|
|00003480| 63 73 63 53 65 74 45 6e | 74 72 69 65 73 22 3b 0d |cscSetEn|tries";.|
|00003490| 09 09 09 65 6c 73 65 20 | 6e 61 6d 65 3d 22 63 73 |...else |name="cs|
|000034a0| 63 44 69 72 65 63 74 53 | 65 74 45 6e 74 72 69 65 |cDirectS|etEntrie|
|000034b0| 73 22 3b 0d 09 09 09 65 | 72 72 6f 72 3d 47 44 54 |s";....e|rror=GDT|
|000034c0| 69 6d 65 43 6c 75 74 28 | 64 65 76 69 63 65 2c 47 |imeClut(|device,G|
|000034d0| 44 53 65 74 45 6e 74 72 | 69 65 73 2c 30 0d 09 09 |DSetEntr|ies,0...|
|000034e0| 09 09 2c 26 73 2c 26 66 | 72 61 6d 65 73 2c 26 6d |..,&s,&f|rames,&m|
|000034f0| 69 73 73 69 6e 67 46 72 | 61 6d 65 73 2c 26 66 72 |issingFr|ames,&fr|
|00003500| 61 6d 65 52 61 74 65 29 | 3b 0d 09 09 09 44 72 61 |ameRate)|;....Dra|
|00003510| 77 50 72 69 6e 74 66 28 | 22 52 65 70 65 61 74 65 |wPrintf(|"Repeate|
|00003520| 64 6c 79 20 6c 6f 61 64 | 69 6e 67 20 74 68 65 20 |dly load|ing the |
|00003530| 63 6c 75 74 2c 20 62 79 | 20 63 61 6c 6c 69 6e 67 |clut, by| calling|
|00003540| 20 25 73 28 29 2c 20 22 | 0d 09 09 09 09 22 74 61 | %s(), "|....."ta|
|00003550| 6b 65 73 20 25 2e 32 66 | 20 66 72 61 6d 65 20 65 |kes %.2f| frame e|
|00003560| 61 63 68 20 74 69 6d 65 | 2e 5c 6e 22 2c 6e 61 6d |ach time|.\n",nam|
|00003570| 65 2c 66 72 61 6d 65 73 | 29 3b 0d 09 09 09 44 72 |e,frames|);....Dr|
|00003580| 61 77 50 72 69 6e 74 66 | 28 22 25 2e 31 66 20 48 |awPrintf|("%.1f H|
|00003590| 7a 20 63 6c 75 74 20 75 | 70 64 61 74 65 20 72 61 |z clut u|pdate ra|
|000035a0| 74 65 20 28 25 2e 31 66 | 20 6d 73 29 2e 5c 6e 22 |te (%.1f| ms).\n"|
|000035b0| 2c 31 2e 30 2f 73 2c 31 | 30 30 30 2e 30 2a 73 29 |,1.0/s,1|000.0*s)|
|000035c0| 3b 0d 09 09 7d 0d 09 09 | 54 65 78 74 46 61 63 65 |;...}...|TextFace|
|000035d0| 28 30 29 3b 0d 09 09 0d | 09 09 69 66 28 30 29 7b |(0);....|..if(0){|
|000035e0| 0d 09 09 09 2f 2a 20 49 | 20 68 61 76 65 6e 27 74 |..../* I| haven't|
|000035f0| 20 66 6f 75 6e 64 20 61 | 6e 79 20 75 73 65 20 66 | found a|ny use f|
|00003600| 6f 72 20 74 68 65 73 65 | 20 63 61 6c 6c 73 2c 20 |or these| calls, |
|00003610| 73 6f 20 73 6b 69 70 20 | 27 65 6d 20 2a 2f 0d 09 |so skip |'em */..|
|00003620| 09 09 44 72 61 77 50 72 | 69 6e 74 66 28 22 63 73 |..DrawPr|intf("cs|
|00003630| 63 47 65 74 44 65 66 61 | 75 6c 74 4d 6f 64 65 3a |cGetDefa|ultMode:|
|00003640| 20 22 29 3b 0d 09 09 09 | 65 72 72 6f 72 3d 47 44 | ");....|error=GD|
|00003650| 47 65 74 44 65 66 61 75 | 6c 74 4d 6f 64 65 28 64 |GetDefau|ltMode(d|
|00003660| 65 76 69 63 65 2c 26 6d | 6f 64 65 29 3b 0d 09 09 |evice,&m|ode);...|
|00003670| 09 69 66 28 65 72 72 6f | 72 29 20 45 72 72 6f 72 |.if(erro|r) Error|
|00003680| 28 65 72 72 6f 72 29 3b | 0d 09 09 09 65 6c 73 65 |(error);|....else|
|00003690| 20 44 72 61 77 50 72 69 | 6e 74 66 28 22 30 78 25 | DrawPri|ntf("0x%|
|000036a0| 58 5c 6e 22 2c 6d 6f 64 | 65 29 3b 0d 09 09 0d 09 |X\n",mod|e);.....|
|000036b0| 09 09 44 72 61 77 50 72 | 69 6e 74 66 28 22 63 73 |..DrawPr|intf("cs|
|000036c0| 63 53 65 74 44 65 66 61 | 75 6c 74 4d 6f 64 65 3a |cSetDefa|ultMode:|
|000036d0| 20 22 29 3b 0d 09 09 09 | 65 72 72 6f 72 3d 47 44 | ");....|error=GD|
|000036e0| 53 65 74 44 65 66 61 75 | 6c 74 4d 6f 64 65 28 64 |SetDefau|ltMode(d|
|000036f0| 65 76 69 63 65 2c 6d 6f | 64 65 29 3b 0d 09 09 09 |evice,mo|de);....|
|00003700| 69 66 28 65 72 72 6f 72 | 29 20 45 72 72 6f 72 28 |if(error|) Error(|
|00003710| 65 72 72 6f 72 29 3b 0d | 09 09 09 65 6c 73 65 20 |error);.|...else |
|00003720| 44 72 61 77 50 72 69 6e | 74 66 28 22 6f 6b 5c 6e |DrawPrin|tf("ok\n|
|00003730| 22 29 3b 0d 09 09 7d 0d | 09 09 69 66 28 70 61 74 |");...}.|..if(pat|
|00003740| 63 68 20 26 26 20 45 71 | 75 61 6c 53 74 72 69 6e |ch && Eq|ualStrin|
|00003750| 67 28 22 5c 70 2e 44 69 | 73 70 6c 61 79 5f 56 69 |g("\p.Di|splay_Vi|
|00003760| 64 65 6f 5f 41 70 70 6c | 65 5f 52 42 56 31 22 2c |deo_Appl|e_RBV1",|
|00003770| 47 44 4e 61 6d 65 28 64 | 65 76 69 63 65 29 2c 54 |GDName(d|evice),T|
|00003780| 52 55 45 2c 46 41 4c 53 | 45 29 29 0d 09 09 09 44 |RUE,FALS|E))....D|
|00003790| 72 61 77 50 72 69 6e 74 | 66 28 0d 09 09 09 22 54 |rawPrint|f(...."T|
|000037a0| 68 69 73 20 4d 61 63 20 | 49 49 63 69 20 76 69 64 |his Mac |IIci vid|
|000037b0| 65 6f 20 64 72 69 76 65 | 72 20 68 61 73 20 62 65 |eo drive|r has be|
|000037c0| 65 6e 20 70 61 74 63 68 | 65 64 20 28 75 6e 74 69 |en patch|ed (unti|
|000037d0| 6c 20 72 65 62 6f 6f 74 | 29 20 74 6f 20 66 69 78 |l reboot|) to fix|
|000037e0| 20 61 20 62 75 67 5c 6e | 22 0d 09 09 09 22 74 68 | a bug\n|"...."th|
|000037f0| 61 74 20 70 72 65 76 65 | 6e 74 73 20 72 65 61 64 |at preve|nts read|
|00003800| 69 6e 67 20 74 68 65 20 | 63 6c 75 74 2e 20 54 68 |ing the |clut. Th|
|00003810| 65 20 76 65 72 73 69 6f | 6e 20 6e 75 6d 62 65 72 |e versio|n number|
|00003820| 20 77 61 73 20 63 68 61 | 6e 67 65 64 20 66 72 6f | was cha|nged fro|
|00003830| 6d 20 30 20 74 6f 20 25 | 64 2e 5c 6e 22 0d 09 09 |m 0 to %|d.\n"...|
|00003840| 09 2c 28 69 6e 74 29 47 | 44 56 65 72 73 69 6f 6e |.,(int)G|DVersion|
|00003850| 28 64 65 76 69 63 65 29 | 29 3b 0d 09 7d 0d 09 53 |(device)|);..}..S|
|00003860| 65 6c 65 63 74 57 69 6e | 64 6f 77 28 77 69 6e 64 |electWin|dow(wind|
|00003870| 6f 77 5b 30 5d 29 3b 0d | 09 53 65 74 50 6f 72 74 |ow[0]);.|.SetPort|
|00003880| 28 77 69 6e 64 6f 77 5b | 30 5d 29 3b 0d 09 44 72 |(window[|0]);..Dr|
|00003890| 61 77 50 72 69 6e 74 66 | 28 0d 09 09 22 54 68 69 |awPrintf|(..."Thi|
|000038a0| 73 20 63 6f 6d 70 6c 65 | 74 65 73 20 74 68 65 20 |s comple|tes the |
|000038b0| 74 65 73 74 20 6f 66 20 | 74 68 65 20 6b 6e 6f 77 |test of |the know|
|000038c0| 6e 20 43 6f 6e 74 72 6f | 6c 20 61 6e 64 20 53 74 |n Contro|l and St|
|000038d0| 61 74 75 73 20 63 61 6c | 6c 73 20 66 6f 72 20 65 |atus cal|ls for e|
|000038e0| 61 63 68 5c 6e 22 0d 09 | 09 22 6f 66 20 79 6f 75 |ach\n"..|."of you|
|000038f0| 72 20 76 69 64 65 6f 20 | 64 65 76 69 63 65 73 2e |r video |devices.|
|00003900| 20 46 6f 72 20 61 6e 20 | 65 78 70 6c 61 6e 61 74 | For an |explanat|
|00003910| 69 6f 6e 20 6f 66 20 77 | 68 61 74 20 74 68 65 73 |ion of w|hat thes|
|00003920| 65 20 63 61 6c 6c 73 20 | 64 6f 2c 20 73 65 65 5c |e calls |do, see\|
|00003930| 6e 22 0d 09 09 22 41 70 | 70 6c 65 d5 73 20 62 6f |n"..."Ap|ple.s bo|
|00003940| 6f 6b 20 22 29 3b 0d 09 | 54 65 78 74 46 61 63 65 |ok ");..|TextFace|
|00003950| 28 69 74 61 6c 69 63 29 | 3b 0d 09 44 72 61 77 50 |(italic)|;..DrawP|
|00003960| 72 69 6e 74 66 28 22 44 | 65 73 69 67 6e 69 6e 67 |rintf("D|esigning|
|00003970| 20 43 61 72 64 73 20 61 | 6e 64 20 44 72 69 76 65 | Cards a|nd Drive|
|00003980| 72 73 2c 22 29 3b 0d 09 | 54 65 78 74 46 61 63 65 |rs,");..|TextFace|
|00003990| 28 30 29 3b 0d 09 44 72 | 61 77 50 72 69 6e 74 66 |(0);..Dr|awPrintf|
|000039a0| 28 22 20 33 72 64 20 45 | 64 2e 2c 20 41 64 64 69 |(" 3rd E|d., Addi|
|000039b0| 73 6f 6e 20 57 65 73 6c | 65 79 2c 20 43 68 61 70 |son Wesl|ey, Chap|
|000039c0| 74 65 72 20 39 2e 5c 6e | 22 29 3b 0d 09 54 65 78 |ter 9.\n|");..Tex|
|000039d0| 74 46 61 63 65 28 62 6f | 6c 64 29 3b 0d 09 44 72 |tFace(bo|ld);..Dr|
|000039e0| 61 77 50 72 69 6e 74 66 | 28 22 51 75 69 74 20 62 |awPrintf|("Quit b|
|000039f0| 79 20 63 6c 6f 73 69 6e | 67 20 61 6e 79 20 77 69 |y closin|g any wi|
|00003a00| 6e 64 6f 77 2c 20 6f 72 | 20 68 69 74 74 69 6e 67 |ndow, or| hitting|
|00003a10| 20 43 6f 6d 6d 61 6e 64 | 2d 2e 5c 6e 22 29 3b 0d | Command|-.\n");.|
|00003a20| 09 64 6f 7b 0d 09 09 6b | 65 65 70 57 61 69 74 69 |.do{...k|eepWaiti|
|00003a30| 6e 67 3d 31 3b 0d 09 09 | 77 68 69 6c 65 28 21 47 |ng=1;...|while(!G|
|00003a40| 65 74 4e 65 78 74 45 76 | 65 6e 74 28 6d 44 6f 77 |etNextEv|ent(mDow|
|00003a50| 6e 4d 61 73 6b 2b 6b 65 | 79 44 6f 77 6e 4d 61 73 |nMask+ke|yDownMas|
|00003a60| 6b 2c 26 65 76 65 6e 74 | 29 29 20 3b 0d 09 09 73 |k,&event|)) ;...s|
|00003a70| 77 69 74 63 68 28 65 76 | 65 6e 74 2e 77 68 61 74 |witch(ev|ent.what|
|00003a80| 29 7b 0d 09 09 63 61 73 | 65 20 6d 6f 75 73 65 44 |){...cas|e mouseD|
|00003a90| 6f 77 6e 3a 0d 09 09 09 | 77 68 65 72 65 3d 46 69 |own:....|where=Fi|
|00003aa0| 6e 64 57 69 6e 64 6f 77 | 28 65 76 65 6e 74 2e 77 |ndWindow|(event.w|
|00003ab0| 68 65 72 65 2c 26 74 68 | 65 57 69 6e 64 6f 77 29 |here,&th|eWindow)|
|00003ac0| 3b 0d 09 09 09 73 77 69 | 74 63 68 28 77 68 65 72 |;....swi|tch(wher|
|00003ad0| 65 29 7b 0d 09 09 09 63 | 61 73 65 20 69 6e 43 6f |e){....c|ase inCo|
|00003ae0| 6e 74 65 6e 74 3a 0d 09 | 09 09 63 61 73 65 20 69 |ntent:..|..case i|
|00003af0| 6e 44 72 61 67 3a 0d 09 | 09 09 63 61 73 65 20 69 |nDrag:..|..case i|
|00003b00| 6e 47 72 6f 77 3a 0d 09 | 09 09 63 61 73 65 20 69 |nGrow:..|..case i|
|00003b10| 6e 47 6f 41 77 61 79 3a | 0d 09 09 09 09 53 65 6c |nGoAway:|.....Sel|
|00003b20| 65 63 74 57 69 6e 64 6f | 77 28 74 68 65 57 69 6e |ectWindo|w(theWin|
|00003b30| 64 6f 77 29 3b 0d 09 09 | 09 7d 0d 09 09 09 69 66 |dow);...|.}....if|
|00003b40| 28 77 68 65 72 65 3d 3d | 69 6e 47 6f 41 77 61 79 |(where==|inGoAway|
|00003b50| 29 20 6b 65 65 70 57 61 | 69 74 69 6e 67 20 3d 20 |) keepWa|iting = |
|00003b60| 21 54 72 61 63 6b 47 6f | 41 77 61 79 28 74 68 65 |!TrackGo|Away(the|
|00003b70| 57 69 6e 64 6f 77 2c 65 | 76 65 6e 74 2e 77 68 65 |Window,e|vent.whe|
|00003b80| 72 65 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |re);....|break;..|
|00003b90| 09 63 61 73 65 20 6b 65 | 79 44 6f 77 6e 3a 0d 09 |.case ke|yDown:..|
|00003ba0| 09 09 69 66 28 65 76 65 | 6e 74 2e 6d 6f 64 69 66 |..if(eve|nt.modif|
|00003bb0| 69 65 72 73 20 26 20 63 | 6d 64 4b 65 79 29 20 73 |iers & c|mdKey) s|
|00003bc0| 77 69 74 63 68 28 65 76 | 65 6e 74 2e 6d 65 73 73 |witch(ev|ent.mess|
|00003bd0| 61 67 65 20 26 20 63 68 | 61 72 43 6f 64 65 4d 61 |age & ch|arCodeMa|
|00003be0| 73 6b 29 20 7b 0d 09 09 | 09 09 63 61 73 65 20 27 |sk) {...|..case '|
|00003bf0| 2e 27 3a 0d 09 09 09 09 | 63 61 73 65 20 27 77 27 |.':.....|case 'w'|
|00003c00| 3a 0d 09 09 09 09 6b 65 | 65 70 57 61 69 74 69 6e |:.....ke|epWaitin|
|00003c10| 67 3d 30 3b 0d 09 09 09 | 7d 0d 09 09 09 62 72 65 |g=0;....|}....bre|
|00003c20| 61 6b 3b 0d 09 09 7d 0d | 09 7d 20 77 68 69 6c 65 |ak;...}.|.} while|
|00003c30| 20 28 6b 65 65 70 57 61 | 69 74 69 6e 67 29 3b 0d | (keepWa|iting);.|
|00003c40| 09 53 65 74 50 6f 72 74 | 28 6f 6c 64 50 6f 72 74 |.SetPort|(oldPort|
|00003c50| 29 3b 0d 09 66 6f 72 28 | 69 3d 30 3b 69 3c 73 63 |);..for(|i=0;i<sc|
|00003c60| 72 65 65 6e 3b 69 2b 2b | 29 44 69 73 70 6f 73 65 |reen;i++|)Dispose|
|00003c70| 57 69 6e 64 6f 77 28 77 | 69 6e 64 6f 77 5b 69 5d |Window(w|indow[i]|
|00003c80| 29 3b 0d 09 5f 65 78 69 | 74 28 30 29 3b 0d 7d 0d |);.._exi|t(0);.}.|
|00003c90| 0d 76 6f 69 64 20 47 61 | 6d 6d 61 52 65 70 6f 72 |.void Ga|mmaRepor|
|00003ca0| 74 28 47 61 6d 6d 61 54 | 62 6c 20 2a 67 61 6d 6d |t(GammaT|bl *gamm|
|00003cb0| 61 29 0d 7b 0d 09 73 68 | 6f 72 74 20 69 2c 6a 2c |a).{..sh|ort i,j,|
|00003cc0| 6e 65 77 46 6f 6e 74 4e | 75 6d 62 65 72 2c 66 6f |newFontN|umber,fo|
|00003cd0| 6e 74 4e 75 6d 62 65 72 | 2c 74 65 78 74 53 69 7a |ntNumber|,textSiz|
|00003ce0| 65 3b 0d 09 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |e;..unsi|gned cha|
|00003cf0| 72 20 2a 62 79 74 65 3b | 0d 09 75 6e 73 69 67 6e |r *byte;|..unsign|
|00003d00| 65 64 20 73 68 6f 72 74 | 20 2a 77 6f 72 64 3b 0d |ed short| *word;.|
|00003d10| 09 57 69 6e 64 6f 77 50 | 74 72 20 77 69 6e 64 6f |.WindowP|tr windo|
|00003d20| 77 3b 0d 0d 09 69 66 28 | 67 61 6d 6d 61 3d 3d 4e |w;...if(|gamma==N|
|00003d30| 55 4c 4c 29 44 72 61 77 | 50 72 69 6e 74 66 28 22 |ULL)Draw|Printf("|
|00003d40| 65 72 72 6f 72 2d 2d 4e | 55 4c 4c 20 67 61 6d 6d |error--N|ULL gamm|
|00003d50| 61 20 74 61 62 6c 65 20 | 70 6f 69 6e 74 65 72 5c |a table |pointer\|
|00003d60| 6e 22 29 3b 0d 09 65 6c | 73 65 7b 0d 09 09 44 72 |n");..el|se{...Dr|
|00003d70| 61 77 50 72 69 6e 74 66 | 28 22 67 61 6d 6d 61 20 |awPrintf|("gamma |
|00003d80| 74 61 62 6c 65 20 40 25 | 6c 78 20 69 6e 64 69 63 |table @%|lx indic|
|00003d90| 61 74 65 73 20 74 68 61 | 74 20 74 68 65 20 76 69 |ates tha|t the vi|
|00003da0| 64 65 6f 20 63 61 72 64 | 20 68 61 73 20 25 64 2d |deo card| has %d-|
|00003db0| 62 69 74 20 64 61 63 73 | 2c 20 22 0d 09 09 22 61 |bit dacs|, "..."a|
|00003dc0| 6e 64 20 25 64 20 65 6e | 74 72 69 65 73 20 69 6e |nd %d en|tries in|
|00003dd0| 20 69 74 73 20 63 6c 75 | 74 2e 5c 6e 22 0d 09 09 | its clu|t.\n"...|
|00003de0| 2c 67 61 6d 6d 61 2c 28 | 69 6e 74 29 67 61 6d 6d |,gamma,(|int)gamm|
|00003df0| 61 2d 3e 67 44 61 74 61 | 57 69 64 74 68 2c 28 69 |a->gData|Width,(i|
|00003e00| 6e 74 29 67 61 6d 6d 61 | 2d 3e 67 44 61 74 61 43 |nt)gamma|->gDataC|
|00003e10| 6e 74 29 3b 0d 09 09 44 | 72 61 77 50 72 69 6e 74 |nt);...D|rawPrint|
|00003e20| 66 28 22 67 56 65 72 73 | 69 6f 6e 20 25 64 2c 20 |f("gVers|ion %d, |
|00003e30| 67 54 79 70 65 20 25 64 | 2c 20 67 46 6f 72 6d 75 |gType %d|, gFormu|
|00003e40| 6c 61 53 69 7a 65 20 25 | 64 2c 20 67 43 68 61 6e |laSize %|d, gChan|
|00003e50| 43 6e 74 20 25 64 5c 6e | 22 0d 09 09 2c 28 69 6e |Cnt %d\n|"...,(in|
|00003e60| 74 29 67 61 6d 6d 61 2d | 3e 67 56 65 72 73 69 6f |t)gamma-|>gVersio|
|00003e70| 6e 2c 28 69 6e 74 29 67 | 61 6d 6d 61 2d 3e 67 54 |n,(int)g|amma->gT|
|00003e80| 79 70 65 2c 28 69 6e 74 | 29 67 61 6d 6d 61 2d 3e |ype,(int|)gamma->|
|00003e90| 67 46 6f 72 6d 75 6c 61 | 53 69 7a 65 2c 28 69 6e |gFormula|Size,(in|
|00003ea0| 74 29 67 61 6d 6d 61 2d | 3e 67 43 68 61 6e 43 6e |t)gamma-|>gChanCn|
|00003eb0| 74 29 3b 0d 09 09 69 66 | 28 70 72 69 6e 74 47 61 |t);...if|(printGa|
|00003ec0| 6d 6d 61 54 61 62 6c 65 | 20 26 26 20 67 61 6d 6d |mmaTable| && gamm|
|00003ed0| 61 2d 3e 67 56 65 72 73 | 69 6f 6e 3d 3d 30 20 26 |a->gVers|ion==0 &|
|00003ee0| 26 20 67 61 6d 6d 61 2d | 3e 67 54 79 70 65 3d 3d |& gamma-|>gType==|
|00003ef0| 30 29 7b 0d 09 09 09 47 | 65 74 46 4e 75 6d 28 22 |0){....G|etFNum("|
|00003f00| 5c 70 4d 6f 6e 61 63 6f | 22 2c 26 6e 65 77 46 6f |\pMonaco|",&newFo|
|00003f10| 6e 74 4e 75 6d 62 65 72 | 29 3b 0d 09 09 09 47 65 |ntNumber|);....Ge|
|00003f20| 74 50 6f 72 74 28 26 77 | 69 6e 64 6f 77 29 3b 0d |tPort(&w|indow);.|
|00003f30| 09 09 09 66 6f 6e 74 4e | 75 6d 62 65 72 3d 77 69 |...fontN|umber=wi|
|00003f40| 6e 64 6f 77 2d 3e 74 78 | 46 6f 6e 74 3b 0d 09 09 |ndow->tx|Font;...|
|00003f50| 09 74 65 78 74 53 69 7a | 65 3d 77 69 6e 64 6f 77 |.textSiz|e=window|
|00003f60| 2d 3e 74 78 53 69 7a 65 | 3b 0d 09 09 09 54 65 78 |->txSize|;....Tex|
|00003f70| 74 46 6f 6e 74 28 6e 65 | 77 46 6f 6e 74 4e 75 6d |tFont(ne|wFontNum|
|00003f80| 62 65 72 29 3b 0d 09 09 | 09 54 65 78 74 53 69 7a |ber);...|.TextSiz|
|00003f90| 65 28 39 29 3b 0d 09 09 | 09 62 79 74 65 3d 28 75 |e(9);...|.byte=(u|
|00003fa0| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 2a 29 67 |nsigned |char *)g|
|00003fb0| 61 6d 6d 61 2d 3e 67 46 | 6f 72 6d 75 6c 61 44 61 |amma->gF|ormulaDa|
|00003fc0| 74 61 2b 67 61 6d 6d 61 | 2d 3e 67 46 6f 72 6d 75 |ta+gamma|->gFormu|
|00003fd0| 6c 61 53 69 7a 65 3b 0d | 09 09 09 77 6f 72 64 3d |laSize;.|...word=|
|00003fe0| 28 75 6e 73 69 67 6e 65 | 64 20 73 68 6f 72 74 20 |(unsigne|d short |
|00003ff0| 2a 29 62 79 74 65 3b 0d | 09 09 09 44 72 61 77 50 |*)byte;.|...DrawP|
|00004000| 72 69 6e 74 66 28 22 47 | 61 6d 6d 61 20 54 61 62 |rintf("G|amma Tab|
|00004010| 6c 65 3a 5c 6e 22 29 3b | 0d 09 09 09 66 6f 72 28 |le:\n");|....for(|
|00004020| 69 3d 30 3b 69 3c 67 61 | 6d 6d 61 2d 3e 67 44 61 |i=0;i<ga|mma->gDa|
|00004030| 74 61 43 6e 74 3b 69 2b | 3d 36 34 29 20 7b 0d 09 |taCnt;i+|=64) {..|
|00004040| 09 09 09 44 72 61 77 50 | 72 69 6e 74 66 28 22 25 |...DrawP|rintf("%|
|00004050| 33 64 3a 20 22 2c 69 29 | 3b 0d 09 09 09 09 69 66 |3d: ",i)|;.....if|
|00004060| 28 67 61 6d 6d 61 2d 3e | 67 44 61 74 61 57 69 64 |(gamma->|gDataWid|
|00004070| 74 68 3c 3d 38 29 0d 09 | 09 09 09 09 66 6f 72 28 |th<=8)..|....for(|
|00004080| 6a 3d 30 3b 6a 3c 36 34 | 3b 6a 2b 2b 29 20 44 72 |j=0;j<64|;j++) Dr|
|00004090| 61 77 50 72 69 6e 74 66 | 28 22 20 25 33 75 22 2c |awPrintf|(" %3u",|
|000040a0| 62 79 74 65 5b 69 2b 6a | 5d 29 3b 0d 09 09 09 09 |byte[i+j|]);.....|
|000040b0| 65 6c 73 65 0d 09 09 09 | 09 09 66 6f 72 28 6a 3d |else....|..for(j=|
|000040c0| 30 3b 6a 3c 36 34 3b 6a | 2b 2b 29 20 44 72 61 77 |0;j<64;j|++) Draw|
|000040d0| 50 72 69 6e 74 66 28 22 | 20 25 33 75 22 2c 77 6f |Printf("| %3u",wo|
|000040e0| 72 64 5b 69 2b 6a 5d 29 | 3b 0d 09 09 09 09 44 72 |rd[i+j])|;.....Dr|
|000040f0| 61 77 50 72 69 6e 74 66 | 28 22 5c 6e 22 29 3b 0d |awPrintf|("\n");.|
|00004100| 09 09 09 7d 0d 09 09 09 | 54 65 78 74 46 6f 6e 74 |...}....|TextFont|
|00004110| 28 66 6f 6e 74 4e 75 6d | 62 65 72 29 3b 0d 09 09 |(fontNum|ber);...|
|00004120| 09 54 65 78 74 53 69 7a | 65 28 74 65 78 74 53 69 |.TextSiz|e(textSi|
|00004130| 7a 65 29 3b 0d 09 09 7d | 0d 09 7d 0d 7d 0d 0d 73 |ze);...}|..}.}..s|
|00004140| 74 61 74 69 63 20 76 6f | 69 64 20 45 72 72 6f 72 |tatic vo|id Error|
|00004150| 28 69 6e 74 20 65 72 72 | 6f 72 29 0d 7b 0d 09 73 |(int err|or).{..s|
|00004160| 77 69 74 63 68 28 65 72 | 72 6f 72 29 7b 0d 09 63 |witch(er|ror){..c|
|00004170| 61 73 65 20 2d 31 37 3a | 0d 09 63 61 73 65 20 2d |ase -17:|..case -|
|00004180| 31 38 3a 0d 09 09 44 72 | 61 77 50 72 69 6e 74 66 |18:...Dr|awPrintf|
|00004190| 28 22 6e 2f 61 5c 6e 22 | 29 3b 0d 09 09 62 72 65 |("n/a\n"|);...bre|
|000041a0| 61 6b 3b 0d 09 64 65 66 | 61 75 6c 74 3a 0d 09 09 |ak;..def|ault:...|
|000041b0| 44 72 61 77 50 72 69 6e | 74 66 28 22 65 72 72 6f |DrawPrin|tf("erro|
|000041c0| 72 20 25 64 5c 6e 22 2c | 65 72 72 6f 72 29 3b 0d |r %d\n",|error);.|
|000041d0| 09 7d 0d 7d 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}.}....|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004200| 00 00 01 00 00 00 02 14 | 00 00 01 14 00 00 00 7a |........|.......z|
|00004210| 62 79 20 44 65 6e 69 73 | 20 47 2e 20 50 65 6c 6c |by Denis| G. Pell|
|00004220| 69 0d 28 4f 72 69 67 69 | 6e 61 6c 6c 79 20 22 54 |i.(Origi|nally "T|
|00004230| 0d 54 65 73 74 47 44 56 | 69 64 65 6f 2e 63 02 00 |.TestGDV|ideo.c..|
|00004240| 00 00 54 45 58 54 43 57 | 49 45 01 00 01 90 00 60 |..TEXTCW|IE.....`|
|00004250| 00 00 54 45 58 54 43 57 | 49 45 01 00 01 90 00 60 |..TEXTCW|IE.....`|
|00004260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004270| 00 00 a2 d3 d3 a9 00 00 | 41 54 00 00 02 8e 6e 20 |........|AT....n |
|00004280| 47 44 56 69 64 65 6f 2e | 63 0d 54 68 65 20 63 61 |GDVideo.|c.The ca|
|00004290| 6c 6c 73 20 61 72 65 20 | 64 6f 63 75 6d 65 6e 74 |lls are |document|
|000042a0| 65 64 20 69 6e 20 44 65 | 73 69 67 6e 69 6e 67 20 |ed in De|signing |
|000042b0| 43 61 72 64 73 20 61 6e | 64 20 44 72 69 76 65 72 |Cards an|d Driver|
|000042c0| 73 2c 20 32 6e 64 20 45 | 64 69 74 69 6f 6e 2c 0d |s, 2nd E|dition,.|
|000042d0| 43 68 61 70 74 65 72 20 | 39 2e 0d 0d 48 49 53 54 |Chapter |9...HIST|
|000042e0| 4f 52 59 3a 0d 38 2f 31 | 31 2f 38 39 09 64 67 70 |ORY:.8/1|1/89.dgp|
|000042f0| 09 77 72 6f 74 65 20 69 | 74 0d 33 2f 32 33 2f 39 |.wrote i|t.3/23/9|
|00004300| 00 00 00 0a 00 00 31 41 | 01 60 00 00 00 00 00 00 |......1A|.`......|
|00004310| 00 0a 00 00 25 38 ff ff | 00 00 00 00 00 00 00 a0 |....%8..|........|
|00004320| 00 07 00 14 00 00 1f e5 | 00 d0 00 30 a4 3c 00 00 |........|...0.<..|
|00004330| 05 65 72 72 6f 72 00 18 | 00 00 20 0e 00 d1 00 30 |.error..|.. ....0|
|00004340| a4 2c 00 00 09 70 69 78 | 65 6c 53 69 7a 65 00 14 |.,...pix|elSize..|
|00004350| 00 00 1f e5 00 d0 00 30 | a4 10 00 00 05 70 61 67 |.......0|.....pag|
|00004360| 65 73 00 10 00 00 1f e5 | 00 d0 00 30 a4 00 10 02 |es......|...0....|
|00004370| 01 69 00 26 00 00 26 a3 | 01 06 00 30 a2 68 80 00 |.i.&..&.|...0.h..|
|00004380| 00 2a fe d2 01 0a ff ec | 94 20 00 00 00 00 00 00 |.*......|. ......|
|00004390| 07 2a 67 61 6d 6d 61 20 | 00 14 00 00 26 a3 01 06 |.*gamma |....&...|
|000043a0| 00 30 a3 a4 00 00 05 67 | 61 6d 6d 61 00 14 00 00 |.0.....g|amma....|
|000043b0| 27 51 01 0c 00 30 a3 20 | 00 00 05 65 72 72 6f 72 |'Q...0. |...error|
|000043c0| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|000043d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043e0| 00 00 00 00 00 00 00 03 | 00 04 00 57 00 04 02 6c |........|...W...l|
|000043f0| 03 3d 00 57 00 04 02 6c | 03 3d ad 61 5f 4c 00 00 |.=.W...l|.=.a_L..|
|00004400| 2e b2 00 00 2e bf 00 00 | 2c 8a 00 00 00 00 00 04 |........|,.......|
|00004410| 00 01 00 01 00 00 01 00 | 00 00 02 14 00 00 01 14 |........|........|
|00004420| 00 00 00 7a 01 4c 4d d8 | 2a 9a 00 00 00 1c 00 7a |...z.LM.|*......z|
|00004430| 00 03 42 4b 50 54 00 01 | 00 22 44 54 56 55 00 00 |..BKPT..|."DTVU..|
|00004440| 00 3a 4d 50 53 52 00 00 | 00 46 4d 57 42 42 00 00 |.:MPSR..|.FMWBB..|
|00004450| 00 52 1e ce ff ff 00 00 | 00 00 00 00 00 00 59 73 |.R......|......Ys|
|00004460| ff ff 00 00 00 0e 00 00 | 00 00 4b 5d ff ff 00 00 |........|..K]....|
|00004470| 00 1c 00 00 00 00 03 ed | ff ff 00 00 00 c0 00 00 |........|........|
|00004480| 00 00 03 f0 ff ff 00 00 | 01 0c 00 00 00 00 00 00 |........|........|
|00004490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+