Long before the film hit theaters, the story began with Philip K. Dick. On the Archive, you can find the Piers Anthony novelization