Sigurbjörn Lárusson's blog

Musings of a network engineer

Extract-ADF (modified)

my altered version of Michael Steil's (who has a blog over at Pagetable) program to extract files from an ADF (Amiga disk file). My altered version restores the full file path (not just the filename itself), allows you to set the start and end sector (useful for HD floppies or damaged adf files) and made the debug output a compilation option instead of the default As part of my ongoing fun with the Amiga developer pre-release tools hidden on the 27.X kickstart disks I was curious to run some of the binaries through a hex dumper that was able to decode the Amiga binary, mainly in search of "interesting" (it's only really interesting if you're an Amiga fan or a nerd to a high degree) information.

As some of you might know an Amiga binary file has multiple hunks, of different types, which contain the executable binary code as well as all sorts of optional information (including debug information). There is a good document Over on Wikipedia that describes the Amiga Hunk format to a good degree. This tool is designed to run through a binary file, decoding those hunks and giving you information about each one of them.

The program takes one required argument (which is the filename of the binary to decode) and two optional ones

  • -o to specify and output file to write the output of the program to (instead of standard output which is default)
  • -d to get additional (debug) output about each and every hunk. If you enable debug it will also dump any string it finds (the term string is used very loosely, it basically finds any 3 character ascii combination (in a row) and dumps it out). It will also rot13 decode all data to see if there's a hidden rot13 encoded string in the binary somewhere.

The tool is available on my GitHub page as objectexaminer.c. It should be easy to compile on any *nix system with gcc -o objectexaminer objectexaminer.c