It's called JoytoKey and it's freeware. It's made by a Japanese author,
they have an english version of his web site. I was able to map the
joystick axis in Grand Theft Auto 3. Then I tried my flight stick, it
also worked - fun driving the car with it. Twist stick as left/right,
pov hat for looking around, etc.
To map. You can leave the game with joystick options off (sometimes
works with it on), but map the keyboard to the joystick - open joytokey
and have it running. When you run your game and use the joystick, it
thinks you are pressing keys on the keyboard.
To map additional axis, like rudders, and 2nd analog stick, pov hat,
etc. enable them in joytokey - there's a box you have to check.