In which game? Is the game being run natively or through DOSbox? Does the joystick work correctly in other games? Have you calibrated the stick in the windows control panel? For the older games, have you calibrated it in game?
make sure that you don't have any other usb or gameport controlers plugged in. Unplug any other joysticks or gamepads before you run dosbox. Make sure the stick you have left plugged in is calibrated in windows and then run the game in dosbox and make sure you choose joystick in the inflight options menu.