VOGONS

Common searches


First post, by VannevarKush

User metadata
Rank Newbie
Rank
Newbie

I've been working on getting Windows 3.11 working in DOSXbox. This is a version for the original Xbox that is based on DOSBox 0.72. My goal is to create a slimmed down and optimized build of Windows 3.11 vanilla that can be used to run Windows 3.1 software (at least, as well as the 733Mhz Pentium III in the original Xbox can handle.)

What I'm finding is that Windows 3.1 has been working well in DOSBox, and DOSXbox. The only problem that I am having is when I go to open a file from an open file dialog. If I open Notepad, and I go to open a text file on drive C, I get a dialog with the message "Cannot select Drive C", and I can't open the file. Running "notepad [path to file]" from within Windows opens the file without issue.

Now, I know DOSBox is not expressly intended to run Windows and I am using a port of an old version of DOSBox. This issue also doesn't show up in DOSBox 0.62 for Windows, so I know that I am out in the weeds here. What's more, this issue doesn't show up when I am running Windows 3.x from inside a hard drive image. Everything works as expected on DOSXbox in that situation, the only problem is the speed of the Xbox CPU. 😀 So even if I can't solve this, I have a workable solution. But, it is still much more easy and convenient to set up content as a mounted directory, rather than as a mounted image.

One more note, I set up a build of Windows 1 and Windows 2. Both of these had the same issue when running as a mounted directory, rather than as a hard drive image. For these versions, they seemed to try to open the file as a directory, and then the open file dialog would display an empty directory, named as the full name and extension of the file.

So, I am wondering if anyone has any ideas on what I could investigate here? Recompiling DOSXbox may be possible to fix the issue if I can begin to narrow down where the issue is happening. It might have something to do with an idiosyncrasy of the FATX filesystem and how it is being mounted in DOSXbox, or it may just be a bug in DOSXbox.

I've tried the following:

- I'm testing by trying to open a file on the drive with Notepad
- This issue does not apply to the Z: drive, to mounted ISOs, or to floppy images mounted on A:. Windows does not seem to see directories mounted on A although DOS does; not a big issue
- The issue does apply to a directory mounted as D
- Removing DOS files from PATH has no effect
- Turning off virtual memory in Windows has no effect
- Disabling all audio devices in DOSXBox config has no effect
- mount c "..." -freesize 1024 has no effect
- Changing every disk related option I could find documented for system.ini did not help

Would there perhaps be a tool to allow me to monitor what is happening here in the winAPI at a low level, from within Windows? I'm open to any suggestions here!

Last edited by VannevarKush on 2021-06-22, 01:04. Edited 1 time in total.

Reply 2 of 16, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

The default drive label for mounted drives is X_DRIVE (Where X=Drive letter)
To prove your filesystem theory you can try mounting a FAT32 usb drive.

IIRC, the original XBOX had a DOSBOX port based off of 0.65 but may have gone higher. Haven't tracked that in a long time.

You could try emailing "madmab" to see if he is still active. Email address is in the profile.

Last edited by DosFreak on 2021-06-22, 00:51. Edited 1 time in total.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 3 of 16, by VannevarKush

User metadata
Rank Newbie
Rank
Newbie
Jorpho wrote on 2021-06-22, 00:06:

I'm going to take a completely wild guess here, but have you tried assigning a volume label when mounting your drive C?

Thanks, it sounded promising but no luck! I did notice that after the "Cannot select drive C" message the volume label disappeared from the drive in the open file dialog, probably not important though.

DosFreak wrote on 2021-06-22, 00:32:

The default drive label for mounted drives is X_DRIVE (Where X=Drive letter)
To prove your filesystem theory you can try mounting a FAT32 usb drive.

IIRC, the original XBOX had a DOSBOX port based off of 0.65 but may have gone higher. Haven't tracked that in a long time.

I'm using the version that is the standard in the Xbox community as far as I know, the 0.62 is from one of the readme files but they're kind of a mess. I did notice that DOSXbox seems to have a couple patches/features not present in DOSBox 0.62. (a few mentioned in the readmes) For the FAT32 USB drive, if mounting USB flash drives in DOSXbox is possible, this is news to me (and good news if I can hot swap a USB drive without restarting the Xbox.); I'll take a closer look here!

...In fact, running MSD.exe (microsoft diagnostics) reports DOSBox version 0.72... I'll have to try with that version!

Reply 4 of 16, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

