I want to announce that a further development of InpOut32 library and driver was continued in a project that is named InpOutNG and some work had been done. Also, I'm glad to introduce new features to you.
Surprisingly, access to 40-years old ISA bus is still required and there was a need to make it work not only with data in-out but also with IRQ handling on modern Windows 10.
Great work of phil was a perfect launchpad for the new development!
The driver was deeply reworked and was implemented with windows driver framework to simplify things. Also, IRQ handling support was introduced with a user notification in case of it.
DLL was changed also to reflect changes in driver part.
New library preserves its file name and the manner that inpout32 have: it is an open source windows DLL and Driver to give direct access to hardware ports.
Basic functions were retained, as for now DLL has the following with unchanged behavior nor API:
inp8 / outp8 — read or write a byte from / to a port
inp16 / outp16 — read or write a word (16-bits) from / to a port
inp32 / outp32 — read or write a dword (32-bits)
IsInpOutDriverOpen — checks if the driver is available and working
IsXP64Bit — checks if dll is launched in 64-bit environment
One can organize commands to driver in a array fashion and multiple I/O requests will be done in batch mode with a single function call. The driver and DLL will process the task list and return data to user. As for now only read or write data tasks are supported (8/16/32 bits to/from ports).
One can assign a hardware IRQ to driver like it was originally made in Windows 95/98 through a Device manager and tell a DLL to notify you about IRQ occurrence or make some task in case of it additionally. Also, a developer can set sequence that will clear interrupt line. That happened useful while working with different ISA cards. Two functions are introduced:
waitForIrq — works same as waitForSingleObject, that is the function will wait for IRQ event and return only after it happened.
doOnIrq — in addition to previous one the function will process task supplied by user. The point is to make I/O operations as much close to IRQ occurence as possible without switching context.
Same as the original inpout32, this version automatically determines Windows version (32 or 64 bits) and installs appropriate driver. Under the hood Windows SetupAPI is used to make proper things and the virtual device is visible in the Windows Device Manager (System devices section) after installation. In case of IRQ management this is especially necessary. Also this way deals with modern Windows file symlinks correctly.
DLPortIO support was dropped but can be easily rolled back if someone is interested in it.
MapPhysToLin / GetPhysLong support was also dropped and, probably it's not so easy to implement it in case of using WDF framework but, again, if someone is interested in it everything is possible.
- Windows 32 or 64-bit (tested on Windows 7 SP1 and 10 (LTSC 1809 and Pro 21H2) but should work on any of it starting from Windows XP SP3)
- Testing mode or disabled driver signature testing due to Microsoft security policies
- Administrator rights, required only for driver installation procedure
This version has very little overhead. Simple I/O operation completes in approximately 5us. During stability tests with application priority set to realtime it easily dealed with 5kHz interrupts sent from ISA board leaving a time to tens of IO ops between interrupts.
- That silly «Windows testing mode». The driver is self-signed as I'm not able to sign it in a way Microsoft requires. So, for use this version you must turn on Test mode with Sad but true.
Code: Select all
bcdedit /set TESTSIGNING ON
- Task processing is now done only while working with Irq. Maybe, it's not right and that functionality should be provided in a way like other inp / outp functions.
- Sometimes the driver does not install in the way I'm expecting. Still can not find the clue how to fix it. Probably, you will never get stuck to it.
- Lack of internationalization. As for now, the driver and DLL have many Russian in code.
- Binary releases of a current and further versions.
- Make comments and docs in English.
- Make doxygen html docs.
- Task processing not only in Irq handler.
Everythis is organized and will be maintained in a github repo. Feel free to contact me if you have any questions / queries but bear in mind that this is a hobby project and I need to find a free time to answer.
- I (The Author) make no guarantee that this software is free from bugs and will not harm your system.
- However, the author actively run this software while testing and all downloads have been checked for known viruses.
- The author assures that every release build of a driver passed Static Driver Verifier procedure successfully with no warnings or defects.