This is first public version of MIDI input patch for Dosbox (win32 only for now). It includes also a partial rewrite of MPU401 with various improvements and better correctness (at least according to it's programming manual).
MIDI input should work with SB UART, SB16 MPU401 port, GUS and MPU401 UART. Intelligent mode input still isn't 100% supported (and isn't tested yet).
In dosbox.conf there is a new variable in midi section "inconfig" which can contain single integer value like 0,1, etc. If set to "none" it should disable input.
Note that I didn't test the patch recently (and only slightly modified it to compile on mingw). diff files were modified by hand, so it is possible that they will not work with the patch app and have to be applied manually. Provided are also .cpp source files of changed files, but they don't match diff files completely (e.g. sblaster.cpp doesn't contain latest mixer changes). Those issues will be corrected in future updates.
To compile on VS2005, check commented part in midi_win32.cpp regarding the midi callback function pointer.