IIRC, the ports of DOSBox for XBOX were created with the XDK at the time so weren't allowed to be posted here or really discussed here because of that.
I think nowadays there are open source solutions for compiling so may not be an issue although it's unlikely DOSXBOX was compiled using those....

Last edited by DosFreak on 2021-06-22, 01:06. Edited 1 time in total.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 5 of 16, by VannevarKush

User metadata
Rank Newbie
Rank
Newbie

I did confirm that the current DOSXBox version is 0.72, (it was a quick note in one of the changelogs) so I'll test it out on that. I'm not sure about the platform DOSXbox is compiled on these days, but I won't post any executables related to it just in case.

Edit: Can confirm the issue doesn't show up on Windows with DOSBox 0.72; now to try with USB stick.

I can't get the USB stick to be recognized by DOSXbox although other Xbox apps see it. Maybe trying over SMB share would work... No, I can't mount over SMB; I guess a DVD is my best best...

So mounting files from a DVD and attempting to open in Notepad results in the same issue, so it's probably not the FATX filesystem after all. Also, if I mount a directory as a CD drive, when I try to open a file from an open file dialog I get the error "Cannot read drive d:, Please verify the drive door is closed and that the disk is formatted and free of errors."

Reply 6 of 16, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

What are the external paths used when mounting the drives?
If they contain a colon that isn't the second character, it can cause an issue like this.
So for example "mount c cd:\" or "mount c hdd:\dos" is problematic, because DOSBox expects a colon to only appear after a single drive letter. It will still mount ok but can throw errors trying to read the root directory of the mounted drive.

Reply 7 of 16, by VannevarKush

User metadata
Rank Newbie
Rank
Newbie
jmarsh wrote on 2021-06-22, 06:31:

What are the external paths used when mounting the drives?
If they contain a colon that isn't the second character, it can cause an issue like this.
So for example "mount c cd:\" or "mount c hdd:\dos" is problematic, because DOSBox expects a colon to only appear after a single drive letter. It will still mount ok but can throw errors trying to read the root directory of the mounted drive.

It's using MOUNT C "D:\dosfiles\os\Windows 3.11_files\". I've tried with and without the trailing slash 😀 (D: is the CWD for running Xbox applications)

I've found something interesting testing Winbench 96, with the disk mark test. This error does not show up when running from inside an image:

IMG_2752.png
Filename
IMG_2752.png
File size
1.03 MiB
Views
598 views
File license
Public domain

This suggests that the DOS API is behaving unexpectedly. It looks like it is trying to change directory into a file successfully, which is the same as the issue I was seeing in Windows 1 and 2. It looks like this may fail differently on Windows 3.1, although "could not select drive C" was the error, and there is a SELECT DRIVE dos API command.

And, to confirm that DOSXbox DOS is not handling changing directory into a file as expected:

IMG_2759.png
Filename
IMG_2759.png
File size
177.79 KiB
Views
598 views
File license
Public domain

So I may now have what I need to investigate this on the source code side. Hopefully it's not too subtle an issue...

Reply 9 of 16, by VannevarKush

User metadata
Rank Newbie
Rank
Newbie
jmarsh wrote on 2021-06-22, 23:28:

Thanks for the tip there, it turns out that file did need to be updated but that wasn't the bug.

I managed to figure out what was going on, but it was specific to the version of DOSBox, and sadly discussing the nature of the bug would be breaking forum rules... Its kind of funny that nobody had noticed this one over all these years.

Reply 10 of 16, by Caluser2000

