First post, by tcloud
Spent a few cycles with the dosbox debugger to find out why Mercenaries 2 would work fine with bin/cue but failed to play in the cdrom drive. It turns out that it has to do with the cdromDrive object located in drive_local.cpp that drive_iso.cpp does not use or call.
What the Mercs code is doing is making a call to Int 21 4E and then subsequent calls to Int 21 4F using DriveLetter:*.* instead of doing a compare for each file, it first checks the attribute for hidden file. After it finds the hidden file attribute it checks for OLD_MERC.DRV filename.
Well it just so happens the code that cdromDrive object derives from uses the stat command on the file. This will only yield whether or not a name is a directory or a regular file. This differs of course with how the whole drive_iso.cpp code handles items. I was thinking about making a patch to the code base but noticed that with MSCDEX a cool system of allowing different types of calls and interfaces be used.
Unfortunately when using a CDRom Drive the cdromDrive object doesn’t utilize any of the code for the above search calls. It’s out of the loop of the code updates it seems and with me not knowing the grand design… I would rather like to collaborate with a developer more familiar with the code before I embark on a refactor (noticed a lot of code that was copied and pasted and could use a little design update). Of course I would be just as happy to let the code maintainers and designers take a look and create a fix.