diff --git a/src/dos/dos_mscdex.cpp b/src/dos/dos_mscdex.cpp index ee26ad60..91fbdaa5 100644 --- a/src/dos/dos_mscdex.cpp +++ b/src/dos/dos_mscdex.cpp @@ -16,6 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dos_mscdex.h" #include #include @@ -28,8 +29,6 @@ #include "bios_disk.h" #include "cpu.h" -#include "cdrom.h" - #define MSCDEX_LOG LOG(LOG_MISC,LOG_ERROR) //#define MSCDEX_LOG diff --git a/src/dos/dos_mscdex.h b/src/dos/dos_mscdex.h new file mode 100644 index 00000000..35ce8bdd --- /dev/null +++ b/src/dos/dos_mscdex.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2019 The DOSBox Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef DOSBOX_DOS_MSCDEX_H +#define DOSBOX_DOS_MSCDEX_H + +#include "dosbox.h" +#include "cdrom.h" + +int MSCDEX_AddDrive(char driveLetter, const char *physicalPath, Bit8u &subUnit); +int MSCDEX_RemoveDrive(char driveLetter); +bool MSCDEX_HasDrive(char driveLetter); +void MSCDEX_ReplaceDrive(CDROM_Interface *cdrom, Bit8u subUnit); +Bit8u MSCDEX_GetSubUnit(char driveLetter); +bool MSCDEX_GetVolumeName(Bit8u subUnit, char *name); +bool MSCDEX_HasMediaChanged(Bit8u subUnit); + +#endif // DOSBOX_DOS_MSCDEX_H + diff --git a/src/dos/drive_iso.cpp b/src/dos/drive_iso.cpp index 5fdde52c..386354cd 100644 --- a/src/dos/drive_iso.cpp +++ b/src/dos/drive_iso.cpp @@ -21,6 +21,7 @@ #include #include "cdrom.h" #include "dosbox.h" +#include "dos_mscdex.h" #include "dos_system.h" #include "support.h" #include "drives.h" @@ -132,13 +133,6 @@ Bit16u isoFile::GetInformation(void) { return 0x40; // read-only drive } -int MSCDEX_RemoveDrive(char driveLetter); -int MSCDEX_AddDrive(char driveLetter, const char* physicalPath, Bit8u& subUnit); -void MSCDEX_ReplaceDrive(CDROM_Interface* cdrom, Bit8u subUnit); -bool MSCDEX_HasDrive(char driveLetter); -bool MSCDEX_GetVolumeName(Bit8u subUnit, char* name); -Bit8u MSCDEX_GetSubUnit(char driveLetter); - isoDrive::isoDrive(char driveLetter, const char *fileName, Bit8u mediaid, int &error) :iso(false), dataCD(false), diff --git a/src/dos/drive_local.cpp b/src/dos/drive_local.cpp index 4b9013b2..59d38a8a 100644 --- a/src/dos/drive_local.cpp +++ b/src/dos/drive_local.cpp @@ -25,12 +25,12 @@ #include "dosbox.h" #include "dos_inc.h" +#include "dos_mscdex.h" #include "drives.h" #include "support.h" #include "cross.h" #include "inout.h" - bool localDrive::FileCreate(DOS_File * * file,char * name,Bit16u /*attributes*/) { //TODO Maybe care for attributes but not likely char newname[CROSS_LEN]; @@ -552,12 +552,6 @@ void localFile::Flush(void) { // CDROM DRIVE // ******************************************** -int MSCDEX_RemoveDrive(char driveLetter); -int MSCDEX_AddDrive(char driveLetter, const char* physicalPath, Bit8u& subUnit); -bool MSCDEX_HasMediaChanged(Bit8u subUnit); -bool MSCDEX_GetVolumeName(Bit8u subUnit, char* name); - - cdromDrive::cdromDrive(const char driveLetter, const char * startdir,Bit16u _bytes_sector,Bit8u _sectors_cluster,Bit16u _total_clusters,Bit16u _free_clusters,Bit8u _mediaid, int& error) :localDrive(startdir,_bytes_sector,_sectors_cluster,_total_clusters,_free_clusters,_mediaid), subUnit(0), diff --git a/vs/dosbox.vcxproj b/vs/dosbox.vcxproj index e351f918..30d9d33e 100644 --- a/vs/dosbox.vcxproj +++ b/vs/dosbox.vcxproj @@ -338,6 +338,7 @@ +