VOGONS

Common searches


First post, by crossoft

User metadata
Rank Newbie
Rank
Newbie

I'm trying to get an obscure game working, and it keeps reporting "not enough disk space" -- I disassembled the .exe and found that it's shelling out a "dir" command and scraping the output text for "bytes free" but since DOS used "bytes free" and DOSBox uses "Bytes free." it isn't finding it. Hacky, yes. But I'm not good enough to patch this .exe.

I thought, hey, I'll just roll a DIR.BAT file that spits out some text, but DOSBox won't run it, since DIR is built-in (presumably).

Any suggestions on how to to override the output of the dir command? Thanks!

Reply 1 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The DIR command in DOSBox also breaks up the number of bytes free with commas, unlike MS-DOS, so your program and its crude methods may not tolerate that.

You can run command shell replacements in DOSBox, such as 4DOS, but COMMAND.COM from MS-DOS 5/6 is most likely to have the exact DIR formatting you want.

Reply 3 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

When a program "shells out" to a command interpreter it typically uses the COMSPEC environment variable to locate the interpreter to run, although some crude programs assume the root directory. By default, DOSBox has the environment variable set for its internal command interpreter on the Z: drive. To be sure all bases are covered, place the shell program in the folder being mounted in DOSBox as the emulated C: drive, and then set the environment variable appropriately. As an example of the SET command, and note that you can put this in the [autoexec] section of the conf file: SET COMSPEC=C:\COMMAND.COM