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.15 by cebix, 2001-06-30T22:23:43Z vs.
Revision 1.17 by cebix, 2001-07-01T12:42:01Z

# Line 40 | Line 40
40  
41  
42   // List of supported video modes
43 < std::vector<video_mode> VideoModes;
43 > vector<video_mode> VideoModes;
44  
45   // Description of the main monitor
46   monitor_desc VideoMonitor;
# Line 57 | Line 57 | struct {
57          uint32 current_id;
58          uint16 preferred_mode;          // Preferred depth/resolution
59          uint32 preferred_id;
60 <        uint32 sp;                                      // Mac address of Slot Manager parameter block
60 >        uint32 slot_param;                      // Mac address of Slot Manager parameter block
61   } VidLocal;
62  
63  
# Line 67 | Line 67 | struct {
67  
68   static bool has_resolution(uint32 id)
69   {
70 <        std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
70 >        vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
71          while (i != end) {
72                  if (i->resolution_id == id)
73                          return true;
# Line 81 | Line 81 | static bool has_resolution(uint32 id)
81   *  Find specified mode (depth/resolution) (or VideoModes.end() if not found)
82   */
83  
84 < static std::vector<video_mode>::const_iterator find_mode(uint16 mode, uint32 id)
84 > static vector<video_mode>::const_iterator find_mode(uint16 mode, uint32 id)
85   {
86 <        std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
86 >        vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
87          while (i != end) {
88                  if (i->resolution_id == id && DepthToAppleMode(i->depth) == mode)
89                          return i;
# Line 100 | Line 100 | static std::vector<video_mode>::const_it
100   static video_depth max_depth_of_resolution(uint32 id)
101   {
102          video_depth m = VDEPTH_1BIT;
103 <        std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
103 >        vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
104          while (i != end) {
105                  if (i->depth > m)
106                          m = i->depth;
# Line 116 | Line 116 | static video_depth max_depth_of_resoluti
116  
117   static void get_size_of_resolution(uint32 id, uint32 &x, uint32 &y)
118   {
119 <        std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
119 >        vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
120          while (i != end) {
121                  if (i->resolution_id == id) {
122                          x = i->x;
# Line 299 | Line 299 | int16 VideoDriverOpen(uint32 pb, uint32
299          Execute68kTrap(0xa71e, &r);     // NewPtrSysClear()
300          if (r.a[0] == 0)
301                  return memFullErr;
302 <        VidLocal.sp = r.a[0];
303 <        D(bug("SPBlock at %08x\n", VidLocal.sp));
302 >        VidLocal.slot_param = r.a[0];
303 >        D(bug("SPBlock at %08x\n", VidLocal.slot_param));
304  
305          // Find and set default gamma table
306          VidLocal.gamma_table = 0;
# Line 335 | Line 335 | int16 VideoDriverControl(uint32 pb, uint
335                                  return paramErr;
336  
337                          if (mode != VidLocal.current_mode) {
338 <                                std::vector<video_mode>::const_iterator i = find_mode(mode, VidLocal.current_id);
338 >                                vector<video_mode>::const_iterator i = find_mode(mode, VidLocal.current_id);
339                                  if (i == VideoModes.end())
340                                          return paramErr;
341                                  set_gray_palette();
# Line 494 | Line 494 | int16 VideoDriverControl(uint32 pb, uint
494                                  return paramErr;
495  
496                          if (mode != VidLocal.current_mode || id != VidLocal.current_id) {
497 <                                std::vector<video_mode>::const_iterator i = find_mode(mode, id);
497 >                                vector<video_mode>::const_iterator i = find_mode(mode, id);
498                                  if (i == VideoModes.end())
499                                          return paramErr;
500                                  set_gray_palette();
# Line 505 | Line 505 | int16 VideoDriverControl(uint32 pb, uint
505                                  WriteMacInt32(param + csBaseAddr, frame_base);
506  
507                                  M68kRegisters r;
508 <                                uint32 sp = VidLocal.sp;
508 >                                uint32 sp = VidLocal.slot_param;
509                                  r.a[0] = sp;
510  
511                                  // Find functional sResource for this display
# Line 751 | Line 751 | int16 VideoDriverStatus(uint32 pb, uint3
751                          uint16 mode = ReadMacInt16(param + csDepthMode);
752                          D(bug(" GetVideoParameters %04x/%08x\n", mode, id));
753  
754 <                        std::vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
754 >                        vector<video_mode>::const_iterator i = VideoModes.begin(), end = VideoModes.end();
755                          while (i != end) {
756                                  if (DepthToAppleMode(i->depth) == mode && i->resolution_id == id) {
757                                          uint32 vp = ReadMacInt32(param + csVPBlockPtr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines