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

Comparing SheepShaver/src/video.cpp (file contents):
Revision 1.8 by gbeauche, 2004-05-10T16:42:35Z vs.
Revision 1.9 by gbeauche, 2004-11-13T14:09:15Z

# Line 74 | Line 74 | static long save_conf_mode = APPLE_8_BIT
74   // Function pointers of imported functions
75   typedef int16 (*iocic_ptr)(void *, int16);
76   static uint32 iocic_tvect = 0;
77 < static inline int16 IOCommandIsComplete(void *arg1, int16 arg2)
77 > static inline int16 IOCommandIsComplete(uintptr arg1, int16 arg2)
78   {
79 <        return (int16)CallMacOS2(iocic_ptr, iocic_tvect, arg1, arg2);
79 >        return (int16)CallMacOS2(iocic_ptr, iocic_tvect, (void *)arg1, arg2);
80   }
81   typedef int16 (*vslnewis_ptr)(void *, uint32, uint32 *);
82   static uint32 vslnewis_tvect = 0;
83 < static inline int16 VSLNewInterruptService(void *arg1, uint32 arg2, uint32 *arg3)
83 > static inline int16 VSLNewInterruptService(uintptr arg1, uint32 arg2, uintptr arg3)
84   {
85 <        return (int16)CallMacOS3(vslnewis_ptr, vslnewis_tvect, arg1, arg2, arg3);
85 >        return (int16)CallMacOS3(vslnewis_ptr, vslnewis_tvect, (void *)arg1, arg2, (uint32 *)arg3);
86   }
87   typedef int16 (*vsldisposeis_ptr)(uint32);
88   static uint32 vsldisposeis_tvect = 0;
# Line 98 | Line 98 | int16 VSLDoInterruptService(uint32 arg1)
98   }
99   typedef void (*nqdmisc_ptr)(uint32, void *);
100   static uint32 nqdmisc_tvect = 0;
101 < void NQDMisc(uint32 arg1, void *arg2)
101 > void NQDMisc(uint32 arg1, uintptr arg2)
102   {
103 <        CallMacOS2(nqdmisc_ptr, nqdmisc_tvect, arg1, arg2);
103 >        CallMacOS2(nqdmisc_ptr, nqdmisc_tvect, arg1, (void *)arg2);
104   }
105  
106  
# Line 169 | Line 169 | static int16 VideoOpen(uint32 pb, VidLoc
169  
170          // Install and activate interrupt service
171          SheepVar32 theServiceID = 0;
172 <        VSLNewInterruptService(csSave->regEntryID, FOURCC('v','b','l',' '), (uint32 *)theServiceID.addr());
172 >        VSLNewInterruptService(Host2MacAddr((uint8 *)csSave->regEntryID), FOURCC('v','b','l',' '), theServiceID.addr());
173          csSave->vslServiceID = theServiceID.value();
174          D(bug(" Interrupt ServiceID %08lx\n", csSave->vslServiceID));
175          csSave->interruptsEnabled = true;
# Line 184 | Line 184 | static int16 VideoOpen(uint32 pb, VidLoc
184  
185   static int16 set_gamma(VidLocals *csSave, uint32 gamma)
186   {
187 + #warning "FIXME: this code is not little endian aware"
188          GammaTbl *clientGamma = (GammaTbl *)gamma;
189          GammaTbl *gammaTable = csSave->gammaTable;
190  
# Line 876 | Line 877 | static int16 VideoClose(uint32 pb, VidLo
877   *  Native (PCI) driver entry
878   */
879  
880 < int16 VideoDoDriverIO(void *spaceID, void *commandID, void *commandContents, uint32 commandCode, uint32 commandKind)
880 > int16 VideoDoDriverIO(uint32 spaceID, uint32 commandID, uint32 commandContents, uint32 commandCode, uint32 commandKind)
881   {
882 < //      D(bug("VideoDoDriverIO space %p, command %p, contents %p, code %d, kind %d\n", spaceID, commandID, commandContents, commandCode, commandKind));
882 > //      D(bug("VideoDoDriverIO space %08x, command %08x, contents %08x, code %d, kind %d\n", spaceID, commandID, commandContents, commandCode, commandKind));
883          int16 err = noErr;
884  
885          switch (commandCode) {
# Line 926 | Line 927 | int16 VideoDoDriverIO(void *spaceID, voi
927  
928                          private_data = new VidLocals;
929                          private_data->gammaTable = NULL;
930 <                        memcpy(private_data->regEntryID, (uint8 *)commandContents + 2, 16);     // DriverInitInfo.deviceEntry
930 >                        Mac2Host_memcpy(&private_data->regEntryID, commandContents + 2, 16);    // DriverInitInfo.deviceEntry
931                          private_data->interruptsEnabled = false;        // Disable interrupts
932                          break;
933  
# Line 939 | Line 940 | int16 VideoDoDriverIO(void *spaceID, voi
940                          break;
941  
942                  case kOpenCommand:
943 <                        err = VideoOpen((uint32)commandContents, private_data);
943 >                        err = VideoOpen(commandContents, private_data);
944                          break;
945  
946                  case kCloseCommand:
947 <                        err = VideoClose((uint32)commandContents, private_data);
947 >                        err = VideoClose(commandContents, private_data);
948                          break;
949  
950                  case kControlCommand:
951 <                        err = VideoControl((uint32)commandContents, private_data);
951 >                        err = VideoControl(commandContents, private_data);
952                          break;
953  
954                  case kStatusCommand:
955 <                        err = VideoStatus((uint32)commandContents, private_data);
955 >                        err = VideoStatus(commandContents, private_data);
956                          break;
957  
958                  case kReadCommand:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines