ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/video.cpp
(Generate patch)

Comparing BasiliskII/src/video.cpp (file contents):
Revision 1.21 by cebix, 2001-07-04T11:12:19Z vs.
Revision 1.23 by cebix, 2001-07-11T19:26:13Z

# Line 23 | Line 23
23   *  SEE ALSO
24   *    Inside Macintosh: Devices, chapter 1 "Device Manager"
25   *    Designing Cards and Drivers for the Macintosh Family, Second Edition
26 + *    Designing PCI Cards and Drivers for Power Macintosh Computers
27 + *    Display Device Driver Guide
28   */
29  
30   #include <stdio.h>
# Line 218 | Line 220 | static void set_gray_palette(void)
220   static void load_ramp_palette(void)
221   {
222          // Find tables for gamma correction
223 <        uint8 *red_gamma, *green_gamma, *blue_gamma;
223 >        uint8 *red_gamma = NULL, *green_gamma = NULL, *blue_gamma = NULL;
224          bool have_gamma = false;
225          int data_width = 0;
226          if (VidLocal.gamma_table) {
# Line 509 | Line 511 | int16 VideoDriverControl(uint32 pb, uint
511                                  return paramErr;
512  
513                          // Find tables for gamma correction
514 <                        uint8 *red_gamma, *green_gamma, *blue_gamma;
514 >                        uint8 *red_gamma = NULL, *green_gamma = NULL, *blue_gamma = NULL;
515                          bool have_gamma = false;
516                          int data_width = 0;
517                          if (VidLocal.gamma_table) {
# Line 860 | Line 862 | int16 VideoDriverStatus(uint32 pb, uint3
862                                          WriteMacInt32(vp + vpVRes, 0x00480000);
863                                          uint32 pix_type, pix_size, cmp_count, cmp_size, dev_type;
864                                          switch (i->depth) {
863                                                case VDEPTH_1BIT:
864                                                        pix_type = 0; pix_size = 1;
865                                                        cmp_count = 1; cmp_size = 1;
866                                                        dev_type = 0; // CLUT
867                                                        break;
868                                                case VDEPTH_2BIT:
869                                                        pix_type = 0; pix_size = 2;
870                                                        cmp_count = 1; cmp_size = 2;
871                                                        dev_type = 0; // CLUT
872                                                        break;
873                                                case VDEPTH_4BIT:
874                                                        pix_type = 0; pix_size = 4;
875                                                        cmp_count = 1; cmp_size = 4;
876                                                        dev_type = 0; // CLUT
877                                                        break;
878                                                case VDEPTH_8BIT:
879                                                        pix_type = 0; pix_size = 8;
880                                                        cmp_count = 1; cmp_size = 8;
881                                                        dev_type = 0; // CLUT
882                                                        break;
865                                                  case VDEPTH_16BIT:
866                                                          pix_type = 0x10; pix_size = 16;
867                                                          cmp_count = 3; cmp_size = 5;
# Line 890 | Line 872 | int16 VideoDriverStatus(uint32 pb, uint3
872                                                          cmp_count = 3; cmp_size = 8;
873                                                          dev_type = 2; // direct
874                                                          break;
875 +                                                default:
876 +                                                        pix_type = 0; pix_size = 1 << i->depth;
877 +                                                        cmp_count = 1; cmp_size = 1 << i->depth;
878 +                                                        dev_type = 0; // CLUT
879 +                                                        break;
880                                          }
881                                          WriteMacInt16(vp + vpPixelType, pix_type);
882                                          WriteMacInt16(vp + vpPixelSize, pix_size);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines