I am not good enough. I was able to follow Dudleydes instructions above and that worked, but I do not know how to get this patch to my retropie. I tried to update "dosbox from source" but that did not work.
The PR already been merged, so update your Retropie-Setup script and then update dosbox to get the patched version.
Have you tried dosbox-sdl2? It might have better joystick handling.
I forgot about this because I updated and I can verify that it works. We are not using dosbox-sdl2 in our keyboard 2 joypad project since its not needed. The keyb2joy.pad project document and index keys assigned to functions. We basically fill in columns with the keys used for things like "jump", "move" or "fire". I have then made an utility that produce authentic DOSBox .map files with full Retropie-support based on these profiles. So far we made 550 platform games fully playable on joypad and we are 20% through the 600 shoot-em ups on the DOS platform.
@sonicsheppard also, if you want the sensitivity in the analogs to work better get something with a longer analog joystick. You can get a flightstick or use something like the mad catz xbox 360 gamestick:
i think i figured it out. i am trying to use a ps2 controller. i think it has been assigning the wrong controller to p1 and p2. i have it working if i get it to assign the order correctly. i believe it always assigns correctly if i wait until emulationstation to boot before i press the analog button on the ps2 controller it works properly.