DOMINICK REUTER via Getty Images

Cosby's lawyers argued that the case should be dismissed

Their star witness, an ex-prosecutor, said he believed the accuser, but couldn't prove her account in court

The comedian appeared unsteady as he arrived at court

Meanwhile, Cosby scored a victory and a setback in two other lawsuits involving accusations of sexual misconduct

Lawyers for entertainer Bill Cosby and the Philadelphia prosecutor accusing him of molesting a woman in 2004 went to court Tuesday to argue over crucial evidence -- namely, Cosby's own words about the alleged sexual attack.

Cosby, 78, faces a charge that he drugged and molested Andrea Constand, who was then a women's basketball assistant at Temple University, at his suburban Philadelphia home in 2004. It is the only criminal case to result from various complaints involving some 50 women who have accused him of indecent acts going back decades. Cosby's defense had sought to dismiss Constand's charge, or at least prevent prosecutors from using sworn depositions that Cosby gave in 2005 and 2006 in response to a lawsuit Constand filed against him.

Tuesday was a busy day for Cosby’s defense, as his attorneys in Los Angeles unsuccessfully tried to shield him from a deposition in a separate lawsuit. A judge ordered that Cosby must sit for additional questions about an alleged 1974 sexual assault at the Playboy mansion. Meanwhile, a different woman suing Cosby for alleged sexual battery at the famed home of Hugh Hefner dropped her lawsuit.

Newly elected Montgomery County District Attorney Kevin Steele announced Cosby's arrest in December. A previous DA said there wasn't enough evidence to prosecute.

Cosby traveled to the courthouse in Norristown, Pennsylvania, Tuesday morning. He walked with a cane and the assistance of two men, who linked arms with him.

The TV star's attorneys argued that Steele built the charge around evidence that can't be used in a criminal case, including the depositions in which Cosby admitted giving pills to Constand to "take some of the stress away" before he lifted her bra and slid a hand into her pants. The depositions conflict with statements Cosby made to authorities when they initially looked into Constand's accusation. Constand and the comedian later settled the lawsuit out of court.

Cosby's deposition statements shouldn't be used, the defense said, because he only agreed to testify in the lawsuit after then-District Attorney Bruce Castor said he wouldn't prosecute the entertainer. Castor said he made that deal to strengthen Constand's position in her lawsuit.

In testimony Tuesday, Castor appeared as a witness for Cosby. He disputed the claim that he'd reached an agreement not to prosecute Cosby in exchange for his cooperation in a civil lawsuit, according to WCAU. Castor instead said that he'd hoped his decision not to prosecute Cosby would "gain some justice" for Constand in civil court.

But Castor leveled serious accusations against Constand, too. He claimed that she'd made inconsistent statements about her encounter with Cosby and feared that her mother illegally recorded phone calls with Cosby.

Under the circumstances, he didn't think he could get a conviction even though he testified today that "what I think is that Andrea Constand was inappropriately touched by Mr. Cosby."

The new DA has argued that the agreement doesn't hold up because only a judge may grant a suspect immunity from criminal prosecution. Further, Castor, at the time of the deal, made public statements that said a criminal case could be revisited, Steele said.

Judith Ritter, a law professor at Widener University, told The Huffington Post that it's unlikely Common Pleas Judge Steven T. O'Neill will dismiss the entire case. Even if O'Neill forbids the use of Cosby's deposition, Ritter said, there is enough evidence in various statements from Constand, her mother and Cosby to allow law enforcement to continue with the case.

"The loss of the deposition is not fatal to the prosecution," Ritter said. "I'm sure they would prefer to have it, but I don't think it's essential."

It's unclear when O'Neill will decide whether the case should go forward.

If convicted, Cosby faces a prison sentence of up to 10 years.

As Cosby focused on the criminal case, there were also developments in some of the various civil suits against him.

A judge in Los Angeles on Tuesday ruled in favor of one woman suing Cosby by ordering that he participate in a second deposition.

The case involves Judy Huth, who alleges that Cosby engaged in sexual misconduct with her at the Playboy mansion in 1974, when she was 15 years old.

Cosby was deposed in October but refused to answer some questions then.

“We regard the court’s order today as a complete vindication of our position,” Huth’s attorney, Gloria Allred, said in a statement.

Meanwhile, accuser Chloe Goins, 25, dropped her own lawsuit against Cosby on Tuesday. Goins had previously alleged that Cosby drugged and sexually assaulted her at the Playboy mansion in 2008, when she was 18, according to USA Today. It’s not clear why Goins bowed out, although USA Today's Maria Puente suggests the possibility of an out-of-court settlement.

Cosby’s publicist did not immediately respond to HuffPost’s inquiries.

This article has been updated with information about the civil suits brought by Huth and Goins.

PHOTO GALLERY Bill Cosby Charged With Aggravated Indecent Assault