KVideoGen is a small utility that will help you to write modelines for XFree86, giving you the best modes you can get from your graphics subsystem.