Here is something I threw together, it compiles but I haven't tested it with hardware.
It reads a joystick at address 55 (you may have to change this address for you joystick) and profiles the x and y values. You will have to edit the profile points to your liking but it should be what you are looking for.
Tyler