petxd

Latest Release: 

petxd is an xxd-like hex dumper that outputs using a Unicode/PETSCII representation - when used in a terminal or console with our C64 Pro Mono font, the result is a pleasing and familiar PETSCII rendition of whatever binary data you are inspecting.

Command line options are similar to those found in xxd. Of particular interest is -L/--load which uses the first two bytes of the file as the starting/load address. Try "petxd --help".

For example, the following commands produce a dump of the same bytes for a c64 prg file; the difference is that xxd shows an ASCII rendition of the data and petxd shows a PETSCII rendition.

xxd -l256 -c16 -g1 -s2 -o0x7ff file.prg
xxd.png
output from xxd - the right column is an ASCII representation

petxd -l256 -L file.prg --color
petxd.png
output from petxd - the right column is a PETSCII representation (using C128 Pro Mono)

Also like xxd, command line arguments can be given in hex format using either of the following styles:

0xdead  $beef

Finally, in the absence of a filename, petxd will expect to read input from a redirection/pipe; for example here we're going to dump sector 18:0 from the piped disk image

cat disk.d64 | petxd -l256 -s0x16500