VOGONS


First post, by Greyhawk

User metadata
Rank Newbie
Rank
Newbie

UPDATE - Another installer based bug found in post #2

If using an actual floppy to install multi-disk game(In my case "Tie Fighter"), it can't find the 2nd disk because the search cache is still reporting the 1st disk. I know no way of quickly checking if the media changed, so the solution would be to empty the cache every FindFirst on "-t floppy" mounted drives. This can be done by:

Add the following to near the top of localDrive::FindFirst in drive_local.cpp:

if ( allocation.mediaid==0xF0 ) { EmptyCache(); } […]
Show full quote

if ( allocation.mediaid==0xF0 )
{
EmptyCache();
}

This fixes the installer for the disk version of "Tie Fighter", and possibly many other installers for multi-disk games.

I chose FindFirst because it is the same place the CD code check for changed media.

BTW, mediaid really should be enum'd.

Last edited by Greyhawk on 2003-10-31, 19:11. Edited 1 time in total.

Reply 1 of 7, by Greyhawk

User metadata
Rank Newbie
Rank
Newbie

Tried installing X-wing, but couldn't get it to see disk 2. Turns out that it was a simple behavior issue with getting the volume name.

When a label isn't found, it should return an error, not "". Adding the following code fixes X-wing installer.

In the file "drive_local.cpp"
In the function "localDrive::FindFirst()"
Immediately after:

if ((sAttr & DOS_ATTR_VOLUME) && (*_dir==0)) {

add:

if ( strcmp(dirCache.GetLabel(), "") == 0 )
{
dos.errorcode = 0x02;
return false;
}

I'm guessing on the errorcode, since I couldn't find the exact behavior in my asm book or on the web. (X-wing doesn't care about the errorcode, just the CF)

Reply 2 of 7, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

Does the rescan command work for CD-ROM drives? It is a useful command when using removable media as floppies for instance.

Reply 3 of 7, by Greyhawk

User metadata
Rank Newbie
Rank
Newbie

It calls EmptyCache so it should, but CD mounts already can tell if they are changed.

And as for floppies, RESCAN can't be used when an install program in running.

Reply 4 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yeah,

I thought of creating a keycombo that issued a rescan on all drives for that matter.

The cdrom things might be handy ?

Maybe something for finsterr ?

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 7, by dvwjr

User metadata
Rank Member
Rank
Member

Have your considered "CONTROL-C", just like DOS uses?

dvwjr

Reply 6 of 7, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
dvwjr wrote:

Have your considered "CONTROL-C", just like DOS uses?

??? Wouldn't that be bad if you're installing a game and the installer quits when you hit Ctrl+C?

Reply 7 of 7, by robertmo

User metadata
Rank l33t++
Rank
l33t++

I have had a simmilar problem with mounting hdd folder as a floppy. I couldn't delete install.exe from the virtuall floppy after the installation process has begun and after it asked for a new floppy. I have solved it by copying all the floppies to the same folder before the installation.