
570 P.2d 938 (1977)
91 N.M. 107
STATE of New Mexico, Plaintiff-Appellee,
v.
Joseph Larry GALLEGOS, Defendant-Appellant.
No. 2964.
Court of Appeals of New Mexico.
October 4, 1977.
*939 Jan A. Hartke, Chief Public Defender, Joseph N. Riggs, III, Asst. Public Defender, Reginald J. Storment, Appellate Defender, Santa Fe, for defendant-appellant.
Toney Anaya, Atty. Gen., Paquin M. Terrazas, Suzanne Tanner, Asst. Attys. Gen., Santa Fe, for plaintiff-appellee.

OPINION
WOOD, Chief Judge.
Defendant was found to be an habitual criminal and sentenced accordingly. His appeal raises issues as to: (1) applicability of Rule of Crim.Proc. 21; (2) State's burden of proof; (3) jury issue as to validity of prior convictions; and (4) admissibility of exhibits.

Applicability of Rule of Crim.Proc. 21
Defendant moved to dismiss the supplemental information charging prior convictions of defendant. The trial court conducted an evidentiary hearing on the motion. Defendant introduced, as an exhibit, a transcript of the hearing at which defendant pled guilty to certain offenses. These offenses are the prior convictions charged in the supplemental information.
Defendant's contention was that the guilty pleas were invalid. He made two claims before the trial court. One claim was that the guilty pleas were constitutionally invalid. The second claim was that in accepting the guilty pleas the trial court violated Rule of Crim.Proc. 21. The motion to dismiss was denied.
Defendant does not claim, on appeal, that the guilty pleas were constitutionally invalid. We have reviewed this aspect of defendant's trial court claim because it bears on the disposition of other issues. The transcript of the guilty plea hearing affirmatively shows that the guilty pleas were voluntary and constitutionally valid. State v. Roland, 90 N.M. 520, 565 P.2d 1037 (Ct. App. 1977); State v. Martinez, 89 N.M. 729, 557 P.2d 578 (Ct.App. 1976).
*940 Defendant's appellate claim is that the guilty pleas were invalid because the trial court did not follow Rule of Crim.Proc. 21 in accepting the pleas. The applicable portions of the rule are:
"(e) Advice to Defendant. The court shall not accept a plea of guilty or nolo contendere without first, by addressing the defendant personally in open court, informing him of and determining that he understands the following: (1) the nature of the charge to which the plea is offered; (2) the mandatory minimum penalty provided by law, if any, and the maximum possible penalty provided by law for the offense to which the plea is offered; (3) that the defendant has the right to plead not guilty, or to persist in that plea if it has already been made; and (4) that if he pleads guilty or nolo contendere there will not be a further trial of any kind, so that by pleading guilty or nolo contendere he waives the right to a trial.
"(f) Insuring That the Plea is Voluntary. The court shall not accept a plea of guilty or nolo contendere without first, by addressing the defendant personally in open court, determining that the plea is voluntary and not the result of force or threats or of promises apart from a plea agreement. The court shall also inquire as to whether the defendant's willingness to plead guilty or nolo contendere results from prior discussions between the attorney for the government and the defendant or his attorney."
Defendant's claim based on Rule of Crim. Proc. 21(f), is frivolous. He does not assert his plea was involuntary; the transcript of the guilty plea hearing shows compliance with Rule of Crim.Proc. 21(f). However, the transcript does show noncompliance with Rule of Crim.Proc. 21(e)(2), and possibly with Rule of Crim.Proc. 21(e)(3).
How does Rule of Crim.Proc. 21(e) apply in habitual offender proceedings? We hold that it does not apply.
There is a procedural problem in considering the applicability of the rule. Rule of Crim.Proc. 21(e) was one of the amendments to Rule 21 adopted by the Supreme Court effective October 1, 1974. Prior to these amendments, paragraph (e) did not exist in its present form. See Compiler's Notes, "Amendments" to § 41-23-21, N.M.S.A. 1953 (2d Repl.Vol. 6, Supp. 1975). The guilty pleas were accepted on November 11, 1974; defendant was sentenced on November 26, 1974. Rules adopted by the Supreme Court are not effective to change the procedure in any pending case. N.M.Const., Art. IV, § 34; Marquez v. Wylie, 78 N.M. 544, 434 P.2d 69 (1967). The transcript of the guilty plea hearing indicates the offenses to which defendant pled guilty were committed in 1973, but there is nothing showing when charges were filed. Nothing was presented to show whether there was a pending case at the time the amendments to Rule of Crim.Proc. 21 went into effect. Absent such a showing, we cannot say that Rule of Crim.Proc. 21 was or was not applicable to the guilty pleas on November 11, 1974.
To reach the merits of this issue, we must assume that Rule of Crim.Proc. 21 was in effect and applicable to the charges to which defendant pled guilty. We make this assumption because of the importance of the issue to habitual offender proceedings where the prior convictions are based on guilty pleas.
In this case there are two answers to the claim that the guilty pleas were invalid because of the failure of the trial court to comply with Rule of Crim.Proc. 21(e). One answer involves the fact that defendant's guilty pleas were part of a plea bargain. A second answer involves the collateral attack which may be made upon prior convictions.
Before the guilty pleas were accepted, the trial court inquired of defendant's counsel whether he had gone over the proposed guilty pleas with defendant. Counsel replied: "I have gone over this with the defendant and this is a plea bargain which the District Attorney and I have agreed to whereby the other pending charges against Mr. Gallegos will be dropped in return for his plea to these charges." Subsequently, counsel commented that he was concerned *941 that the record clearly reflect "that these other charges are to be dismissed in return for his plea". The court stated: "Yes, they will be dismissed."
The record does not show what or how many charges were dismissed. However, the only showing is that the guilty pleas were part of an agreement reached between the prosecutor and defense; an agreement that was carried out.
"Plea negotiation involves an exchange of concessions and advantages between the state and the accused." Baird v. State, decided August 23, 1977, 90 N.M. 667, 568 P.2d 193. Having obtained the advantage of the dismissal of other charges, defendant should not be permitted to welch on his part of the bargain. By his guilty pleas pursuant to a plea bargain that has not been questioned, defendant waived any right to attack the validity of those guilty pleas. Baird v. State, supra. We recognize that an attack on the constitutional validity of the pleas may be an exception to the waiver rule; however, that possibility is not decided because defendant's pleas were constitutionally valid. What we hold is that, absent constitutional invalidity, defendant, like the State, is bound by his bargain. Compare State ex rel. Plant v. Sceresse, 84 N.M. 312, 502 P.2d 1002 (1972); State v. Plant, 86 N.M. 2, 518 P.2d 961 (Ct.App. 1973).
The holding in State v. Dalrymple, 75 N.M. 514, 407 P.2d 356 (1965) that defendant could collaterally attack his prior convictions in defending against an habitual offender charge did not open this defense to any and all attacks on the prior convictions. Dalrymple followed the dissenting opinion in Oyler v. Boles, 368 U.S. 448, 82 S.Ct. 501, 7 L.Ed.2d 446 (1962). State v. Moser, 78 N.M. 212, 430 P.2d 106 (1967). The Oyler dissenting opinion states:
"The charge of being an habitual offender is as effectively refuted by proof that there was no prior conviction or that the prior convictions were not penitentiary offenses as by proof that the accused is not the person charged with the new offense. The charge of being an habitual offender is also effectively refuted by proof that the prior convictions were not constitutionally valid as, for example, where one went to trial without a lawyer under circumstances where the appointment of someone to represent him was a requirement of due process. Denial or absence of counsel is an issue raisable on collateral attack of state judgments." (Our emphasis.)
Dalrymple states that our habitual offender statute contemplates "that the convictions were valid and not void because of some constitutional defect." (Our emphasis.) State v. Dawson, (Ct.App.) decided August 30, 1977, 91 N.M. 70, 570 P.2d 608 states: "The issue of whether the prior convictions are constitutionally valid is a defense to the habitual offender charge. Defendant is entitled to present evidence in support of this defense."
The claim that defendant's guilty pleas were invalid because the trial court did not comply with Rule of Crim.Proc. 21(e) in accepting the pleas is not a claim that the pleas were constitutionally invalid.
As we read Oyler v. Boles, supra, and State v. Dalrymple, supra, a defendant's attack on the validity of his prior convictions is limited to "infirmities in the prior convictions open to collateral attack." Noncompliance with Rule of Crim.Proc. 21(e) in accepting a guilty plea is a matter to be raised by direct appeal; such noncompliance does not provide a basis for a collateral attack on the guilty plea. State v. Gillihan, 86 N.M. 439, 524 P.2d 1335 (1974).
The trial court correctly denied the motion to dismiss because: (1) defendant did not show that Rule of Crim.Proc. 21(e) applied to his guilty pleas, (2) defendant was bound by his plea bargain, and (3) noncompliance with Rule of Crim.Proc. 21(e) is not a basis for attacking the validity of the guilty pleas in habitual offender proceedings.

