VOGONS


First post, by whocrazy

User metadata
Rank Newbie
Rank
Newbie

Hello there. There's this game I am trying to run, it's called drone, no it does not run from a cd, it is a simple text based game written in q basic.
Anyhow, when I try to run the game, I get this error in the console.
Warning: file d:\drone\CON exists and failed to open in write mode.
Please Remove write-protection.
What gives?
Here are the autoexec.bat lines at the end of dosbox.conf
mount c c:\
mount d d:\
I then cd to drone (cd\d:\drone)
then type drone
I then get this error
path/file access error in line no line number in module drone at address 0f02:0117
Hit any key to return to system.

Ok guys, it's over to you.

Reply 3 of 37, by simonecuttlefish

User metadata
Rank Newbie
Rank
Newbie

Any chance the folder d:\drone\CON is marked read only? This can happen if you drag folders off a cd onto your hard disk. Right click the \Drone directory in windows and select properties->security and give yourself full control of it and it's sub directories if this is the case.

Also, It could possibly be freaking out if it "thinks" it should be in c:\drone? ... or another location (if it was copied from another installed version and has some local settings pointing to a different location? Does it have a .cfg or .ini file in it you can open with notepad and get some hints from?

Guesses, but worth a fast check.

Reply 4 of 37, by whocrazy

User metadata
Rank Newbie
Rank
Newbie

No, that's not it at all. Drone has no cfg file or ini file, it's designed to run from any folder.
The game will run in real dos, but not dosbox.
I could put the game up somewhere for the developers of dosbox to try out themselves, and see if there is anything that can be done to fix it.
The game did not come on a cd.

Reply 5 of 37, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

CON is one of the "reserved" names in DOS, in this case for the console device. Like NUL, PRN, LPT1, etc. Since it's a text game written in BASIC, perhaps it is trying to open the console device like a file using its name in an OPEN command. Could be an issue with something like that; and would be easy to see if it IS doing that if you have the BASIC source code.

Reply 7 of 37, by whocrazy

User metadata
Rank Newbie
Rank
Newbie

Hi there.
I'll see if he has the source somewhere, but if he doesn't, bad luck. it's a very old game
.. Anyways, I'm no programming expert, so even if I had the source I wouldn't be able to make sense of it.

Reply 8 of 37, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well it works to some degree.
if the path is illegal then dosbox will report an error. (so installers can use devices to determine wether a directory exists or not)

However if the path is legal, it appears that I made a small error in the coding as we then compare the full name against the device name instead of only the filename.

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

Reply 12 of 37, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I have QuickBASIC Extended v7.1, and I tested this super simple example:

OPEN "CON" FOR OUTPUT ACCESS WRITE AS #1
PRINT #1, "HI"

Running in the WinXP command shell, this prints "HI" out to the screen, but running inside DOSBox it throws a "File not found" error. No preceding path is specified, but maybe one is being used internally by QBasic...

Reply 14 of 37, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yes, QBasic 1.0 (the one included with MSDOS 5.0), behaves the same.

Hehe, I even tried something more archaic using BASICA.EXE from Compaq DOS 3.31 (can't use IBM's BASICA unless you have the ROMs):

10 OPEN "O", 1, "CON"
20 PRINT #1, "HI"

The aboves works OK in the command shell, but gives an "Illegal Function call in 10" in DOSBox.

Reply 17 of 37, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Exactly the problem I was talking about. (checking if it is a device fails when a directory is before it and the directory is valid)

RCS file: /cvsroot/dosbox/dosbox/src/dos/dos_devices.cpp,v
retrieving revision 1.18
diff -u -r1.18 dos_devices.cpp
--- dos/dos_devices.cpp 14 Jun 2007 08:23:46 -0000 1.18
+++ dos/dos_devices.cpp 26 Sep 2007 09:55:32 -0000
@@ -138,13 +138,14 @@
Bit8u drive;char fulldir[DOS_PATHLENGTH];
if (!DOS_MakeName(temp,fulldir,&drive)) return DOS_DEVICES;
if(!Drives[drive]->TestDir(fulldir)) return DOS_DEVICES;
- *leading='\\';
- }
+// *leading='\\';
+ leading++;
+ } else leading = temp;

/* loop through devices */
for(Bit8u index = 0;index < DOS_DEVICES;index++) {
if (Devices[index]) {
- if (WildFileCmp(temp,Devices[index]->name)) return index;
+ if (WildFileCmp(leading,Devices[index]->name)) return index;
}
}
return DOS_DEVICES;

Sample code doesn't work though. as they try set device information on it.

Is that qbasic freeware nowadays ?

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

Reply 18 of 37, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The wikipedia article about QBasic has a direct download link for it on the Microsoft servers.

http://en.wikipedia.org/wiki/QBasic

Maybe only free for personal use, not for distribution.

Reply 19 of 37, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

My best guess is that you are only allowed to download/use it if you already have a valid license to W95.

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