diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index 5f237186..4b5fa219 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2010 The DOSBox Team + * Copyright (C) 2002-2011 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 @@ -126,9 +126,9 @@ public: str_size="512,1,2880,2880";/* All space free */ mediaid=0xF0; /* Floppy 1.44 media */ } else if (type=="dir") { - // 512*127*16383==~1GB total size - // 512*127*4031==~250MB total free size - str_size="512,127,16383,4031"; + // 512*32*65535==~1GB total size + // 512*32*16000==~250MB total free size + str_size="512,32,65535,16000"; mediaid=0xF8; /* Hard Disk */ } else if (type=="cdrom") { str_size="2048,1,65535,0"; @@ -141,11 +141,13 @@ public: std::string mb_size; if(cmd->FindString("-freesize",mb_size,true)) { char teststr[1024]; - Bit16u sizemb = static_cast(atoi(mb_size.c_str())); + Bit16u freesize = static_cast(atoi(mb_size.c_str())); if (type=="floppy") { - sprintf(teststr,"512,1,2880,%d",sizemb*1024/(512*1)); + // freesize in kb + sprintf(teststr,"512,1,2880,%d",freesize*1024/(512*1)); } else { - sprintf(teststr,"512,127,16513,%d",sizemb*1024*1024/(512*127)); + // freesize in mb + sprintf(teststr,"512,32,65535,%d",freesize*1024*1024/(512*32)); } str_size=teststr; } @@ -1026,7 +1028,7 @@ public: if (type=="floppy") { mediaid=0xF0; } else if (type=="iso") { - str_size="650,127,16513,1700"; + str_size=="2048,1,60000,0"; // ignored, see drive_iso.cpp (AllocationInfo) mediaid=0xF8; fstype = "iso"; } diff --git a/src/dos/drive_local.cpp b/src/dos/drive_local.cpp index 50ae6f1c..f07cb2c3 100644 --- a/src/dos/drive_local.cpp +++ b/src/dos/drive_local.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2010 The DOSBox Team + * Copyright (C) 2002-2011 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 @@ -380,8 +380,6 @@ bool localDrive::Rename(char * oldname,char * newname) { } bool localDrive::AllocationInfo(Bit16u * _bytes_sector,Bit8u * _sectors_cluster,Bit16u * _total_clusters,Bit16u * _free_clusters) { - /* Always report 100 mb free should be enough */ - /* Total size is always 1 gb */ *_bytes_sector=allocation.bytes_sector; *_sectors_cluster=allocation.sectors_cluster; *_total_clusters=allocation.total_clusters; diff --git a/src/dos/drive_virtual.cpp b/src/dos/drive_virtual.cpp index 95bdf187..43619616 100644 --- a/src/dos/drive_virtual.cpp +++ b/src/dos/drive_virtual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2010 The DOSBox Team + * Copyright (C) 2002-2011 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 @@ -248,12 +248,10 @@ bool Virtual_Drive::Rename(char * oldname,char * newname) { } bool Virtual_Drive::AllocationInfo(Bit16u * _bytes_sector,Bit8u * _sectors_cluster,Bit16u * _total_clusters,Bit16u * _free_clusters) { - /* Always report 100 mb free should be enough */ - /* Total size is always 1 gb */ *_bytes_sector=512; - *_sectors_cluster=127; - *_total_clusters=16513; - *_free_clusters=00; + *_sectors_cluster=32; + *_total_clusters=65535; // total size is always 1 gb + *_free_clusters=0; // nothing free here return true; }