*312After an onlooker called 911 to report that defendant Marcus Terell Washington was walking with a pistol in his waistband and later waving it around inside a car, defendant fled on foot from responding police. Officers eventually arrested defendant and recovered a loaded magazine and a firearm in his path of flight. A jury found him guilty of being a felon in possession of a firearm and ammunition, and obstructing a peace officer *313during the lawful performance of his duties. Defendant admitted a strike prior and a prior prison term, and was sentenced to seven years in state prison.
On appeal, defendant contends that: (1) because he is indigent, the trial court abused its discretion in denying his motion for payment of costs for copying discovery, even though his retained counsel had *92access to the materials at the district attorney's office and the written retainer agreement between his mother and counsel provided for payment of routine costs and expenses; (2) the court violated his due process rights by denying him all relevant discovery before trial; (3) the prosecutor committed misconduct during her opening statement and closing remarks by referring to facts not supported by the evidence, and by misstating the law regarding possession of firearms by a felon; (4) insufficient evidence supports his possession convictions; and (5) the court abused its discretion by denying his motion for discovery of the personnel records of a police officer who was not present when defendant was apprehended and who did not testify at trial.
We will affirm the judgment.
FACTUAL AND PROCEDURAL BACKGROUND
A. Defendant's Flight from Police and Subsequent Arrest
On the morning of October 14, 2015, D.M. was repairing the roof of a duplex at the corner of 29th Street and Silk Court in Sacramento. While on the street retrieving materials for the repairs, he noticed a man with baggy blue jeans and a navy blue hoody or pullover jacket walking about 10 to 15 feet away; the man, whom D.M. later identified as defendant, was singing. D.M., who owned and was familiar with handguns, saw the handle of a black semiautomatic pistol in defendant's waistband near the right hip area.
Defendant got into the front passenger side door of a blue automobile parked on the street. Another man was in the driver's seat. After returning to the roof, D.M. saw defendant waving a gun around in the car through the open passenger side window. D.M. believed it was the same black pistol he had seen earlier in defendant's waistband. Concerned for the safety of himself and others, he called 911.
A short time later, Officers Jeffrey Carr and Aaron Thompson responded to the scene in separate patrol cars. They pulled their cars behind the blue car and ordered defendant and the driver out of the car at gunpoint.
According to Officer Thompson, defendant appeared to grab or put something underneath the front passenger seat. Defendant then exited the car, *314faced Officer Thompson, and raised both hands in the air, exposing his waistband; Officer Thompson did not see a firearm.
After ignoring Officer Thompson's commands to get on the ground and to not run, defendant turned and fled towards the cul-de-sac of Silk Court. As he fled, defendant grabbed his right pants pocket with his hand. Based on his training and experience, Officer Thompson testified to his belief that defendant was likely holding a gun so that it would not fall from the pocket of his baggy pants or shorts while he ran.
Officer Thompson followed defendant in his patrol car while Officer Carr detained the driver, E.D., without incident. Video from Officer Carr's patrol car camera was shown to the jury.
Officer Thompson saw defendant jump the front fence of a residence in the cul-de-sac of Silk Court and then flee through the backyard. He got out of his patrol car and ran to where defendant had jumped the fence. Officer Thompson watched as defendant jumped the home's backyard fence into an adjoining backyard of a home-either 7370 or 7374-on Nelmark Street. He then saw defendant jump over a third fence into the yard of a house on Gardendale Road.
While watching defendant flee, Officer Thompson radioed for backup officers to *93set up a perimeter in the area. Sergeant Ron Chesterman responded to the scene and located defendant on Gardendale Road. Defendant was kneeling in the middle of the street in front of 3071 Gardendale Road, the backyard of which is adjacent to the backyard of 7374 Nelmark Street. According to Sergeant Chesterman, defendant was wearing a white tank top with dark-colored baggy jean shorts. A black hooded sweatshirt lay in the street approximately 10 or 15 feet behind defendant.
Defendant was detained and searched. Officers did not locate a gun or ammunition on him. During a subsequent search of defendant's path of flight, Officer Thompson's canine located a loaded magazine containing eight nine-millimeter cartridges in the backyard of 7370 Nelmark Street, and Officer Carr found a black nine-millimeter handgun stashed in a tree in the side yard of the house at 3071 Gardendale Road. The pistol did not have a magazine in it.
The firearm was processed for possible fingerprints, but no latent prints were found. Two latent fingerprints were lifted from the magazine, but the prints lacked sufficient ridge detail for comparison.
*315B. Trial Proceedings
Defendant was charged with being a felon in possession of a firearm ( Pen. Code, § 29800, subd. (a)(1), count one),1 possession of ammunition by a prohibited person (§ 30305, subd. (a)(1), count two), and obstructing, delaying, or interfering with a peace officer during the lawful performance of his duties (§ 148, subd. (a)(1), count three). It was further alleged that defendant had a prior strike (§§ 667, subds. (b)-(i), 1170.12), and had served a prior prison term (§ 667.5, subd. (b)).
At trial, the responding officers and D.M. testified to the facts summarized above. For purposes of counts one and two, the possession offenses, defendant stipulated that he had a prior felony conviction.
Defendant did not testify, but he called Officer Leticia Izaguirre, who conducted a metal detector search in the yards of a house on Silk Court and a house on Nelmark Street, which were in defendant's path of flight. She testified that she did not find anything with the metal detector at either house.
Defendant also called E.D., the man detained in the driver's seat of the car. E.D., who admitted having a previous theft conviction, testified that he and defendant passed a marijuana joint back and forth in his car, but that he never saw defendant with a gun in his waistband or in his hand. During cross-examination, E.D. admitted that as an ex-felon, he was not allowed to be around firearms. He also conceded that snitches are often physically harmed, especially those in custody, as he was at the time he testified. On redirect, E.D. denied testifying that defendant did not have a gun to avoid getting in further trouble or being labeled a snitch.
C. Verdict and Sentence
The jury convicted defendant as charged, and he admitted the prior strike and prison term allegations. The court sentenced defendant to an aggregate term of seven years in state prison; three years for the felon in possession offense, which was doubled for the strike, one year for the prior prison term enhancement, and a concurrent 180 days for the misdemeanor obstruction offense. The court also imposed a two-year term, doubled to four years, for *94the possession of ammunition offense, but stayed the sentence under section 654. *316DISCUSSION
I
Discovery
Defendant contends the trial court abused its discretion by refusing to order the county to provide copies of supplemental discovery to him at county expense. He argues that an indigent defendant with retained counsel is entitled to county coverage of ancillary expenses, including costs to copy discovery, regardless of whether a third party, who retained counsel for him under a written agreement, agreed to pay such costs.
A. Background
The court originally appointed the public defender to represent defendant, and the prosecutor provided discovery to his appointed counsel. Before the preliminary hearing, however, defendant's mother retained attorney Stratton S. Barbee to represent him. Defendant's public defender gave Barbee all previously produced discovery in the case.
The prosecutor later informed Barbee that supplemental discovery was available. Barbee moved to have the county pay approximately $50 to duplicate the additional paper and video discovery. Defendant's declaration supporting the motion stated he had been incarcerated since October 2015, was unemployed, and had no money or income. County counsel opposed the motion, arguing that discovery costs were not "ancillary services," the county was not required to pay for the cost of discovery when a defendant retained a private attorney, and defendant had failed to establish he was indigent. In reply, defendant maintained his indigence and reiterated that the county should have to pay to copy the supplemental discovery, which he asserted was necessary to prepare his defense.
At the hearing on the motion, the court questioned the need for the discovery and what precisely defendant sought. Because Barbee could not identify the material covered by the request for payment, the court denied the motion without prejudice. According to the court, it needed more information to determine what materials defendant requested at taxpayer expense. During the hearing, Barbee acknowledged that he had viewed the supplemental discovery material at the district attorney's office.
Barbee later renewed the motion and identified the supplemental discovery subject to the request. It included: dashcam videos showing officers responding to the scene, at least one dashcam video showing defendant being taken *317into custody, various police reports and supplemental reports, information regarding the make and model of the gun, where it was purchased, and the results of fingerprinting the gun, as well as information on defendant's prior conviction.
At the hearing on the renewed motion, the court questioned why the county should pay for defendant's discovery costs when the retainer agreement between Barbee and defendant's mother envisioned that she would be responsible for such costs.2 Citing the collateral source rule, Barbee argued that the court could not consider other sources of payment for the costs, including the retainer agreement. The court denied the motion, finding that *95these copying costs were a routine defense cost, and also that the terms of defendant's mother's retainer agreement made her responsible for the cost of duplicating the supplemental discovery.
Thereafter, defendant petitioned this court for a writ of mandate directing the trial court to order the county to pay his supplemental discovery costs, raising the same arguments he made below.3 We summarily denied the petition. Defendant sought review in the Supreme Court, which also was denied. He now raises the issue on direct appeal.
B. Analysis
The trial court's order denying defendant's motion for payment of costs may be set aside only for abuse of discretion. ( Corenevsky v. Superior Court (1984) 36 Cal.3d 307, 321, 204 Cal.Rptr. 165, 682 P.2d 360 ( Corenevsky ); see also People v. Alvarez (1996) 14 Cal.4th 155, 234, 58 Cal.Rptr.2d 385, 926 P.2d 365 ["[a]n appellate court reviews a trial court's ruling on an application to incur expenses to prepare or present a defense for abuse of discretion"].)
Discovery in criminal cases is governed primarily by statutory law. ( Schaffer v. Superior Court (2010) 185 Cal.App.4th 1235, 1242, 111 Cal.Rptr.3d 245 ( Schaffer ).) Section 1054.1 provides that the prosecuting attorney "shall disclose" to the defendant certain materials and information prior to trial. That information includes, among other things, the names and addresses of intended trial witnesses, statements of all defendants, all relevant real evidence seized or obtained while investigating the charged offenses, any exculpatory evidence, and relevant witness statements or reports of the statements of witnesses whom the prosecutor intends to call at trial. (§ 1054.1, subds. (a)-(f).)
*318Section 1054.1 does not specify the means by which the prosecution must " 'disclose' " discoverable information to a defendant. ( Schaffer, supra , 185 Cal.App.4th at p. 1242, 111 Cal.Rptr.3d 245.) But "[n]o court has interpreted the prosecutor's duty to disclose under section 1054.1 to include the responsibility of furnishing photocopies or other materials to a defendant at taxpayer expense." ( Ibid. ; see also 85 Ops.Cal.Atty.Gen. 123, 127 (2002) ["Section 1054.1 omits any duty by the prosecution to furnish copies of discoverable materials. It has long been held that the prosecution satisfies its burden of disclosure if the defense may inspect, view, hear, or copy discoverable materials"].)
The Sixth Amendment right to effective counsel includes the right to " 'ancillary services' " necessary to prepare a defense. (See People v. Clark (2016) 63 Cal.4th 522, 630, 203 Cal.Rptr.3d 407, 372 P.3d 811 [federal and state Constitutional right to counsel includes the right to effective counsel which, in turn, includes the right to reasonably necessary defense services]; People v. Faxel (1979) 91 Cal.App.3d 327, 330, 154 Cal.Rptr. 132 ["[t]he due process right of effective counsel includes the right to ancillary services necessary in the preparation of a defense"].)
To be sure, "[n]ecessary expenses for a criminal defense can include discovery costs , investigative costs, transcript costs, expert fees, etc." ( Schaffer, supra , 185 Cal.App.4th at p. 1245, 111 Cal.Rptr.3d 245, italics added.) But defendant cites no authority for the proposition that routine copying costs like those sought here are a *96necessary expense. Even if we assume, however, that defendant was indigent and that the cost of duplicating this discovery constitutes a reimbursable ancillary service (a question the trial court did not directly address), the issue becomes whether defendant established that he was entitled to have the county fund such expenses in this case. Based upon the terms of the retainer agreement between defendant's mother and retained private counsel, the trial court found that he was not.
Defendant asserts that the retainer agreement between his mother and his counsel is irrelevant and that the trial court erred in relying on its terms to deny payment; he maintains that he only was required to prove he was indigent to gain entitlement to copies of discovery at county expense. Based on the record before us, we find no abuse of discretion in the trial court's ruling.
Contrary to defendant's argument, the terms of the retainer agreement between counsel and his mother are relevant in determining whether the county must pay for minor costs for duplicating discovery materials disclosed by the district attorney under section 1054.1.
Defendant cites Tran v. Superior Court (2001) 92 Cal.App.4th 1149, 112 Cal.Rptr.2d 506 ( Tran ) for the proposition that an indigent defendant *319with counsel retained by a third party is entitled to have such ancillary defense services, including fees to copy discovery, paid for by the county. As the court in Tran recognized, however, the fact that a third party employed counsel for a defendant may be relevant to whether he could afford to obtain defense services. ( Id. at pp. 1154-1155, 112 Cal.Rptr.2d 506 ; see also Anderson v. Justice Court (1979) 99 Cal.App.3d 398, 403, 160 Cal.Rptr. 274 [retention of attorney by family member is one of many facts a court may consider in determining the question of financial ability to secure ancillary services].) Thus, the trial court properly considered the terms of the retainer agreement between Barbee and defendant's mother in deciding the motion for discovery costs.
Notably, the court in Tran found the trial court erred in refusing to order payment for investigators and experts that were not covered by the retainer agreement between the defendant's relatives and the attorney retained on his behalf. ( Tran, supra , 92 Cal.App.4th at pp. 1154-1156, 112 Cal.Rptr.2d 506.) Here, by contrast, the trial court found that the minor costs for copying discovery were covered under the retainer agreement, and that defendant's mother, who was not indigent, was responsible for paying such costs. Given this material factual distinction, Tran does not control.
Defendant also cites People v. Worthy (1980) 109 Cal.App.3d 514, 167 Cal.Rptr. 402 for the principle that defendant's indigence alone qualified him for full coverage of all necessary ancillary expenses. In Worthy , an indigent defendant was represented by a private attorney whom the defendant had agreed to pay, but who told the court he was "serving pro bono, because appellant was destitute." ( Id. at p. 518, 167 Cal.Rptr. 402.) The trial court denied a request for ancillary services, believing it had no power to allow them. ( Ibid. ) While acknowledging that there was no specific statutory authority for the requested relief, the Court of Appeal noted that trial courts have "inherent power to guarantee to criminal defendants a fair trial." ( Id. at p. 521, 167 Cal.Rptr. 402.) Since the defendant's indigent status was established, he was "constitutionally entitled to those defense services for which he demonstrate[d] a need." ( Id. at p. 520, 167 Cal.Rptr. 402.) He did not sacrifice this entitlement by appearing through private *97counsel: "The test of entitlement to county assistance in defense preparation must be indigency. A test based upon the status of defense counsel would be constitutionally infirm. If a criminal defendant requires the services of investigators or scientific or medical experts to assist him in preparation of his defense, that assistance must be provided. Whether it is paid for by the government or by the defendant depends solely on the defendant's economic status." ( Ibid. )
Worthy also is distinguishable, however, insofar as it did not involve a written retainer agreement under which a third party agreed to pay routine expenses like those at issue here.
*320Nothing in the record before us shows the trial court's description of the retainer agreement's terms was inaccurate or otherwise incorrect. Moreover, a copy of the retainer agreement was not included in the record on appeal. Thus, we have no basis upon which to evaluate defendant's claim in his appellate briefs, contrary to the court's express finding, that the retainer agreement did not cover minor copying charges, or that defendant's mother was not responsible for such charges under the agreement. ( Corenevsky, supra , 36 Cal.3d at p. 321, 204 Cal.Rptr. 165, 682 P.2d 360 ["all intendments are indulged to support [the court's order] on matters as to which the record is silent"]; People v. Clifton (1969) 270 Cal.App.2d 860, 862, 76 Cal.Rptr. 193 [" 'error is never presumed, but must be affirmatively shown, and the burden is upon the appellant to present a record showing it, any uncertainty in the record in that respect being resolved against him' "].)
Defendant's argument that the county is responsible under Government Code section 29602 for paying legal expenses of incarcerated defendants regardless of indigence also proves too much. Government Code section 29602 provides in relevant part that the "expenses necessarily incurred in the support of persons charged with or convicted of a crime and committed to the county jail ... for ... services in relation to criminal proceedings for which no specific compensation is prescribed by law are county charges." The county's obligation to pay for ancillary defense costs, however, is only triggered when that person is indigent and the costs are ordered by the court. (§ 987, subd. (a) [if a criminal defendant in a noncapital case desires assistance of counsel and is unable to employ counsel, the court shall assign counsel to defend him or her]; § 987.2, subd. (a) [cost of appointed counsel to be paid out of the county general fund, subject to court approval].) The practical effect of defendant's argument would be to make counties responsible for every ancillary service requested by a criminal defendant, regardless of necessity or ability to pay. No court has ever endorsed such a broad application of Government Code section 29602.4
*98*321We also reject defendant's equal protection argument. He contends indigent defendants with appointed counsel are given free discovery whereas indigent defendants with retained counsel are not. Not so. The fact that minor discovery costs were covered by a retainer agreement means defendant was not similarly situated to indigent defendants whose ancillary defense costs were not covered by such an agreement. ( Cooley v. Superior Court (2002) 29 Cal.4th 228, 253, 127 Cal.Rptr.2d 177, 57 P.3d 654 [under the equal protection clause, we do not inquire "whether persons are similarly situated for all purposes, but 'whether they are similarly situated for purposes of the law challenged' "].) The fact that the expenses were already covered, not the fact that defendant had private counsel, was the decisive factor.5
Finally, even assuming for the sake of argument that the court erred in denying defendant's motion for discovery costs, " '[i]t is settled that an accused must demonstrate that prejudice resulted from a trial court's error in denying discovery.' " ( People v. Gaines (2009) 46 Cal.4th 172, 181, 92 Cal.Rptr.3d 627, 205 P.3d 1074 ( Gaines ).) The record belies defendant's claim of prejudice.
It is undisputed that defendant's counsel had access to all discovery, including the supplemental discovery, well before trial. Although counsel may have preferred to have his own copy of the supplemental discovery to review when he wanted, he admitted he had access to-and viewed-the discovery at the district attorney's office. (See People v. Zambrano (2007) 41 Cal.4th 1082, 1134, 63 Cal.Rptr.3d 297, 163 P.3d 4 [defense counsel's ability to examine all materials regarding the case in a prosecutor's " 'open file' " sufficient to satisfy constitutional and statutory duty to disclose exculpatory evidence], disapproved on other grounds in People v. Doolin (2009) 45 Cal.4th 390, 421, fn. 22, 87 Cal.Rptr.3d 209, 198 P.3d 11 ; Schaffer, supra , 185 Cal.App.4th at p. 1245, 111 Cal.Rptr.3d 245 [reasonable accommodations for the defense to view discoverable material required where nonindigent defendant or his counsel chooses not to pay reasonable duplication costs]; 85 Ops.Cal.Atty.Gen. 123, 127, fn. 7 (2002) ["[i]t is sufficient [under section 1054.1] that the prosecution affords the defense the opportunity to inspect the materials, allowing the defense to make its own copies if it chooses"].)
The trial court denied defendant's renewed motion for payment of discovery costs in October 2016. Defendant's trial did not start until the end of February 2017-more than four months later. This amount of time is more than adequate to arrange to view approximately 100 pages of original and supplemental police reports and a few dashcam videos.
*322II-V**
DISPOSITION
The judgment is affirmed.
We concur:
RAYE, P.J.
ROBIE, J.
Further undesignated statutory references are to the Penal Code.
County counsel apparently brought the retainer agreement to the court's attention for the first time during an in-chambers conference before the hearing on the renewed motion.
We grant defendant's request to take judicial notice of his writ petition. (Evid. Code, §§ 452, subd. (d), 459.)
Corenevsky , which cited Government Code section 29602 as a basis for finding a county auditor had authority to pay for court-ordered defense costs (Corenevsky, supra , 36 Cal.3d at p. 324, 204 Cal.Rptr. 165, 682 P.2d 360 ), does not stand for the sweeping proposition defendant urges. That case concerns the extent to which an indigent defendant has a right to ancillary defense services at public expense. (Id. at p. 312, 204 Cal.Rptr. 165, 682 P.2d 360.) The issue of payment arose only after the county refused to pay $13,314 ordered for appointed experts. (Id. at p. 316, 204 Cal.Rptr. 165, 682 P.2d 360.) The Court of Appeal relied upon Government Code section 29602 as the funding mechanism. It said: "Expenses under Government Code section 29602 are 'county charges' that shall be paid by the county auditor without regard to the existence of a specific appropriation ...." (Corenevsky, supra , at p. 316, 204 Cal.Rptr. 165, 682 P.2d 360.) The case also is factually distinguishable because there was no agreement by a third party to cover the expenses like there is here. If this collateral source of payment did not exist, then Government Code section 29602 might require the county to pay court-ordered duplication costs, but that is not the case before us.
We emphasize that the trial court did not rule that defendant was not entitled to county assistance for any ancillary services simply because his mother had retained private counsel for him. Indeed, defendant concedes that the county paid for a private investigator to help him prepare for trial. The trial court's ruling was thus limited in scope.
See footnote *, ante .