State's Burden of Proof
At the close of the State's case-in-chief, defendant moved for a directed verdict contending the State had failed to prove an essential element of the habitual offender charge. The assertedly missing "essential element" was that the prior convictions were valid. The motion was correctly denied. Validity of the prior convictions is a matter of defense. "Until defendant raised an issue as to the validity of the prior convictions, `validity' was not an issue in the case." State v. Dawson, supra; see State v. Lujan, (Ct.App.), decided August 16, 1977, 90 N.M. 778, 568 P.2d 614. The State did not have the burden of proving the validity of the prior convictions. State v. Lujan, 90 N.M. 103, 560 P.2d 167 (1977); State v. Dawson, supra.

Jury Issue as to Validity of Prior Convictions
The defendant raised an issue as to the validity of the prior convictions. He did so by the motion to dismiss. This motion was decided at a pretrial evidentiary hearing. We have held that the motion was correctly denied. Here, as in State v. Whiteshield, (Ct.App.) decided August 30, 1977, 91 N.M. 96, 570 P.2d 927, defendant raised the issue again at trial. He did so by tendering, as evidence, the transcript of the hearing at which defendant pled guilty.
The trial court refused the tendered evidence, ruled that defendant could not argue "validity" to the jury, and ruled the jury would not be instructed on validity of the prior convictions. These rulings were correct.
In State v. Whiteshield, supra, an issue was whether the counsel who represented defendant in connection with the prior conviction was competent. Whiteshield states:
"The language in State v. Dalrymple, supra, together with the reference to footnote 9 in Oyler v. Boles, supra, indicates that the competency of counsel claim raised by defendant by his collateral attack on the Oklahoma conviction is a legal issue to be decided by the court."
After discussing issues decided by the court rather than the jury, Whiteshield states:
"We incline to the view that the competency of counsel claim was a matter to be decided by the trial court and should not have been submitted to the jury."
The attack on the prior convictions in this case goes to the validity of defendant's guilty pleas. It is the trial court that determines whether a guilty plea is voluntary. Rule of Crim.Proc. 21(f). It is the trial court that determines whether a plea of guilty may be withdrawn. State v. Kincheloe, 87 N.M. 34, 528 P.2d 893 (Ct.App. 1974). Similarly, the trial court should determine whether a guilty plea is invalid. We follow the reasoning in State v. Whiteshield supra, and hold that the validity of a guilty plea is a matter to be determined by the trial court and not by the jury.
The trial court did not err in refusing the evidence which was tendered as evidence to be presented to the jury; it did not err in prohibiting argument to the jury and in ruling that the jury was not to be instructed on the validity of the prior convictions. There was no error in these rulings because the validity of the prior convictions was a matter to be decided by the trial court and not by the jury.

Admissibility of Exhibits
Defendant asserts that various exhibits were improperly admitted. The contentions are without merit.
Exhibits 2, 3, and 4 are copies of verdicts. Exhibits 5 and 12 are copies of "JUDGMENT, SENTENCE AND COMMITMENT" in prior criminal cases involving defendant. Each document was authenticated under Evidence Rule 902(1) and (4). Defendant claims they were not admissible because hearsay. Each document was admissible under Evidence Rule 803(8). Exhibits 5 and 12 were also admissible under Evidence Rule 803(22). State v. Dawson, supra.
Exhibit 15 was identified by a witness as a photograph of defendant showing defendant as he appeared when admitted to the *943 penitentiary in December of 1974. This evidence was a sufficient basis for admission of the photograph. Evidence Rule 901(a) and (b)(1); State ex rel. Hwy. Dept. v. Kistler-Collister Co., Inc., 88 N.M. 221, 539 P.2d 611 (1975). The fact that the witness had not personally taken the photograph, or had not seen the photograph taken, was not grounds for its exclusion.
Exhibits 13 and 14 were identified by a witness as fingerprint records taken from penitentiary records of defendant. The witness testified that he was the custodian of these records, which also included the photograph. The witness testified that the processing upon admission of an inmate to the penitentiary included obtaining identifying data. This identifying data includes fingerprints and photographs. This evidence authenticated the fingerprint records, see Evidence Rule 901(b)(7). This evidence, together with exhibit 12 which showed that defendant had been committed to the penitentiary, also showed the fingerprint records were activities of the penitentiary. Exhibits 13 and 14 were admissible under Evidence Rule 803(8). See State v. Ramirez, 89 N.M. 635, 556 P.2d 43 (Ct.App. 1976) concerning foundation testimony for admission under Evidence Rule 803(8).
The judgment and sentences are affirmed.
IT IS SO ORDERED.
HENDLEY and HERNANDEZ, JJ., concur.
