joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.68k stars 381 forks source link

Possibly support Drive Z commands on all MS-Dos versions? #790

Open jkammueller opened 6 years ago

jkammueller commented 6 years ago

Hi. I noticed that the drive Z: only seem to work with DOSBox-x's built-in DOS 5.00. Would it be possible to support any version of MS-DOS or even port it so any installed OS has a version of these commands within DOSBox-x? If this was possible, we could possibly enable more support for things like mounting with-in the installed os. i have found that the drive z is simply a ram drive with command.com and other commands so i copied them off z: and attempted to run them from ms-dos 6.22 and 7.1 only to crash dosbox-x. It is going to be exciting to see this develop further.

joncampbell123 commented 6 years ago

Builtin commands on drive Z: can never run from within MS-DOS because of the way the callback instruction works and the allocation of CPU callbacks (src/cpu/callback.cpp).

I do intend to develop programs however that can run within a guest MS-DOS system and enhance it.

One good example so far, is a mouse driver in DOSLIB that enables moving the mouse cursor in Windows 3.1 without having to capture the mouse.

yksoft1 commented 6 years ago

Isn't that you can't see drive Z: at all if you boot DOS disk image in Dosbox-X?

jkammueller commented 6 years ago

i think i used 1.2 dosbox svn-daum (dosbox .74 fork?) to extract the z drive now that i think of it. i also am pondering the concept of a BIOS setup program that could possibly replace and eliminate the need for drive z all together. any thoughts?

joncampbell123 commented 6 years ago

Drive Z: as emulated by DOSBox-X is a purely virtual device (drive letter) that only exists when DOSBox-X is emulating the DOS kernel. If the DOSBox-X kernel is shut down to run MS-DOS, then DOSBox-X's drive Z: cannot exist.

Even if you do copy the .COM files from drive Z: into MS-DOS, the built-in binary programs are heavily dependent on running within the DOSBox-X DOS kernel.

joncampbell123 commented 6 years ago

I'm not clear on how your BIOS setup program would work or what it would do. Can you explain?

jkammueller commented 6 years ago

the concept is that it would activate immediately upon load and configure the virtual machine. it would behave the same way as a machine BIOS does. You power on the machine, press f10 (or configuratable key) to enter setup, define drives, ram, enable hardware, etc., save settings, reboot (bios saves to dosbox.conf or separate bios.ini if desired file) and all boots the way u want it) with drives on a hardware level, settings, etc. how does this sound?

joncampbell123 commented 6 years ago

That would be awesome! I've thought about doing that myself, but I'm busy writing documentation and emulation testing at this time.

You don't have to make it actual native code, you could mod the BIOS startup screen so that you hit DEL/F2 to enter setup just like on real BIOSes.

To keep things simple, write the code for IBM PC/AT emulation mode and don't worry about PC-98 mode for the moment.

joncampbell123 commented 6 years ago

When you write the code to generate boxes and text, make sure to write them as functions rather than hard-code. That would make it easier to port to PC-98 mode later on despite the completely different video hardware and keyboard input system.

jkammueller commented 6 years ago

Thank you for this wonderful opportunity to code. I'm so sorry I led you to believe I'm a coder but I have very little experience with coding. My intentions were to just share an idea I had. With what little experience I do have, I have coded in c++ and basic some very simple applications but sadly there would need to be a very steep learning curve prior to making this concept come to life. However, I will research what you mentioned and build on that.

joncampbell123 commented 6 years ago

@jkammueller Then depending on what you want, writing a BIOS-like menu might be a reasonable end-goal to learning C++. Perhaps forking DOSBox-X and playing around with parts of the code to see what happens may help. You'll break it of course, but you'll learn from the experience.

jkammueller commented 6 years ago

Thank you! I know it will be an interesting experience indeed! :-)