Many features of the sequence of action potentials produced by repeated stimulation of a patch of cardiac muscle can be modeled by a 1D mapping, but not the full behavior included in the restitution portrait. Specifically, recent experiments have found that (i) the dynamic and S1-S2 restitution curves are different (rate dependence) and (ii) the approach to steady state, which requires many action potentials (accommodation), occurs along a curve distinct from either restitution curve. Neither behavior can be produced by a 1D mapping. To address these shortcomings, ad hoc 2D mappings, where the second variable is a "memory" variable, have been proposed; these models exhibit qualitative features of the relevant behavior, but a quantitative fit is not possible. In this paper we introduce a new 2D mapping and determine a set of parameters for it that gives a quantitatively accurate description of the full restitution portrait measured from a bullfrog ventricle. The mapping can be derived as an asymptotic limit of an idealized ionic model in which a generalized concentration acts as a memory variable. This ionic basis clarifies how the present model differs from previous models. The ionic basis also provides the foundation for more extensive cardiac modeling: e.g., constructing a PDE model that may be used to study the effect of memory on propagation. The fitting procedure for the mapping is straightforward and can easily be applied to obtain a mathematical model for data from other experiments, including experiments on different species.