Skip to content

Conversation

@0957811
Copy link
Contributor

@0957811 0957811 commented Mar 13, 2025

I added support for device drivers to be loaded automatically.
This is intended for virtual device drivers that use NTVDM to access the real hardware.
It was already possible to load drivers using software like loadsys or devload.
This new code tries to load every .sys file specified in config.sys before running the dos executable.
Config.sys must be in the same folder as msdos.exe.
Most of this code is from or inspired by ReactOS

0957811 and others added 3 commits March 13, 2025 15:46
 -Automatically load device drivers specified in config.sys
  Intended for VDD drivers interacting with the real hardware through NTVDM
Modifying comments
Change to comments
@cracyc
Copy link
Owner

cracyc commented Mar 16, 2025

What driver are you running with this? I'm not a huge fan of requiring a config.sys as msdos-player is mostly standalone I'd like to keep it like that.

@0957811
Copy link
Contributor Author

0957811 commented Mar 17, 2025

The config.sys file is not required if you don't want to load external drivers. If that file is not found, no drivers will be loaded and the standalone functionality will remain unchanged. I am running a virtual device driver for a Modbus-Plus industrial communications card (Cyberlogic MBX Driver Suite). This VDD hooks to an interrupt (by default at 0x5C) to emulate NetBios functionality of a legacy ISA card. On the 32-bit DLL side, it interfaces with a whole suite of drivers to support different hardware. Sadly all of that is proprietary software. For testing purposes, I had to patch my .sys driver binary to register a predefined interrupt vector during the init routine instead of choosing one afterwards with IOCTL calls. It works as is, but my next goal is to add basic IOCTL functionality to support the unmodified driver. I know that is a niche application and we can close the pull request if you don't find that relevant. I can also make some modifications if you have suggestions and you would like it done another way.

@cracyc
Copy link
Owner

cracyc commented Mar 17, 2025

No, I think it's very relevant and having character driver support for that kind of use is good (block and replacement con drivers will probably not work so maybe those should just not be loaded). I just think the imported reactos code is over complex, although I am trying to stay close to upstream if takeda pulled it in I'd just follow.

0957811 added 2 commits March 17, 2025 22:39
Made sure to always use the same path as msdos.exe for config.sys
Added special driver subsegment MCB to make MEM.exe correctly display the installed devices
Added IOCTL Write (int_21h_4403h) functionality for the installed devices
@cracyc
Copy link
Owner

cracyc commented Mar 23, 2025

The latest upstream release sets the "FILES=" from a command line option rather than reading it from the config.sys. Maybe that is how device drivers should be loaded too.

@cracyc cracyc merged commit 11bfe99 into cracyc:vt Mar 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants