If the deal was verbally part of the record, you are protected. You are likely to be given the option to withdraw your plea and continue to trial, or negotiate a different resolution. You should discuss these options with your lawyer.
The factual background supplied here is very curious to me. The problem is I was not there and have no real understanding of the process you are going through. The "several years" of delay is particularly problematic from my perspective. It seems obvious you are not satisfied with the representation you are receiving of late. It seems to me you need to somehow retain a good criminal defense attorney that you have confidence in. At least talk with some experienced local attorneys. Most offer free, if limited, consultations. Take advantage of that to see if you can improve your situation. Good luck.
I agree with Mr. Hilf. If the plea offer was placed on the record, it is as good as if it were in writing. If the court will not honor the deal, you will be permitted to withdraw your plea. If the prosecutor wants to revoke the deal, you can ask the court to enforce it. Best of luck!
The deal does not have to be in writing provided it is placed on the record. The court does not have to accept the terms of a plea bargain, so if it is the Court who is unwilling to honor the terms, then the Court will permit you to withdraw the plea. If the prosecutor is attempting to change the terms, they cannot.