I've been trying to install Hugo in Dosbox 0.74. The problem is that setup cancels and says that I haven't got enough free disk space. I used the following mount command to mount the Dosbox C drive:
mount C D:\dosbox -freesize 1200
Does anyone have an idea on how I could solve this issue?
Please try a clean build of the most recent SVN source available here. Some changes were made regarding the drive characteristics reported for free space queries; mostly to work around bugs in some installers.
The installer checks the 8-character BIOS date string at F000:FFF5, and if it finds a reasonable date it performs an additional drive check with INT 13. DOSBox has a date string in 0.73 and later, so earlier versions managed to avoid the drive check.
The drive check is a call to INT 13/04 (verify disk sectors) on the MBR. DOSBox does not set the carry flag to indicate an error, but it does not clear AH, so the installer thinks there's a problem with the drive and won't use it.
Doing something similar to what is done for the Inherit The Earth cdrom installer works around the issue. Note that the high bit of the drive number is not set (i.e. for drive C, DL==0x02), as would be expected:
1 case 0x04: /* Verify sectors */ 2 if (reg_al==0) { 3 reg_ah = 0x01; 4 CALLBACK_SCF(true); 5 return CBRET_NONE; 6 } 7+ if (!any_images) { 8+ // Hugo (uses it as disk test) 9+ if ((reg_dl>1) && (reg_dl<DOS_DRIVES) && (Drives[reg_dl]) && (reg_dh==0) && ((reg_cl&0x3f)==1)) { 10+ reg_ah = 0; 11+ CALLBACK_SCF(false); 12+ return CBRET_NONE; 13+ } 14+ } 15 if(driveInactive(drivenum)) return CBRET_NONE;
The changes are to bios_disk.cpp; however, do you really need to go through the exercise of compiling DOSBox? Simply use a version prior to 0.73 to install the game, and the current version to play. If a similar check is done by the game itself, then I guess you'll also need to use the older version to play.
It seems they all use the same disk test, but hugo5 skips it if there's no BIOS date string. Not sure why it looks for the date... I guess because INT 13 is a BIOS function, and not having a date could mean the BIOS has been replaced with UMBs or some such.
Anyway, here is a TSR program that should satisfy the disk check these installers use. Run it inside DOSBox before running the installers. See if it also needs to be resident in memory when playing the game, or just for installing.
ripsaw8080 wrote:The installer checks the 8-character BIOS date string at F000:FFF5, and if it finds a reasonable date it performs an additional […] Show full quote
The installer checks the 8-character BIOS date string at F000:FFF5, and if it finds a reasonable date it performs an additional drive check with INT 13. DOSBox has a date string in 0.73 and later, so earlier versions managed to avoid the drive check.
The drive check is a call to INT 13/04 (verify disk sectors) on the MBR. DOSBox does not set the carry flag to indicate an error, but it does not clear AH, so the installer thinks there's a problem with the drive and won't use it.
Doing something similar to what is done for the Inherit The Earth cdrom installer works around the issue. Note that the high bit of the drive number is not set (i.e. for drive C, DL==0x02), as would be expected:
1 case 0x04: /* Verify sectors */ 2 if (reg_al==0) { 3 reg_ah = 0x01; 4 CALLBACK_SCF(true); 5 return CBRET_NONE; 6 } 7+ if (!any_images) { 8+ // Hugo (uses it as disk test) 9+ if ((reg_dl>1) && (reg_dl<DOS_DRIVES) && (Drives[reg_dl]) && (reg_dh==0) && ((reg_cl&0x3f)==1)) { 10+ reg_ah = 0; 11+ CALLBACK_SCF(false); 12+ return CBRET_NONE; 13+ } 14+ } 15 if(driveInactive(drivenum)) return CBRET_NONE;
Think I will add a log message to that if I commit it.
It seems this fix was never commited, as I had the same problem with the game in the current SVN today. However, ripsaw8080s TSR tool still works great, thanks for that!