Reply 2240 of 2309, by shortlyfelongrope
I ran into this issue (Windows 98 - Controller not recognized ? ) recently (began trying to tackle it around 2021-08). I have found a solution, and it possibly points to an error within dosbox-x.
I am running windows 10 (whatever service pack is current as of 2021-10-16), on an i4770k @ stock (3.5GHz) system, 32GB ram, GTX1080ti. I use vjoy to map my xbox elite series 2 controller to old games, so I am routing through vjoy. I use hidguardian to block win10 from seeing the xbox controller, so in control panel -> devices and printers -> controllers only sees vjoy. I am running dosbox-x v.18 build though this is present on the .17 and .16 versions as well.
I load win95 (any version, tested it on RTM, a, b, and c) or win98 (any version, tested RTM and SE). My controller is recognized in the dosbox-x mapper, and works in mechwarrior 2 run through dosbox-x. However, the controller is not recognized within win9x operating as guest os within dosbox-x.
Under my computer -> control panel -> system -> device manager -> sound, video, and game controllers, there is listed: 1) creative labs sound blaster 16 plug and play, 2) gameport joystick, 3) mpu-401 compatible.
Under gameport joystick -> properties -> resources, there is only the option for "basic configuration 0000", which is i/o range 0200-0207. This range will not recognize dosbox-x emulating the gameport joystick. There is no "basic configuration 0" or "basic configuration 1" as others have suggested to use. This makes the joystick not visible in win9x, and will not work.
Now, the fix:
1) Under device manager -> sound, video, and game controllers, select gameport joystick, and hit "remove".
2) In control panel, launch "add new hardware".
3) Click "next".
4) Select "no" -- we are going to manually install the gameport.
5) From the list, near the bottom, select "sound, video and game controllers" and hit "next".
6) In the left hand list select "microsoft", in the right hand list select "gameport joystick" (there may be a few, with driver dates listed, try each of them until one works, though, it may require repeating this entire process for each attempt). Once both sides have been selected, hit "next".
7) It should now list i/o as 0201. Hit "next".
8) Hit "finish".
9) It will ask to restart, hit "no" -- if you restart, it will reset the i/o range, and you need to repeat this process.
I need to repeat this every single time i restart win9x under dosbox-x. It's not that difficult, but it is quite annoying.
It is worth pointing out that PCEM and 86box both emulate the gameport controller and accept vjoy and joysticks on the i/o range of 0200-0207. I believe this means dosbox-x is not feeding windows the correct gameport i/o information. I am not a CE expert, so I have no real idea what's going on here, but it does point to an issue that might have a simple fix in the dosbox-x code.