How to use Arduino as JTAG?

I've read online that it is possible to use Arduino as a JTAG programmer. I was not able to find a how-to or a sketch to play with. I would like to be able to use my Arduino ATMega to read and replace data on my phone.

Here is the board which I am trying to flash . It has standard JTAG pins. Just like a Linksys Router

I'd rather use Arduino and then help others to do the same rather then buy a $150 usb JTag programmer, or waste $50 on a parallel port and cable which I must destroy to complete this project. it seems cleaner and more effective to use a general purpose Arduino.

I'm absolutely positive that it is possible and it has been reported that JTAG has been done with the Arduino. I would like to know how though. I'm an exprienced sketcher and developer. Any help, links, thoughts or suggestions would be appreciated.

I found something on the dd-wrt forums.

I can't download it from here on my phone, but I will try later tonight.

I recently purchased a "Altera Compatible JTAG USB Blaster Programmer" for $US 24 from JK Devices. So you don't necessarily have to spend $150. That worked fine programming an Amani64 CPLD.