Code dump - BROKEN - some code for decoding tftd file formats. Someone may find it useful as a reference...