reduce reported total drive size to avoid certain installer bugs/misbehaviour (ripsaw; fixes Front Page Sports Baseball installer regression)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3713
This commit is contained in:
parent
8e7cbdda70
commit
379727f63d
2 changed files with 10 additions and 6 deletions
|
@ -125,12 +125,12 @@ public:
|
|||
str_size="512,1,2880,2880";/* All space free */
|
||||
mediaid=0xF0; /* Floppy 1.44 media */
|
||||
} else if (type=="dir") {
|
||||
// 512*32*65535==~1GB total size
|
||||
// 512*32*32765==~500MB total size
|
||||
// 512*32*16000==~250MB total free size
|
||||
str_size="512,32,65535,16000";
|
||||
str_size="512,32,32765,16000";
|
||||
mediaid=0xF8; /* Hard Disk */
|
||||
} else if (type=="cdrom") {
|
||||
str_size="2048,1,65535,0";
|
||||
str_size="2048,1,32765,0";
|
||||
mediaid=0xF8; /* Hard Disk */
|
||||
} else {
|
||||
WriteOut(MSG_Get("PROGAM_MOUNT_ILL_TYPE"),type.c_str());
|
||||
|
@ -145,8 +145,12 @@ public:
|
|||
// freesize in kb
|
||||
sprintf(teststr,"512,1,2880,%d",freesize*1024/(512*1));
|
||||
} else {
|
||||
// freesize in mb
|
||||
sprintf(teststr,"512,32,65535,%d",freesize*1024*1024/(512*32));
|
||||
Bit32u total_size_cyl=32765;
|
||||
Bit32u free_size_cyl=(Bit32u)freesize*1024*1024/(512*32);
|
||||
if (free_size_cyl>65534) free_size_cyl=65534;
|
||||
if (total_size_cyl<free_size_cyl) total_size_cyl=free_size_cyl+10;
|
||||
if (total_size_cyl>65534) total_size_cyl=65534;
|
||||
sprintf(teststr,"512,32,%d,%d",total_size_cyl,free_size_cyl);
|
||||
}
|
||||
str_size=teststr;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ bool Virtual_Drive::Rename(char * oldname,char * newname) {
|
|||
bool Virtual_Drive::AllocationInfo(Bit16u * _bytes_sector,Bit8u * _sectors_cluster,Bit16u * _total_clusters,Bit16u * _free_clusters) {
|
||||
*_bytes_sector=512;
|
||||
*_sectors_cluster=32;
|
||||
*_total_clusters=65535; // total size is always 1 gb
|
||||
*_total_clusters=32765; // total size is always 500 mb
|
||||
*_free_clusters=0; // nothing free here
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue