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

Comparing BasiliskII/src/cdrom.cpp (file contents):
Revision 1.6 by cebix, 2000-07-14T21:29:07Z vs.
Revision 1.7 by cebix, 2000-07-22T16:07:15Z

# Line 187 | Line 187 | static void find_hfs_partition(DriveInfo
187  
188                  // Skip driver descriptor
189                  uint16 sig = ntohs(((uint16 *)map)[0]);
190 <                if (sig == 'ER')
190 >                if (sig == 0x4552)
191                          continue;
192  
193                  // No partition map? Then look at next block
194 <                if (sig != 'PM')
194 >                if (sig != 0x504d)
195                          continue;
196  
197                  // Partition map found, Apple HFS partition?
198                  if (strcmp((char *)(map + 48), "Apple_HFS") == 0) {
199                          info->start_byte = ntohl(((uint32 *)map)[2]) << 9;
200 <                        D(bug(" HFS partition found at %ld, %ld blocks\n", info->start_byte, ntohl(((uint32 *)map)[3])));
200 >                        D(bug(" HFS partition found at %d, %d blocks\n", info->start_byte, ntohl(((uint32 *)map)[3])));
201                          break;
202                  }
203          }
# Line 674 | Line 674 | int16 CDROMControl(uint32 pb, uint32 dce
674                          return controlErr;
675  
676                  case 103: {             // AudioTrackSearch
677 <                        D(bug(" AudioTrackSearch postype %d, pos %08lx, hold %d\n", ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), ReadMacInt16(pb + csParam + 6)));
677 >                        D(bug(" AudioTrackSearch postype %d, pos %08x, hold %d\n", ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), ReadMacInt16(pb + csParam + 6)));
678                          if (ReadMacInt8(info->status + dsDiskInPlace) == 0)
679                                  return offLinErr;
680  
# Line 871 | Line 871 | int16 CDROMStatus(uint32 pb, uint32 dce)
871                          uint32 sel = ReadMacInt32(pb + csParam);
872                          D(bug(" driver gestalt %c%c%c%c\n", sel >> 24, sel >> 16,  sel >> 8, sel));
873                          switch (sel) {
874 <                                case 'vers':    // Version
874 >                                case FOURCC('v','e','r','s'):   // Version
875                                          WriteMacInt32(pb + csParam + 4, 0x05208000);
876                                          break;
877 <                                case 'devt':    // Device type
878 <                                        WriteMacInt32(pb + csParam + 4, 'cdrm');
877 >                                case FOURCC('d','e','v','t'):   // Device type
878 >                                        WriteMacInt32(pb + csParam + 4, FOURCC('c','d','r','m'));
879                                          break;
880 <                                case 'intf':    // Interface type
881 <                                        WriteMacInt32(pb + csParam + 4, 'basi');
880 >                                case FOURCC('i','n','t','f'):   // Interface type
881 >                                        WriteMacInt32(pb + csParam + 4, FOURCC('b','a','s','i'));
882                                          break;
883 <                                case 'sync':    // Only synchronous operation?
883 >                                case FOURCC('s','y','n','c'):   // Only synchronous operation?
884                                          WriteMacInt32(pb + csParam + 4, 0x01000000);
885                                          break;
886 <                                case 'boot':    // Boot ID
886 >                                case FOURCC('b','o','o','t'):   // Boot ID
887                                          if (info != NULL)
888                                                  WriteMacInt16(pb + csParam + 4, info->num);
889                                          else
890                                                  WriteMacInt16(pb + csParam + 4, 0);
891                                          WriteMacInt16(pb + csParam + 6, (uint16)CDROMRefNum);
892                                          break;
893 <                                case 'wide':    // 64-bit access supported?
893 >                                case FOURCC('w','i','d','e'):   // 64-bit access supported?
894                                          WriteMacInt16(pb + csParam + 4, 0);
895                                          break;
896 <                                case 'purg':    // Purge flags
896 >                                case FOURCC('p','u','r','g'):   // Purge flags
897                                          WriteMacInt32(pb + csParam + 4, 0);
898                                          break;
899 <                                case 'ejec':    // Eject flags
899 >                                case FOURCC('e','j','e','c'):   // Eject flags
900                                          WriteMacInt32(pb + csParam + 4, 0x00030003);    // Don't eject on shutdown/restart
901                                          break;
902 <                                case 'flus':    // Flush flags
902 >                                case FOURCC('f','l','u','s'):   // Flush flags
903                                          WriteMacInt16(pb + csParam + 4, 0);
904                                          break;
905 <                                case 'vmop':    // Virtual memory attributes
905 >                                case FOURCC('v','m','o','p'):   // Virtual memory attributes
906                                          WriteMacInt32(pb + csParam + 4, 0);     // Drive not available for VM
907                                          break;
908                                  default:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines