joncampbell123 / dosbox-x

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

How about integration into the Windows shell #1403

Open WindowsNinetyTen opened 4 years ago

WindowsNinetyTen commented 4 years ago

Say, I think that it would be a great idea to integrate DOSBox-X into the Windows shell. That means that when one tries to open a DOS program in Windows, the program would be launched inside DOSBox-X. It would be like NTVDM in this way.

joncampbell123 commented 4 years ago

I'm not sure how to do that, but perhaps WineVDM might be a good reference. If my guess is correct it is able to direct attempts to run MS-DOS executables to itself.

https://github.com/otya128/winevdm

Would you like to try?

cracyc commented 4 years ago

Winevdm exploits a feature that microsoft put in 64bit windows to load 32bit replacements for 16bit installers. Unfortunately, it doesn't work for dos programs.

RNMB15 commented 4 years ago

I also think it's a good idea that she modifies the WineVDM so that she recognizes whether it is a Win16 or a DOS application. You could do that. if it opens an EXE file and it is a 16bit application (where WineVDM is then loaded), the WineVDM checks whether it is a Win16 or a DOS application.

WindowsNinetyTen commented 4 years ago

If my guess is correct it is able to direct attempts to run MS-DOS executables to itself.

When one tries to open a DOS program, it doesn't launch under WineVDM. Also, when one tries to use OTVMDW to open a DOS program, there's just a "VM Context" error message. So perhaps some DOSBox-X and/or NTVDM(x64) source code can be implemented into WineVDM.

Would you like to try?

I'd love to, but I don't really know how to program.

cracyc commented 4 years ago

I also think it's a good idea that she modifies the WineVDM so that she recognizes whether it is a Win16 or a DOS application. You could do that. if it opens an EXE file and it is a 16bit application (where WineVDM is then loaded), the WineVDM checks whether it is a Win16 or a DOS application.

It already does this. If you try to run a dos program from winevdm, it'll open it with itself by default (which doesn't work well). An alternative dos emulator can be set in the otvdm.ini file but it's run directly on the command line so dosbox would require some glue to mount the drives properly and launch the dos program.

To be clear though, Windows will not launch winevdm if you try to run a dos program from Explorer and there's nothing short of the ntvdmx64 shim (which is problematic because it needs to be loaded into every win32 program and so looks like malware to some antivirus) that will make it work. It only works with win16 programs.