VOGONS


First post, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

Not sure if this is a bug or if I'm requesting a feature (though, there is an aspect of this I'd like to put in feature request.)

Now, with my virtual CD-Rom I'm having little to no issues. The one issue I have would definitely fall under the category of feature request, so I'll let the paragraph below cover that. It mounts just fine, even when there is no image loaded (it is in ejected mode.) It show up in dos as not available (no disk,) and it shows up in windows (3.1 16bit BTW,) as an empty drive. Everything fine and great. I don't have to hit F4 to change disks (just mount the new disk on the virtual drive.) Everything is great.

However, with my virtual floppy drive (got it from Here,) I have 2 problems, one the same as with the CD-Rom, and again I'll cover that later. The other problem is if I mount it without an image loaded (in ejected mode.) It works just great and shows up in Windows as a drive. However, there are rather major differences here. If I click on the CD-Rom, I get a win3 message "Please insert a disk", if I click on the Floppy (A:) it acts like its an empty disk, show "no files available", but does show a directory. In DOS, they act identical showing "File: a:*.* not found" or d: for the CD-Rom. With D.com (program I use that gives a color coded listing,) they both show "Invalid path specified." Also, when I mount the floppy drive I get a Windows XP error "Windows - No Disk" which plays holy havoc with my mouse sometimes. Also when I try to access the drive (and I forgot to mount an image,) I will "sometimes" get the error. I haven't figured out a complete pattern, but I can always cause it by first trying to get a directory of the empty CD-Rom with "dir d:" then immediately trying the same with the empty floppy drive "dir a:". The only thing I can really think of here is that DOSBox is treating the CD-Rom drive as a removable media device but is treating the Floppy drive as a directory. NOTE: They respond identically in Windows XP both through My Computer and at the Command Prompt (in case that's important.)

Now for the problem that might actually be a feature request. In neither (CD-Rom and Floppy,) case is the "Total" space reported accurate. Except, maybe, with an HD 3.5" floppy. The "Free" space is, of course, reported accurately on the CD-Rom as "0", but on the Floppy it is always reported as if the disk was completely a completely empty HD3.5" disk(it's always identical to the "Total" space.) I can only assume this is what the emulation does when you specify cdrom or floppy with -t. The total space for the CD being the "official" maximum size of 1G. Also, with the CD-Rom, if I have a DVD mounted (my Virtual Drive can handle DVD images as well,) the numbers become very strange, and nowhere near accurate (except the "0" space free.) Mounted CDs are sometimes accurate as to "Used" space. Or, that is to say the CD sometime "appear" to be fairly accurate, never actually measured them. It would be nice, if it can be done cross platform, if you could specify (or force,) DOSBox to treat a MOUNT as if it was to a removable drive (or Virtual Drive,) and that it would read the numbers through the host OS instead of just putting up what appears to be stock numbers. If what I believe is correct with the main Floppy problem, this should solve that issue as well.

I've been considering putting the second issue under "Feature Requests," but I'm not doing it so far because of a faulty memory. Back in the day (386/486 era,) there were several times a game I wanted was in the wrong format (I only had a 3.5" drive then.) I would go ahead and buy it though, then if the copy protection was "off disk," (and they were almost all the time by then,) I would go to a friend that had both types of drives. I would copy the files over to blank 3.5" disks formatted to have matching labels. The problem I ran into on a couple of occasions is that the installer looked at the size of the disk to determine where it looked for files to copy off of the disks. So, my game wouldn't install because the installer expected to find files on Disk 1 that were actually on Disk 2. In some cases, I could just start copying files onto disk one until it would go all the way through to disk 2, then repeat the process (mind numbingly tedious, let me tell you, but sometimes worth it.) Alternately, I could have just said "to heck with it," and sent off for the disk replacements. The problem I have is that I cannot remember any of the games I ran into this problem with (thus my not putting it into the Request topic.)

System Specifics:
Windows XP SP3 32-bit
DOSBox SVN r3852 (EmuCR from the Wiki)
Alcohol 120% 2.0.2 (Build 5830)
Virtual Floppy Drive for Windows 2.1.2008.0206
Intel 6600 Core Duo 2.4Ghz Processor
4G RAM 800mhz Non-ECC
Radeon HD6670 2G Graphics Card
Creative Labs X-Fi Sound Card
Gigabyte GA-EP45-DS3R Mother Board (rev 1.0)

DOSBox Config file below
Win3.1 installed with everything suggested in the guide except Win32s. (Don't need it, only want 3.1 to play games that require 3.1 - "The Daedalus Encounter" being one... Sure there may be patches, but I prefer to play games native.)

Attachments

  • Filename
    Win.conf
    File size
    10.17 KiB
    Downloads
    77 downloads
    File license
    Fair use/fair dealing exception

Feeding Dragon

Reply 1 of 19, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Ahh, wall of text.

If I'm not mistaken, DOSBox does not act any differently if you mount a folder as a floppy or if you mount an actual floppy drive (or virtual floppy drive) as a floppy. If you want accurate floppy emulation, you have to use IMGMOUNT.

Pretty much the sole benefit to Virtual Floppy Drive is that it lets you swap disk images on the fly, which used to be impossible in DOSBox, but now that functionality is in SVN.

Reply 2 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

Well, I actually only wanted it for 3 reasons. The swapping disks on the fly. The SVN says nothing about adding this in to imgmount usability, it still says I can only do this with CD-Rom images. The image I downloaded was from 1-13-14, so I guess it could have been added into the source code in the last 12 days. The second reason is to have an A drive available to my Win3.1 boot without having to drop to DOS every time, just alt-tab out, mount the image and go on. If I just use a folder as A:, I might still run into problems if the disk checks the label. Finally, the VFD allows access to non-standard formats. Formats that the "drive" reads fine but that DOSBox doesn't support. Since DOSBox doesn't read real floppy disks at a low level, but only at a higher level, the VFD acts as a great buffer for those. It won't work for some copy protections, and I'm not expecting it too, but it works for everything I need.

Basically, it seems to me that DOSBox is attempting to just read the contents, instead of first asking the system "is there a disk there?" first (like the command prompt or the disk icons do.) DOSBox already seems to properly detect the disk insert notification fine (as it updates just great on floppy insertion.) I was hoping that there was, or could be in the near future, a way to tell DOSBox, "this is a drive, don't just read it, first as if a disk is present, then read it." It seems to me that that would be better anyways.

I'm not asking for it to be a perfect emulation (though I'd prefer if the numbers matched what the "drive" reported.) I'm really only wanting it to do what it already does, just without the windows error. I can't seem to get a hold of the writer, and it's been 6 years since the last version was released. The error message could be caused by either the way DOSBox is treating the drive, or by the way the drive is coded. I asked here, I also asked there, but have yet to have received a response. Finally, sorry about the wall of words, when I'm sending a technical request, I try to be a complete as possible, so if someone wants to help, they don't have to ask 100 questions before the get the info they need.

Feeding Dragon

Reply 3 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Your wall of text makes it very hard to extract the information needed.
Can you do a lighter version along with mountings:
Mount bla
Imgmount bla
Started Windows 3.x
What you see
What you expect to see

Try difference between imgmounting a floppy vs mounting the virtual floppy drive.
Your mounting commands are never mentioned before or are hard to make out.
And if you work wit more returns your wall of words gets easier to read, too.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

Sorry, the text from the bottom of the config file I included....

MOUNT C C:\Emulation\DOSBox\Win31 -freesize 500
MOUNT D F:\ -t cdrom -ioctl_dio
MOUNT A A:\ -t floppy
WIN.COM
EXIT

removed all the set & path stuff, it's standard. When the MOUNT A command executes, the error pops up "Windows Error - No Disk" which turns DOSBox into a window. My mouse will not leave the window area and I cannot capture or free it. If the error box isn't in the window area, I have to alt-tab to the error box (DOSBox still has focus,) and use keyboard to select continue. After that everything works normally.

I don't use any IMGMOUNT commands, and would prefer not too. The whole purpose is to have a floppy & cd-rom drive that I can change on the fly without knowing in advance what I will need to have mounted. Though, if I did IMGMOUNT a floppy image instead of the virtual drive, I would think there would be no problem.

If I access the drive and forget to mount an image, it will sometimes do it again, sometimes not. It will always do it again if I first try to access the virtual CD while ejected, then immediately try the virtual floppy. If I remove the -t floppy, the error goes away completely, but the drive does not appear in windows (which is one of the reasons I want it there in the first place.)

Feeding Dragon

Reply 5 of 19, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Have you been pressing CTRL-F4, which tells DOSBox to refresh its directory cache? (Yes, CTRL-F4 is unfortunately used by Windows 3.x. You might have to change it using the keymapper.)

FeedingDragon wrote:

The SVN says nothing about adding this in to imgmount usability, it still says I can only do this with CD-Rom images.

Perhaps it's only in ykhwong's version, then. Either that or whatever documentation you were reading hasn't been updated to correspond with the actual program features.

I can't seem to get a hold of the writer, and it's been 6 years since the last version was released.

The SVN version is being updated frequently. And I daresay if he had the time to personally respond to every feature request, he wouldn't get anything done. 😜

Reply 6 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

First of all, does the Windows pop up thing happen with a real empty floppy drive? And/or the 0.74 version of Dosbox?

Second, and that's more about the free space thing you mentioned, I'm always a bit biased against things like that. If I need Windows 3.x with a floppy, I'll drop back to prompt, mount/imgmount, do what needs to be done and then next time I use Windows 3.x it's no longer mounted. The point is, after setting things up you barely need to have a floppy drive mounted. Just having it there because you might maybe, once in half a year, need the floppy, is below the scope of Dosbox.
DOSBox is for playing Dosgames, maybe for playing windows 3.x games, not for making the floppy/cd drive look good in Windows 3.x 😉

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 7 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

Jorpho:
No, I haven't been pressing <CTRL>F4, that's one of the reasons I like using a virtual drive, you don't have to press that after changing the disk. As for the SVN I'm using, I'm using the one the FAQ pointed me too to use (on the WIKI.) As as for not being contacted and no updates in 6 years, I'm talking about VFD, are you? As for the source code of VFD, I didn't check that.... Just did, last update Feb 14, 2010... So only 4 years since the last source code update.

Dominus:
I have no idea if the error comes up with a real floppy drive. I don't have one. I've never been able to get one to work on this system (or the last 2 motherboards for that matter.) I have 8 or 9 drives here, and at least that many floppy cables, I gave up on trying to get a floppy drive to work since I left the P4 systems. As for needing a floppy drive in Win3.1, I have about 15 or so CD's that are Win3.1 specific, and a large box of Win3.1 floppy games (between 100 and 200 disks.) For the floppies, I go to the library, pay $1.00 and spend half an hour putting a ton of them on my thumb drive. Haven't started going through them yet, and many of them will probably get tossed aside, but I don't know yet. Once I've gone through them all, then yes, I'll no longer need an A drive, but for now.

Feeding Dragon

Reply 9 of 19, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
FeedingDragon wrote:

No, I haven't been pressing <CTRL>F4, that's one of the reasons I like using a virtual drive, you don't have to press that after changing the disk.

Well, perhaps if you did press it, you wouldn't be having this problem?

To be clear: CTRL-F4 isn't just for swapping mounted images; it is also necessary in order for DOSBox to know that something external has made a change to something mounted in DOSBox.

As for the SVN I'm using, I'm using the one the FAQ pointed me too to use (on the WIKI.) As as for not being contacted and no updates in 6 years, I'm talking about VFD, are you? As for the source code of VFD, I didn't check that.... Just did, last update Feb 14, 2010... So only 4 years since the last source code update.

What? I thought you were talking about the DOSBox source. I'm getting very confused now.

I said, "Pretty much the sole benefit to Virtual Floppy Drive is that it lets you swap disk images on the fly, which used to be impossible in DOSBox, but now that functionality is in SVN". What I meant is that it is possible to swap floppy disk images on the fly in the SVN version of DOSBox when you mount them with IMGMOUNT.

As for needing a floppy drive in Win3.1, I have about 15 or so CD's that are Win3.1 specific, and a large box of Win3.1 floppy games (between 100 and 200 disks.) For the floppies, I go to the library, pay $1.00 and spend half an hour putting a ton of them on my thumb drive. Haven't started going through them yet, and many of them will probably get tossed aside, but I don't know yet. Once I've gone through them all, then yes, I'll no longer need an A drive, but for now.

I'm getting even more confused now. Are you saying you're using Windows 3.x in DOSBox solely read these floppies?

Reply 10 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

OK, clear some things up...

The "person" I tried to contact and haven't gotten an answer from was the creator of the "Virtual Floppy Drive v2.1". I'm not "that" surprised since it's been 4 years since the code, and 6 years since the build had been updated. I made 2 contacts.. Here (I'm not trying contact a DOSBox developer directly,) and on the VFD sourceforge page. I accept that the problem could be coming from either end, I just don't know enough to know.

I want Win3.1 in DOSBox to "play" the games, or the ones I like. I go to the library and make images of the floppies, because I don't have a physical floppy drive. I use the images in DOSBox to install the game in Win3.1 and try them out. I like them, I leave them and set their disks aside (archiving the images.) I don't like them, I move the disks to the sell if I can box, delete the game from Win3.1, and delete the images. The CD's aren't a problem. I make the image myself because the virtual CD-Rom works better than the physical drive. Do the same if I like/dislike. I have no problems with the virtual cd-rom drive, and this way I don't have to make an IMGMOUNT of 10-20 ISO files, then when I want to play a particular game play cycle image roulette.

<CTRL>F4 has DOSBox reread the directory structure. This will actually cause the error to re-occur most of the time.

Etil:
The disabling error message might actually work, I am given a long string of numbers that might point me to the correct place. It's not like that error is likely to occur under any other circumstance. I'll give that a try. The Error Mode looks like program code instructions. Not a programer, but it could be that the VFD programer didn't do that completely correctly for the "No Disk" error (didn't cover all the possibilities.) And one of the ones (or THE one, if he only missed one in the first place,) is the one that DOSBox sometimes triggers, but normal WinXP and CMD don't.

Feeding Dragon

Reply 11 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

Well, it turns out that fix isn't actually a fix but more of a band aid. It did however lead me to the real fix.

The problem, a process or thread is trying to access a drive that doesn't exist or does not contain media. Apparently, from what I'm reading, and I'm not a programer, so I may not be reading it 100% correctly. There are ways of suppressing Windows from throwing a fit over this, but not all programers do it correctly. The correct method is to use "uint = SetErrorMode(0x0001)" to tell Windows NOT display error messages but to just pass the error back to the program that caused it (let the program handle errors, not windows.) SetErrorMode returns an unsigned integer of what it was set to before your change so you can change it back afterwords with "SetErrorMode(uint)" This is in C++ I believe. What many programers use is 0x8000 which only stops windows from handling missing file errors.

I'm thinking, that since DOSBox was origninally designed around using directories (non-removable,) it could have been programmed with 0x8000 in the beginning (when all it handled was directories,) and even using real floppy drives wasn't a priority. And that this usage stayed in, at least in part, from that time, even after virtual drives and such started getting more support. I don't know enough about programming to be able to check. For now, I can use the band aid, though I really don't like too. It isn't a "single error" fix like I originally thought, but stops ALL critical error my system may generate - even ones I would WANT windows to jump on 😒

NOTE: I used the actual values given, since I don't know if "handles" would be the same from system to system or even compiler to compiler or language to language. The handles were
0x8000 SEM_NOOPENFILEERRORBOX
0x0001 SEM_FAILCRITICALERRORS

A non-programmer unfriendly page that describes it more fully is http://msdn.microsoft.com/en-us/library/windo … v=vs.85%29.aspx if you want to look it up yourself.

Feeding Dragon

Reply 12 of 19, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

I think I'm starting to understand. This seems like a very strange and obscure request.

I do notice that ImDisk appears to have the same functionality as VFD but has been updated more recently. Perhaps that may suit your needs?

Otherwise, doesn't ykhwong's build have a menu bar that supports mounting images on the fly?

Reply 13 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

ImDisk won't work, I'm afraid. Unlike ImDisk is more like IMGMOUNT for Windows. It works pretty much identically, pick an image, pick a drive letter, pick a drive type, etc... It suffers the same issues as dropping to DOS in Win3 and running the imgmount there manually.

Feeding Dragon

Reply 14 of 19, by etil

User metadata
Rank Newbie
Rank
Newbie

This AutoIt script starts DosBox without displaying 'No Disk' error message box.

#NoTrayIcon

#include <WinAPIDiag.au3>

$Progname = "dosbox.exe"

If @Compiled Then
If @ScriptName = $Progname Then Exit
Endif

$Command = $Progname
For $i = 1 To $CmdLine[0]
$Command = $Command & " " & $CmdLine[$i]
Next

_WinAPI_SetErrorMode($SEM_FAILCRITICALERRORS)
Run($Command,"")

Exit

Reply 15 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

That might work, I'm looking into it now (AutoIt.) Reading your code, it looks like it should work, though I don't understand a lot of what you are doing there. The main concern is that the Error Mode is restored after. Everything I read on it, was in some other language (C I think,) says that the routine (SetErrorMode) returns the current value. In those examples it would set up something like (forgive my lack of programing knowledge here.)

$OldValue = _WinAPI_SetErrorMode($SEM_FAILCRITICALERRORS)
Run($Command,"")
_WinAPI_SetErrorMode($OldValue)

Exit

Or something like that. It turns it off, then sets it back to normal when DOSBox exits (before exiting itself.

Feeding Dragon

Reply 16 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

OK, that seems to do the trick....

    #NoTrayIcon

#include <WinAPIDiag.au3>

$Progname = "dosbox.exe"

If @Compiled Then
If @ScriptName = $Progname Then Exit
Endif

$Command = $Progname
For $i = 1 To $CmdLine[0]
$Command = $Command & " " & $CmdLine[$i]
Next

$OldError = _WinAPI_SetErrorMode($SEM_FAILCRITICALERRORS)
RunWait($Command,"")
_WinAPI_SetErrorMode($OldError)

Exit

Used the RunWait so that it wouldn't reset the Error Mode until after I exited DOSBox. I would still prefer if it was process specific. There's supposed to be a way to do that, but I don't know how. This just turns off all windows error control. Maybe just with the processes that DOSBox is using, maybe not. I would still sort of prefer it if DOSBox would treat the virtual floppy drive more like it does the virtual CD-Rom drive. It reports itself as empty, and Win31 says please insert a disk. With the floppy it just shows an empty directory, as if there's a disk there that has nothing on it. I don't get an error until I try to actually write something to it. At this point I get "Directory A: does not exist, do you want to create it?" And, of course, saying "yes" just causes the same box to come up, over and over.

Feeding Dragon

Reply 18 of 19, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

It would be, except stupid Windows 3.1 won't see the drive unless it's there when it starts up. I have the config set to go straight into Win3, then exit when I leave Windows. It would be the same as using Windows' MS-DOS prompt to mount, unmount, mount each image as I get to them. Yes, suddenly there is an A drive, but Windows still says "no there isn't." I'd much rather just eject and insert physical media, but cannot get any of my drives to work with this motherboard, haven't for at least the last 4 or so upgrades. As it stands, I just got back from the library with my first 10 images.... OK, 8 images, 2 of the disks were bad it seems. This is going to take a while 🙁

On the bright side, this fix is better than the first one I was using. At least this one only shuts down error checking while I'm actually in Win3, and not all the time. If I was a better programmer, I'd check the source on how DOSBox accesses the physical CD-Rom and the physical floppy devices and see if I could transpose some of the code without breaking floppy access. Other than a couple of completely random error messages (from DOSBox,) the CD-Rom access works like a dream. 99% of the time it's perfect, but twice DOSBox has complained that the drive is empty, but continued on with a mouse click. Its only happened twice so far, and I was in a hurry so didn't mark the exact message. I'll mark it down if/when it happens again.

Feeding Dragon

Reply 19 of 19, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
FeedingDragon wrote:

It would be, except stupid Windows 3.1 won't see the drive unless it's there when it starts up.

Yes – so you can mount an image (any image) before you start Windows, and then swap out the image when you need to using the menu.