User metadata
Rank l33t
Rank
l33t
VannevarKush wrote on 2021-06-22, 20:34:
It's using MOUNT C "D:\dosfiles\os\Windows 3.11_files\". I've tried with and without the trailing slash :) (D: is the CWD for […]
Show full quote
jmarsh wrote on 2021-06-22, 06:31:

What are the external paths used when mounting the drives?
If they contain a colon that isn't the second character, it can cause an issue like this.
So for example "mount c cd:\" or "mount c hdd:\dos" is problematic, because DOSBox expects a colon to only appear after a single drive letter. It will still mount ok but can throw errors trying to read the root directory of the mounted drive.

It's using MOUNT C "D:\dosfiles\os\Windows 3.11_files\". I've tried with and without the trailing slash 😀 (D: is the CWD for running Xbox applications)

I've found something interesting testing Winbench 96, with the disk mark test. This error does not show up when running from inside an image:

IMG_2752.png

This suggests that the DOS API is behaving unexpectedly. It looks like it is trying to change directory into a file successfully, which is the same as the issue I was seeing in Windows 1 and 2. It looks like this may fail differently on Windows 3.1, although "could not select drive C" was the error, and there is a SELECT DRIVE dos API command.

And, to confirm that DOSXbox DOS is not handling changing directory into a file as expected:

IMG_2759.png

So I may now have what I need to investigate this on the source code side. Hopefully it's not too subtle an issue...

There is no directory called msdos.sys at all. msdos.sys is a file so you cannot cd into it.

You need to create a directory, lets say call DOS on your main system.. You then need to mount that directory a the C: drive- mount c ~/DOS

The directory you allocate as C: is case specific and needs to be the same name you use on your main system. ie /DOS and not /dos

Then install win 3.x into the C: drive allocated.

A pic of me just having done that in DosBox on my P200mmx Linux box:

Attachments

  • 20210702_194955.jpg
    Filename
    20210702_194955.jpg
    File size
    697.86 KiB
    Views
    514 views
    File license
    Fair use/fair dealing exception

There's a glitch in the matrix.
A founding member of the 286 appreciation society.
Apparently 32-bit is dead and nobody likes P4s.
Of course, as always, I'm open to correction...😉

Reply 11 of 16, by Caluser2000

User metadata
Rank l33t
Rank
l33t

How did you get on?

There's a glitch in the matrix.
A founding member of the 286 appreciation society.
Apparently 32-bit is dead and nobody likes P4s.
Of course, as always, I'm open to correction...😉

Reply 12 of 16, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Caluser2000 wrote on 2021-07-02, 07:44:

There is no directory called msdos.sys at all. msdos.sys is a file so you cannot cd into it.

The point is that this version of DOSBox is very, very old and has bugs that let you do things you cannot normally do, which consequently affect the functionality of Windows 3.1.

Reply 13 of 16, by Caluser2000

User metadata
Rank l33t
Rank
l33t
Jorpho wrote on 2021-07-02, 19:51:
Caluser2000 wrote on 2021-07-02, 07:44:

There is no directory called msdos.sys at all. msdos.sys is a file so you cannot cd into it.

The point is that this version of DOSBox is very, very old and has bugs that let you do things you cannot normally do, which consequently affect the functionality of Windows 3.1.

The OP tried to open a file instead of a directory. Simple a that.

Attachments

  • ERROR.png
    Filename
    ERROR.png
    File size
    119.49 KiB
    Views
    463 views
    File license
    Fair use/fair dealing exception

There's a glitch in the matrix.
A founding member of the 286 appreciation society.
Apparently 32-bit is dead and nobody likes P4s.
Of course, as always, I'm open to correction...😉

Reply 14 of 16, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Caluser2000 wrote on 2021-07-02, 20:24:

The OP tried to open a file instead of a directory. Simple a that.

No, the OP tried to run Windows 3.x on an ancient version of DOSBox compiled for the original XBox. I am sure the OP is well aware that you are not supposed to be able to use the CD command on a file, but perhaps we should just wait for the OP to come back and tell us what he knows.

Reply 15 of 16, by Caluser2000

User metadata
Rank l33t
Rank
l33t
Jorpho wrote on 2021-07-02, 20:38:
Caluser2000 wrote on 2021-07-02, 20:24:

The OP tried to open a file instead of a directory. Simple a that.

No, the OP tried to run Windows 3.x on an ancient version of DOSBox compiled for the original XBox. I am sure the OP is well aware that you are not supposed to be able to use the CD command on a file, but perhaps we should just wait for the OP to come back and tell us what he knows.

*CLICK!*

There's a glitch in the matrix.
A founding member of the 286 appreciation society.
Apparently 32-bit is dead and nobody likes P4s.
Of course, as always, I'm open to correction...😉

Reply 16 of 16, by VannevarKush

User metadata
Rank Newbie
Rank
Newbie

The version of DOSBox that I am using (DOSXbox) let me CD into the file MSDOS.SYS. If you look at the command prompt in the screenshot you can see it is reporting the current directory as MSDOS.SYS, which is a file. DOSXbox should not have let me CD into MSDOS.SYS in the first place.

Windows 1 through 3.x were having trouble opening files from open file dialogs for this reason. Apparently, when opening an item from an open file dialog, Windows first attempts to CD into the item, then if the CD operation fails, Windows opens it as a file.

Nobody has noticed this bug in DOSXbox because, yes, it would be dumb to CD into a file. It has only been noticed 15+ years later because of a software issue arising from it.