The program they used for A Scanner Darkly was rotoshop.
This was done in another film called Waking Life just not as defined but still pretty damn good.
Here is a tutorial of how they did it in Waking Life. Your basic export to filmstrip, rotoscoping and a bunch of properties and layering yadda yadda yadda.
http://www.toolfarm.com/tutorials/wakinglife.html
You'll need Premiere, Photoshop and After Effects for this one. If anybody decided to do this let me know i'd like to see it very much.