VOGONS


First post, by jcubed

User metadata
Rank Newbie
Rank
Newbie

I am trying to run a DOS-based CAD program called 4Design. When I run the program, I get the error "Fortran runtime error on external file "COM2" (2): No such file or directory" in the dosbox window and the error "Warning: file creation failed: currentDirectory\COM2" in the command window.

The file COM2 does not exist in the directory, however, if I try and create it in Windows Explorer, I am unable to.

Does anyone have any suggestions.

Thanks.

Reply 3 of 12, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Hmm - try editing your dosbox.conf file. Find the section that reads:
[code][directserial]
# directserial -- Enable serial passthrough support.
# comport -- COM Port inside DOSBox.
# realport -- COM Port on the Host.
# defaultbps -- Default BPS.
# parity -- Parity of the packets. This can be N, E or O.
# bytesize -- Size of each packet. This can be 5 or 8.
# stopbit -- The number of stopbits. This can be 1 or 2.

directserial=false
comport=1
realport=COM1[/code]
Set directserial=true (and perhaps comport=2) and run the program again.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 5 of 12, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmm not sure if we have com2 in the devices list. Don't think so.

so no go I think.

do you have write acces to the current directory ?

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

Reply 6 of 12, by jcubed

User metadata
Rank Newbie
Rank
Newbie

I changed the directory from read only to all access. That didn't help. I tried running the program from other directories and ran into the same problem. It tells me it can't create the file in any directory basically. I'll see if there is some setting in the app specifying com2. I really appreciate all the suggestions on this. It would be awesome if this works.

Reply 7 of 12, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If the screenshot below is a (more or less) correct looking
one, then you need that com2-thing fixed (this can be done
by replacing the string COM2 by NUL in 4d.exe using a
hex-editor, where the digit '2' is replaced by hex-code zero)
and a 16-colours vesa mode.
There exists a patch on sourceforge that enables 16-colour
vesa modes inside dosbox, so you could apply that patch and
compile dosbox. Don't know if that patch is compiled into
one of the unofficial dosbox builds.
Also you could try to force 4d-cad into using an 8bit colour
mode, if you have some manuals or so you could try to find
out how to accomplish this (with that configure utility or
by some command-line switch of 4d-cad).

Now if that screenshot is really wrong (like missing a lot
of stuff), you could still try the above, maybe i got sth
with the paths wrong (it shows an "menus incompatible with
vide mode" message on startup, which i ignored).

wd

Attachments

  • 4d_cad.png
    Filename
    4d_cad.png
    File size
    3.52 KiB
    Views
    1491 views
    File license
    Fair use/fair dealing exception

Reply 9 of 12, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

No, MS-DOS defines a number of "magic" filenames. Some of these magic names are CON (the console/screen), PRN (the printer), COM<n> (serial port <n>), and NUL (the bit-bucket). This magic is still present in Windows. Try opening a CMD.EXE window and enter echo Hello world > PRN, you will be duly informed that "The file PRN does not exist".

DOSBox implements some of these magic files, in particular NUL, but not COM2. So if you edit every occurrance of COM2 (43 4F 4D 32) with NUL<nul> (4E 55 4C 00), the 4D.EXE will succeed in opening the magic file 😀

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 10 of 12, by jcubed

User metadata
Rank Newbie
Rank
Newbie

Thanks for the tip. Actually the problem was that the search function by default in the hex editor was set to case sensitive and I was searching for lower case. There's only one instance of "COM2" in capital letters. So I changed THAT 2 to 00 in hex and it worked, but now I have the graphics problem that wd explained the solution to. I have to try that solution. In fact the graphics problem that is being solved there is the same problem you get trying to run the CAD program straight from WinXP.