Abstract
ZKSM83 proves CPU-visible execution of an SM83 machine directly. A segment packs at most four
instructions per row into \(N=2^{14}\) rows, commits \(C=4604\) multilinear columns, and checks
\(M=11458\) identities of degree at most \(23\) by sumcheck and a transparent Akita polynomial
commitment scheme. ISA, byte-operation, ROM, memory, device, log, and segment-boundary claims
share one committed trace. Version 2 is transparent, not witness-hiding; no current end-to-end
packed-proof measurement is claimed.
Vector TikZ schematic rendered in high resolution in the PDF Reader tab above.
1.Proposition#
Let
\[s_t=(x_t,d_t,m_t,c_t)\in
\underbrace{\mathcal X_{\rm CPU\,+\,MBC3}}_{21\ \text{scalars}}
\times\underbrace{\mathcal D_{\rm DMG}}_{17\ \text{scalars}}
\times\mathcal M_{2^{17}}
\times\mathbb N^4,
\qquad |s_t|_{\rm public}=38.\]
(1)
Here \(c_t=(c_t^{\rm in},c_t^{\rm out},c_t^{\rm bus},c_t^{\rm isa})\) and
\[(s_{t+1},\epsilon_t)=\tau_{R,I}(s_t),
\qquad
\epsilon_t=(\epsilon_t^{\rm bus},\epsilon_t^{\rm in},
\epsilon_t^{\rm out},\epsilon_t^{\rm isa}).\]
(2)
The public statement is
\[\begin{aligned}
\mathsf{Stmt}={}&(\nu,D_{\rm back},p,|R|,C_R,B_0,B_L,L,T,A,C,\mathbf n), \\
\mathbf n={}&(n_{\rm bus},n_{\rm in},n_{\rm out},n_{\rm isa}), \\
\mathsf{id}(\mathsf{Stmt})={}&\mathsf{H}(\texttt{zksm83/native-statement/v2}\parallel\mathsf{Enc}(\mathsf{Stmt})),
\end{aligned}\]
where \(L,T,A,C\) are segment, source-transition, active-row, and machine-cycle counts.
Definition 1 (Implemented language).
#\[\mathcal{L}_{\rm SM83}=\left\{\mathsf{Stmt}:\exists\omega\quad
\mathcal{R}_{\rm row}(\omega)\wedge
\mathcal{R}_{\rm lookup}(\omega)\wedge
\mathcal{R}_{\rm mem}(\omega)\wedge
\mathcal{R}_{\rm log}(\omega)\wedge
\mathcal{R}_{\rm chain}(\omega,\mathsf{Stmt})=1\right\}.\]
(3)
The semantic boundary is
\[\begin{aligned}
\mathcal{R}_{\rm proved}={}&
\{\text{SM83},\text{MBC3}_{\neg\rm RTC},\text{timer},\text{PPU timing/IRQ},
\text{DMA},\text{serial},\text{joypad},\text{APU/MMIO}\},\\
\mathcal{R}_{\rm excluded}={}&
\{\text{pixels},\text{audio samples},\text{physical-chip provenance},
\text{ROM ownership},\text{witness hiding}\}.
\end{aligned}\]
The SM83 timing and opcode model follows the public hardware references in Pan Docs
\citeppandocs,gbopcodes; the proof architecture is lookup-centric in the sense of Jolt and Lasso
\citepjolt,lasso.
2.Packed trace#
One segment uses the Boolean hypercube
\[\mathcal H=\{0,1\}^{14},\qquad N=|\mathcal H|=16384.\]
(4)
For row \(r\in\mathcal H\), let \(a_r\) be active, \(i_r\) be an instruction-block tag,
\(\ell_{r,j}\) be lane activity, and \(e_{r,k}\) be a machine-event selector:
\[\begin{aligned}
a_r(a_r-1)&=i_r(i_r-1)=\ell_{r,j}(\ell_{r,j}-1)=e_{r,k}(e_{r,k}-1)=0,\\
\ell_{r,0}&=i_r,
&\ell_{r,j+1}(1-\ell_{r,j})&=0,\\
a_r&=i_r+\sum_k e_{r,k},
&i_r\sum_k e_{r,k}&=0,\\
1\leq \sum_{j=0}^{3}\ell_{r,j}&\leq4 &&(i_r=1).
\end{aligned}\]
Resource ownership is explicit. For \(S_M=6\) machine-cycle slots, \(S_B=5\) bus slots,
and \(\omega^{X}_{r,s,j}\in\{0,1\}\):
\[\begin{aligned}
\sum_{j=0}^{3}\omega^{X}_{r,s,j}&\in\{0,1\},
&&X\in\{M,B\},\quad 0\le s<S_X,\\
(1-\ell_{r,j})\sum_s\omega^{X}_{r,s,j}&=0,\\
\ell_{r,j}\prod_{q=1}^{S_X}\left(\sum_s\omega^{X}_{r,s,j}-q\right)&=0.
\end{aligned}\]
The five local boundaries \(x_{r,0},\ldots,x_{r,4}\) are shared across four lanes; the
device boundary \((d_r^-,d_r^+)\) is shared across the row:
\[\begin{aligned}
\ell_{r,j}\bigl(x_{r,j+1}-\tau^{\rm cpu}_{o_{r,j}}(x_{r,j},b_{r,j})\bigr)&=0,\\
(1-\ell_{r,j})(x_{r,j+1}-x_{r,j})&=0,\\
e_{r,k}\bigl(d_r^+-\Delta_k(d_r^-,b_r,I_r)\bigr)&=0.
\end{aligned}\]
For lane \(j\), local bus slot \(u\), shared slot \(s\ge u\), define \(k=s-u\) and
\[\begin{aligned}
f_{r,j,k}&=\omega^B_{r,k,j}
\begin{cases}
1,&k=0,\\
1-\omega^B_{r,k-1,j},&k>0,
\end{cases}\\
m_{r,j,u,s}&=
\begin{cases}
f_{r,j,k},&u=0,\\
f_{r,j,k}\,\omega^B_{r,s,j},&u>0,
\end{cases}\\
b_{r,j,u}&=\sum_{s=u}^{4}m_{r,j,u,s}b_{r,s}.
\end{aligned}\]
The \(4\sum_{u=0}^{4}(5-u)=60\) values \(m_{r,j,u,s}\) are committed columns. This replaces
repeated cubic routing expressions by degree-one consumers.
The complete column geometry is
\[\begin{aligned}
C&=3542+806+256=4604,\\
806&=\underbrace{5\cdot106}_{\rm shared\ boundaries}
+\underbrace{4\cdot54}_{\rm lane\ auxiliaries}
+\underbrace{60}_{\rm bus\ matches},\\
256&=\underbrace{4}_{\rm lanes}\cdot
\underbrace{2}_{\rm execution\ queries}\cdot
\underbrace{(1+19+12)}_{\rm selector+address+output}.
\end{aligned}\]
3.Row relation#
Let \(W_r\in\mathbb{F}^{4604}\). The deepest relation is
\[\begin{aligned}
Q(W_r)&=(Q_0(W_r),\ldots,Q_{11457}(W_r))=\mathbf{0},\\
Q={}&Q_{\rm route}\cup Q_{\rm boundary}\cup Q_{\rm ISA}\cup Q_{\rm bus}
\cup Q_{\rm flow}\cup Q_{\rm machine}\cup Q_{\rm device}\cup Q_{\rm MMIO}
\cup Q_{\rm mem}\cup Q_{\rm CPU}\cup Q_{\rm exec-wf},\\
\max_j\deg Q_j&\le23.
\end{aligned}\]
Byte and word reconstruction uses Boolean limbs:
\[\begin{aligned}
b_k(b_k-1)&=0,&v&=\sum_{k=0}^{7}2^k b_k,\\
w_k(w_k-1)&=0,&u&=\sum_{k=0}^{15}2^k w_k.
\end{aligned}\]
Typical selector-gated identities are
\[\begin{aligned}
q_{\rm add}\,[r-a-b+2^8c]&=0,\\
q_{\rm sub}\,[a-b-r-2^8c]&=0,\\
q_{\rm jump}\,[pc^+-(q_t t+(1-q_t)pc_{\rm seq})]&=0,\\
q_{\rm stack}\,[sp^+-(sp+\delta_{\rm sp})]&=0.
\end{aligned}\]
Flags, DAA, CB-prefixed operations, interrupts, HALT, MBC3 bank selection, timer stages,
PPU/STAT ordering, DMA, serial, joypad, APU, and typed MMIO instantiate the same pattern
\(q\cdot f(W_r)=0\).
The fixed tables are
\[T_{\rm ISA}:[2^9]\to\mathbb{F}^{38},\qquad
T_{\rm exec}:[2^{19}]\to\mathbb{F}^{12},\qquad
R:[2^{20}]\to\mathbb{F}.\]
(5)
There are four ISA queries, at most eight byte-operation queries, and at most five ROM bus
queries per packed row.
4.Shout-style lookup equations#
For a table \(T:\{0,1\}^m\to\mathbb{F}^v\), selected trace rows \(x\in\mathcal H\), address bits
\(A(x)\in\{0,1\}^m\), selector \(q(x)\), and output \(y(x)\), sample \(\gamma,\lambda\) and compress
\[\begin{aligned}
T_\gamma(u)&=\sum_{h=0}^{v-1}\gamma^hT_h(u),
&y_\gamma(x)&=\sum_{h=0}^{v-1}\gamma^hy_h(x),\\
\chi_{A(x)}(u)&=\prod_{j=0}^{m-1}
\bigl(A_j(x)u_j+(1-A_j(x))(1-u_j)\bigr),\\
R_A(u)&=\sum_{x\in\mathcal H}\lambda_xq(x)\chi_{A(x)}(u).
\end{aligned}\]
Then
\[\boxed{
\sum_{u\in\{0,1\}^m}R_A(u)T_\gamma(u)
=\sum_{x\in\mathcal H}\lambda_xq(x)y_\gamma(x)}.\]
(6)
The left side is a table product sumcheck; the construction of \(R_A\) is an address-binding
sumcheck. Equation (5) is instantiated for
\[\begin{aligned}
\mathsf{ISA}:&\quad (m,v)=(9,38),\quad 4\ \text{lanes},\\
\mathsf{Exec}:&\quad (m,v)=(19,12),\quad 8\ \text{slots},\\
\mathsf{ROM}:&\quad (m,v)=(20,1),\quad 5\ \text{bus slots}.
\end{aligned}\]
All addresses, outputs, selectors, table commitments, and openings are Fiat-Shamir bound.
5.Mutable memory#
For a selected event \(e=(a,v^-,v^+,t^-,t)\) with write selector \(w_e\), choose
\(\alpha,\beta\leftarrow\mathbb{F}\) and define
\[\begin{aligned}
u_e&=a+\alpha\bigl(w_ev^-+(q_e-w_e)v^+\bigr)+\alpha^2t^-,\\
v_e&=a+\alpha v^++\alpha^2t,\\
(\beta-u_e)z_e^{\rm in}&=q_e,
&(\beta-v_e)z_e^{\rm out}&=q_e.
\end{aligned}\]
With \(\langle f\rangle_n=2^{-n}\sum_{x\in\{0,1\}^n}f(x)\) and boundary inverse-table
averages \(Z_0,Z_L\):
\[\boxed{2^{17}(Z_0-Z_L)+2^{14}
\sum_{s=0}^{4}\left(\langle z_s^{\rm out}\rangle_{14}
-\langle z_s^{\rm in}\rangle_{14}\right)=0.}\]
(7)
Fixed clocks, predecessor timestamps, initial values, final values, and
Equation (6) bind the \(2^{17}\)-byte mutable image.
6.Ordered logs and continuity#
For \(k\in\{\mathsf{bus},\mathsf{in},\mathsf{out},\mathsf{isa}\}\), compress tuple
\(v=(v_0,\ldots,v_{d_k-1})\) as
\[\phi_k(v)=\sum_{j=0}^{d_k-1}\gamma_{k,j}v_j,\qquad
z_{k,e}=\frac{q_{k,e}}{\zeta_k-\phi_k(v_e)}.\]
(8)
Canonical positions are tuple fields. For trace inverse columns \(Z_k^{\rm tr}\) and table
inverse columns \(Z_k^{\rm tab}\):
\[\begin{aligned}
2^{14}\sum_e\langle Z_{k,e}^{\rm tr}\rangle_{14}
&=2^{17}\langle Z_k^{\rm tab}\rangle_{17},\\
2^{17}\langle q_k^{\rm tab}\rangle_{17}&=n_k.
\end{aligned}\]
For state-mixing challenge \(\rho\) and inverse point \(\zeta\), define the row-tagged token
\[\Phi_\rho(s,t)=t+\sum_{j=0}^{37}\rho^{j+1}s_j.\]
(9)
With
\[\begin{aligned}
z_r^+&=\frac{a_r}{\zeta-\Phi_\rho(s_r^+,r+1)},&
z_r^-&=\frac{a_r}{\zeta-\Phi_\rho(s_r^-,r)},\\
c_r&=a_r-i_r+\sum_{j=0}^{3}\ell_{r,j},
\end{aligned}\]
continuity reduces to
\[\begin{aligned}
\boxed{2^{14}(\langle z^+\rangle_{14}-\langle z^-\rangle_{14})
+\frac{1}{\zeta-\Phi_\rho(s_0,0)}
-\frac{1}{\zeta-\Phi_\rho(s_L,A)}=0},\\
\boxed{2^{14}\langle c\rangle_{14}=T},
\qquad A\le T\le4A.
\end{aligned}\]
The row identities are reduced by the sumcheck protocol \citepsumcheck.
For column \(w_j:\{0,1\}^{14}\to\mathbb{F}\),
\[\widetilde w_j(z)=\sum_{x\in\{0,1\}^{14}}w_j(x)\operatorname{eq}(z,x),\qquad
\operatorname{eq}(z,x)=\prod_{k=0}^{13}\bigl(z_kx_k+(1-z_k)(1-x_k)\bigr).\]
(10)
Sample \(r\leftarrow\mathbb{F}^{14}\) and \(\eta\leftarrow\mathbb{F}^*\), and mix the identities:
\[\begin{aligned}
Q_\eta(W(x))&=\sum_{j=0}^{M-1}\eta^jQ_j(W(x)),\\
0&=\sum_{x\in\{0,1\}^{14}}\operatorname{eq}(r,x)Q_\eta(W(x)).
\end{aligned}\]
Sumcheck yields \(u\in\mathbb{F}^{14}\) and
\[\mathsf{claim}_{14}=\operatorname{eq}(r,u)Q_\eta
\bigl(\widetilde W_0(u),\ldots,\widetilde W_{C-1}(u)\bigr).\]
(11)
Since \(\deg Q\le23\), equality weighting gives round degree at most \(24\) and
\[n_{\rm eval/round}=25,\qquad n_{\rm rounds}=14,\qquad
n_{\rm full\ row\ eval}=25(2^{14}-1)=409575.\]
(12)
Pad the witness with four zero columns:
\[\begin{aligned}
\bar W&=(W_0,\ldots,W_{4603},0,0,0,0)\in\mathbb{F}^{2^{14}\times4608},\\
G_g&=(\widetilde W_{128g},\ldots,\widetilde W_{128g+127}),\quad 0\le g<36,\\
C_g&=\mathsf{Com}_{\rm Akita}(G_g),\\
\pi_i^{\rm open}&=\mathsf{Open}_{\rm Akita}(G_{2i},G_{2i+1};u),\quad0\le i<18.
\end{aligned}\]
Akita is a transparent lattice PCS whose binding target is stated under Module-SIS
\citepakita,akitapost:
\[A\xleftarrow{\$}R_q^{n\times m},\qquad
\operatorname{MSIS}_{n,m,q,\beta}:\quad
0\ne z\in R^m,\quad Az=0\pmod q,\quad\|z\|\le\beta.\]
(13)
Nightstream \citepnightstream is relevant as an implementation reference for lattice-based
CCS folding architecture, a separated paper-exact versus optimized oracle/sumcheck path, and
seeded Ajtai commitment engineering. It is not used here as a production backend and is not
evidence of end-to-end SM83 or Game Boy proving throughput.
The transcript binds
\[\mathsf{tr}=\mathsf{H}(\nu\parallel D_{\rm back}\parallel D_{\rm schedule}
\parallel C_0\parallel\cdots\parallel C_{35}\parallel\mathsf{Stmt}\parallel\mathsf{domain}),\]
(14)
using Blake2b-512 internally for Fiat-Shamir. The wire cut is strict:
\[\mathsf{Decode}(\texttt{ZKSM83R2})=\nu_2,\qquad
\mathsf{Decode}(\texttt{ZKSM83R1})=\bot.\]
(15)
Fiat-Shamir compilation follows the standard transform paradigm \citepfiatshamir.
8.Receipt composition#
One segment proof is
\[\pi_k=(C_W,\pi_Q,\pi_{\rm ISA},\pi_{\rm exec},\pi_{\rm ROM},
\pi_{\rm mem},\pi_{\rm cont},\pi_{\rm log}).\]
(16)
Before any folding layer is introduced, the implementation types each obligation by family and
evaluation binding: CPU and device row relations use the packed-row sumcheck terminal point; ISA
and execution lookups use shared witness openings; ROM uses a table opening; mutable memory uses
the shared witness plane; continuity uses segment-boundary challenges; and logs use ordered-log
challenges. Accumulation may only combine claims with the same family and evaluation binding.
For \(0\le k<L\):
\[\begin{aligned}
B_{k}^{+}&=B_{k+1}^{-},&
C_{\mu,k}^{+}&=C_{\mu,k+1}^{-},\\
\sum_k T_k&=T,&
\sum_k A_k&=A,&
\sum_k C_k&=C,&
\sum_k\mathbf n_k&=\mathbf n.
\end{aligned}\]
The verifier accepts exactly when
\[\mathsf{Verify}(\mathsf{Stmt},\pi)=
\bigwedge_{k=0}^{L-1}\left[
\mathsf{Verify}_Q\wedge\mathsf{Verify}_{\rm ISA}\wedge\mathsf{Verify}_{\rm exec}\wedge
\mathsf{Verify}_{\rm ROM}\wedge\mathsf{Verify}_{\rm mem}\wedge\mathsf{Verify}_{\rm cont}\wedge
\mathsf{Verify}_{\rm log}\right]_k
\wedge\mathcal{R}_{\rm chain}.\]
(17)
No emulator, ROM image, memory image, or trace is a verifier input.
9.Conditional soundness#
Proposition 1 (Composition).
#Assume Akita evaluation binding, sumcheck soundness, lookup and log-derivative soundness,
collision resistance of the canonical hashes, and a random-oracle Fiat-Shamir transform.
Then
\[\Pr\left[\mathsf{Verify}(\mathsf{Stmt},\pi)=1\wedge\mathsf{Stmt}\notin\mathcal{L}_{\rm SM83}\right]
\le \varepsilon_{\rm PCS}+\varepsilon_{\rm SC}+\varepsilon_{\rm lookup}
+\varepsilon_{\rm log}+\varepsilon_{\rm hash}=\operatorname{negl}(\lambda).\]
(18)
Reduction skeleton.
\[\begin{aligned}
\mathsf{Verify}_{\rm PCS}=1&\Longrightarrow \exists W:\widetilde W(u)=v_u,\\
\mathsf{Verify}_Q=1&\Longrightarrow \forall r<N,\ Q(W_r)=0,\\
\mathsf{Verify}_{\rm lookup}\wedge\mathsf{Verify}_{\rm mem}\wedge\mathsf{Verify}_{\rm log}=1
&\Longrightarrow (R,\mu_0,\mu_L,\epsilon_{0:T})\ \text{are commitment-bound},\\
\mathsf{Verify}_{\rm cont}\wedge\mathcal{R}_{\rm chain}=1
&\Longrightarrow s_0\xrightarrow{\tau}\cdots\xrightarrow{\tau}s_T,\quad
(s_0,s_T,T,A,C,\mathbf n)=\mathsf{Stmt}.
\end{aligned}\]
Any false implication breaks one assumed component.
∎
10.Static cost and evidence boundary#
The logical witness sizes are exact source-level quantities:
\[\begin{aligned}
|W|_{u64}&=4604\cdot2^{14}\cdot8
=603455488\ \text{bytes}=575.5\ \text{MiB},\\
|W|_{\mathbb{F}_{128}}&\approx4604\cdot2^{14}\cdot16
=1.124\ \text{GiB},\\
N_{\rm slot}&=409575\cdot11458=4692910350.
\end{aligned}\]
\(N_{\rm slot}\) counts constraint-slot evaluations in the main sumcheck model, not native CPU
instructions or measured field operations.
A benchmark report must separate at least the following buckets before making a performance
claim:
\[\begin{gathered}
\mathsf{WitnessBuild},\mathsf{RelEval},\mathsf{Commit},\mathsf{ROM},
\mathsf{Mem},\mathsf{Cont},\mathsf{Log},\\
\mathsf{Sumcheck},\mathsf{Open},\mathsf{Encode},\mathsf{Verify},|\pi|.
\end{gathered}\]
(19)
The current implementation exposes process-local diagnostics for the proof components in
Equation (17), except that witness construction and proof-byte attribution
still require a dedicated benchmark harness.
For \(T\) source transitions and average packing density \(1\le\bar\rho\le4\),
\[A\approx\left\lceil\frac{T}{\bar\rho}\right\rceil,\qquad
L\approx\left\lceil\frac{T}{2^{14}\bar\rho}\right\rceil,\qquad
\mathsf{Cost}_P=L\left(\mathsf{Commit}_{36}+\mathsf{Open}_{18}
+\mathsf{SC}_{Q}+\mathsf{Lookup}+\mathsf{Mem}+\mathsf{Log}\right).\]
(20)
At snapshot 1062c35:
\[\begin{aligned}
\underbrace{(\mathcal{R}_{\rm row},\mathcal{R}_{\rm lookup},\mathcal{R}_{\rm mem},\mathcal{R}_{\rm log},
\mathcal{R}_{\rm chain},\mathsf{Prover},\mathsf{Verifier})}_{\rm connected\ in\ source}&=\ensuremath{\checkmark},\\
\underbrace{(\mathsf{packed\ e2e},\mathsf{cartridge\ chain},\mathsf{benchmark})}_{\rm current\ evidence}&=\ensuremath{?},\\
\mathsf{WitnessHiding}&=0.
\end{aligned}\]
Thus Equations (eq:static-cost)–(18) are models, not measurements.
11.Code correspondence#
12.Conclusion#
\[\boxed{
(R,\mu_0,s_0,I)
\xrightarrow{\tau_{\rm SM83}}
W
\xrightarrow{Q+\mathsf{Shout}+\mathsf{Mem}+\mathsf{Log}}
\pi
\xrightarrow{\mathsf{Akita}}
(\mathsf{Stmt},\mathsf{accept})}\]
(21)
The open empirical obligation is a current independently verified packed v2 receipt; the open
privacy obligation is an explicit witness-hiding layer.
\sloppy