You can do that with the MDL SDK. It contains HMP save functions.