diff --git a/src/dos/cdrom.cpp b/src/dos/cdrom.cpp index ffa0d66c..d3694d7e 100644 --- a/src/dos/cdrom.cpp +++ b/src/dos/cdrom.cpp @@ -25,7 +25,7 @@ #include "dosbox.h" #include "support.h" -int CDROM_GetMountType(char* path, int) { +int CDROM_GetMountType(char* path) { // 1 - Iso file // 2 - subdirectory diff --git a/src/dos/cdrom.h b/src/dos/cdrom.h index 3404fc02..c9735018 100644 --- a/src/dos/cdrom.h +++ b/src/dos/cdrom.h @@ -73,13 +73,13 @@ inline int msf_to_frames(int m, int s, int f) { return m * 60 * REDBOOK_FRAMES_PER_SECOND + s * REDBOOK_FRAMES_PER_SECOND + f; } -extern int CDROM_GetMountType(char* path, int force); +extern int CDROM_GetMountType(char* path); class CDROM_Interface { public: - virtual ~CDROM_Interface (void) {}; - virtual bool SetDevice (char* path, int forceCD) = 0; + virtual ~CDROM_Interface (void) {} + virtual bool SetDevice (char *path) = 0; virtual bool GetUPC (unsigned char& attr, char* upc) = 0; virtual bool GetAudioTracks (int& stTrack, int& end, TMSF& leadOut) = 0; virtual bool GetAudioTrackInfo (int track, TMSF& start, unsigned char& attr) = 0; @@ -98,7 +98,7 @@ public: class CDROM_Interface_Fake : public CDROM_Interface { public: - bool SetDevice (char* /*path*/, int /*forceCD*/) { return true; }; + bool SetDevice (char *) { return true; } bool GetUPC (unsigned char& attr, char* upc) { attr = 0; strcpy(upc,"UPC"); return true; }; bool GetAudioTracks (int& stTrack, int& end, TMSF& leadOut); bool GetAudioTrackInfo (int track, TMSF& start, unsigned char& attr); @@ -183,7 +183,7 @@ public: CDROM_Interface_Image (Bit8u _subUnit); virtual ~CDROM_Interface_Image (void); void InitNewMedia (void); - bool SetDevice (char* path, int forceCD); + bool SetDevice (char *path); bool GetUPC (unsigned char& attr, char* upc); bool GetAudioTracks (int& stTrack, int& end, TMSF& leadOut); bool GetAudioTrackInfo (int track, TMSF& start, unsigned char& attr); diff --git a/src/dos/cdrom_image.cpp b/src/dos/cdrom_image.cpp index 6c9c147c..42bce965 100644 --- a/src/dos/cdrom_image.cpp +++ b/src/dos/cdrom_image.cpp @@ -263,9 +263,8 @@ void CDROM_Interface_Image::InitNewMedia() { } -bool CDROM_Interface_Image::SetDevice(char* path, int forceCD) +bool CDROM_Interface_Image::SetDevice(char* path) { - (void)forceCD; // unused by part of the API if (LoadCueSheet(path) || LoadIsoFile(path)) { return true; diff --git a/src/dos/dos_mscdex.cpp b/src/dos/dos_mscdex.cpp index 9ff80bd1..3a060bfe 100644 --- a/src/dos/dos_mscdex.cpp +++ b/src/dos/dos_mscdex.cpp @@ -47,8 +47,6 @@ #define REQUEST_STATUS_DONE 0x0100 #define REQUEST_STATUS_ERROR 0x8000 -int forceCD = -1; - static Bitu MSCDEX_Strategy_Handler(void); static Bitu MSCDEX_Interrupt_Handler(void); @@ -250,7 +248,7 @@ int CMscdex::AddDrive(Bit16u _drive, char* physicalPath, Bit8u& subUnit) // Set return type to ok int result = 0; // Get Mounttype and init needed cdrom interface - switch (CDROM_GetMountType(physicalPath,forceCD)) { + switch (CDROM_GetMountType(physicalPath)) { case 0x00: LOG(LOG_MISC,LOG_NORMAL)("MSCDEX: Mounting physical cdrom: %s" ,physicalPath); // TODO: support for mounting physical CD-ROMs removed, provide @@ -270,7 +268,7 @@ int CMscdex::AddDrive(Bit16u _drive, char* physicalPath, Bit8u& subUnit) return 6; }; - if (!cdrom[numDrives]->SetDevice(physicalPath,forceCD)) { + if (!cdrom[numDrives]->SetDevice(physicalPath)) { // delete cdrom[numDrives] ; mount seems to delete it return 3; } @@ -1297,10 +1295,6 @@ bool MSCDEX_HasMediaChanged(Bit8u subUnit) return true; } -void MSCDEX_SetCDInterface(int, int numCD) { - forceCD = numCD; -} - void MSCDEX_ShutDown(Section* /*sec*/) { delete mscdex; mscdex = 0; diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index 74044e9f..6911476f 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -51,7 +51,6 @@ Bitu DEBUG_EnableDebugger(void); #endif -void MSCDEX_SetCDInterface(int intNr, int forceCD); static Bitu ZDRIVE_NUM = 25; static const char* UnmountHelper(char umount) { @@ -323,12 +322,15 @@ public: if (type=="cdrom") { int num = -1; cmd->FindInt("-usecd",num,true); + // TODO: + // if (num >= 0) + // WriteOut warning, -usecd ignored, no physical CD support int error = 0; if (cmd->FindExist("-ioctl", false)) { WriteOut(MSG_Get("MSCDEX_WARNING_IOCTL")); } if (cmd->FindExist("-noioctl", false)) { - MSCDEX_SetCDInterface(0, num); + WriteOut(MSG_Get("MSCDEX_WARNING_IOCTL")); } newdrive = new cdromDrive(drive,temp_line.c_str(),sizes[0],bit8size,sizes[2],0,mediaid,error); // Check Mscdex, if it worked out... @@ -1411,7 +1413,6 @@ public: return; } - MSCDEX_SetCDInterface(0, -1); // create new drives for all images std::vector isoDisks; std::vector::size_type i; diff --git a/src/dos/drive_iso.cpp b/src/dos/drive_iso.cpp index bbc7b82a..5fdde52c 100644 --- a/src/dos/drive_iso.cpp +++ b/src/dos/drive_iso.cpp @@ -187,7 +187,7 @@ int isoDrive::UpdateMscdex(char driveLetter, const char* path, Bit8u& subUnit) { CDROM_Interface* cdrom = new CDROM_Interface_Image(subUnit); char pathCopy[CROSS_LEN]; safe_strncpy(pathCopy, path, CROSS_LEN); - if (!cdrom->SetDevice(pathCopy, 0)) { + if (!cdrom->SetDevice(pathCopy)) { CDROM_Interface_Image::images[subUnit] = oldCdrom; delete cdrom; return 3;