Mr Roache, 81, entered the witness box at Preston Crown Court to give evidence in his denial of two rapes and four indecent assaults, involving five complainants aged 16 and under.
During the period of the alleged offences between 1965 and 1971, he lived with actress wife Anna Cropper, in a bungalow in Lancashire and a flat in London.
One of the alleged victims says Mr Roache raped her at the bungalow in 1967 and then at an adjoining cottage later the same year.
The defendant was asked about his first marriage, which he said was in trouble from 1965 until 1969 when the couple divorced.
"Were you faithful to Anna Cropper during that time?" asked his barrister Louise Blackwell QC.
"No, I was not, I'm sorry to say," Roache, who plays Ken Barlow in the ITV soap, replied.
He was asked how often he had been unfaithful.
"Intermittently," he replied. "There was a period in my marriage which was not as fulfilling as it should have been and I did have a series of relationships."
Mr Roache said he began a relationship with his second wife Sara Mottram in 1970 or 1971 and they were married in 1978.
Miss Blackwell asked if, "from the time of meeting" his second wife, he was faithful to her.
"Totally faithful. For 39 years until her death, I was totally and absolutely faithful."
Soon after he went into the witness box, Miss Blackwell asked Mr Roache: "Have you committed any of the offences with which you have been charged?"
"No, I have not," Mr Roache said.
The trial continues.