The Film
The film The Ninth Configuration written, produced, and directed by William Peter Blatty, the author of The Exorcist
Released in 1980 and starring Stacy Keach (Colonel Kane) and Scott Wilson(Captain Cutshaw). It is based on Blatty's reworking of an earlier novel, Twinkle, Twinkle, "Killer" Kane! (1966) and rewritten as The Ninth Configuration (1978).
It's a psychological drama set in a gothic castle, housing American soldiers sent home from Vietnam to find out if they are genuine lunatics or just faking it. Into this mix is thrown a psychiatrist (Kane) to evaluate the inmates and slowly builds to a tense and rewarding ending
View Mark Kermodes uncut review of the film here and get more details on IMDB