A photograph of serial killer Peter Sutcliffe was found on the phone of the teenager who admitted the manslaughter of two people in street attacks.
The boy, who cannot be named for legal reasons, has admitted manslaughter on the grounds of diminished responsibility.
It follows the killings of James Attfield, 33, and Nahid Almanea, 31, and is on trial for their murders.
“There is no dispute that he killed those two people”Philip Bennetts QC
Guildford Crown Court also heard that material found on the boy's phone included "five horrific serial killers" and details about their lives.
Philip Bennetts QC, prosecuting, told the jury that the boy was 15 at the time of the killings, adding: "There is no dispute that he killed those two people.
"You will hear that the defendant gave accounts of experiencing auditory and visionary hallucinations that compelled him to carry out the killings."
Mr Bennetts told the jury that the defendant's claims of experiencing such hallucinations have been deemed to be of "doubtful authenticity" by an expert.
The prosecution believes the claims are part of the defendant's attempts to "deceive".
The jury heard the boy, who is in a hospital, admitted stabbing Mr Attfield over 100 times on March 29, 2014.
Mr Attfield was found fighting for his life in Colchester's Castle Park in the early hours of the morning. He died a short time later.
One of the injuries suffered by the victim was a stab wound to the left eye.
And three months later, the boy knifed Saudi student Ms Almanea on the morning of June 17, 2014.
The teenager, from Colchester, was arrested after being found with a lock knife on May 26 last year.
He has since pleaded guilty to having that weapon.
Mr Bennetts said that when the boy was being assessed over his fitness to be detained and interviewed, he said: "I have been hearing voices which have told me to murder people and I've murdered two people."
The prosecutor went on to say that the boy admitted to the murders and that voices had told him to "sacrifice people".
Mr Bennetts told the jury that the boy said: "I was sitting in the living room when my parents were fast asleep in bed.
"I heard these voices saying you need to make a sacrifice and if you don't do it we're coming to get you."
The jury heard the boy had looked up a news report about Kenneth Erskine, who killed seven pensioners.
It was argued that Erskine, dubbed the Stockwell Strangler, should have his convictions reduced to manslaughter on the grounds of diminished responsibility.
DVDs found at the boy's premises included one about Sutcliffe.
Mr Bennetts said the boy pleaded guilty to manslaughter on the basis that at the time of the killings his responsibility was diminished.
He added: "The prosecution do not accept that it was."
On the day he was arrested, the boy was seen "acting suspiciously" and told police he was experiencing "depression" that day.
The boy denies murder and the trial continues.