Infinite Jest Questions - Spoilers

I can’t believe it has been 11 years since I read this and memory of it has become a total blur.

Did James Incandenza create the samizdat to snap Hal out of his condition? Did James know Hal was going to develop this condition? Why was Don Gately (with Hal) going to did up James’ body (this might not have happened in the book, but I think it did in the Year of Glad)?