The following AVRFreaks forum post includes source code for, and a discussion of, a port to the ATmega2560. Note you need to log into AVRFreaks to access the source code:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=913185
Thanks to stu_san for this contribution.