Renaming Z drive in DOSBox

3

DOSBox makes a virtual drive, which it names Z:, for storing utility stuff on. Clearly they're trying to stay out of your way, so you can do whatever you want with the C: drive. Swell, I understand that. But I've got some old database accessing software I really, really want to run which assumes it lives on the Z drive. So I need to get DOSBox's Z called anything else. (C would be fine with me.)

I've seen mentions that it is possible, but no actual indication of how to do it. Anything that gets the job done is appreciated.

Jay Kominek

Posted 2009-10-03T21:08:26.270

Reputation: 144

Answers

7

Short answer: No. Not in "generally available builds". (According to the DOSBox Wiki.)

Long answer: Maybe. It looks like something that's been defined in the source code and not easily configured.

Update: Yes, it can be done. It is hard-coded in the source code. To change it, you'll need to get the source, modify it, and build the program from your sources. Afterwards you should be able to use your modded dosbox with any frontend you like.

You'll need to change 3 kinds of references to accomplish this:

  1. Z: in string literals (change to Y:)
  2. z: in string literals (change to y:)
  3. 25 as an array index, found when initializing the Default drive (change to 24)

I can't provide a patch, because my testing used CVS sources and there's no guarantee my changes will be cleanly applied to later CVS dumps. The references shouldn't be hard to spot, and all my changes were confined to 4 files:

  • the first two are found in src/shell/shell.cpp and src/shell/shell_cmds.cpp
  • the third is found in the files src/dos/dos.cpp and src/dos/dos_files.cpp

quack quixote

Posted 2009-10-03T21:08:26.270

Reputation: 37 382