Home » Questions » Computers [ Ask a new question ]

Renaming Z drive in DOSBox

Renaming Z drive in DOSBox

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.)

Asked by: Guest | Views: 66
Total answers/comments: 1
Guest [Entry]

"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:

Z: in string literals (change to Y:)
z: in string literals (change to y:)
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"