Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

VRAM Writes

VRAM is off-chip; the CPU's address, data, and write-strobe outputs reach the VRAM SRAM through dedicated pads (ma_pad[12:0], md_pad[7:0], mwr_n_pad, mrd_n_pad, mcs_n_pad) whose tri-state enables are gated on mode 3. There is no on-chip "VRAM write enable latch" analogous to OAM's WYJA; the Mode 3 lock is enforced by tri-stating the address bus and write strobe so the off-chip SRAM never sees a valid write cycle.

GateRoleTypeInputsNotes
ROPYMode 3 inverter for VRAM enablesnot_x1mode3ROPY = NOT(mode3); high outside Mode 3
XANEVRAM address tri-state-disable sourcenor2vram_to_oam, mode3XANE=1 when neither VRAM-sourced DMA nor Mode 3 holds — the CPU may drive the address pads
XEDUVRAM address tri-state enablenot_x2XANEXEDU = NOT(XANE); drives the not_if0 ena_n of the ma_pad[*] address pads
TOLECPU data-bus enable stage 1combinationalCPU bus enablesCarries CPU-side write-window timing
SERECPU data-bus enable stage 2and2TOLE, ROPYActive only when CPU drive is enabled AND outside Mode 3
ROCY / RAHU / SAZO / REVOPer-bit data-pad tri-state enable chaincombinationalSERE + per-bit fan-outDrive not_if0 ena_n on md_pad[*]
SOHYWrite-strobe drivernand2TYJY (CPU bus-phase write enable), SEREDrives mwr_n_pad low when both arms hold
TAXY / SYSY / RACO / TUTOCPU-bus-phase strobe assemblycombinationalT1T2_n / SOTO_n / TYJY chainGenerate the CPU-side write window feeding SOHY
mwr_n_padOff-chip write strobetri-state pad outputSOHYActive-low; visible to the off-chip VRAM SRAM
ma_pad[12:0]Off-chip address padstri-state pad outputsXEDU enable; CPU bus addressDriven when XANE=1
md_pad[7:0]Off-chip data padstri-state pad outputsSERE chain enable; CPU bus dataDriven when SERE=1

Lock-window behaviour.

  • Outside Mode 3 — ROPY=1, XANE=1, XEDU=1 → address pads driven from the CPU bus; SERE=1 (when CPU drive is active) → data pads driven and SOHY may pulse mwr_n_pad low. The off-chip SRAM sees a valid write cycle.
  • During Mode 3 — ROPY=0 → SERE=0 (data pads tri-stated) and SOHY held high (no strobe); independently XANE=0 → XEDU=0 (address pads tri-stated). The SRAM never sees the write: both address and strobe are absent, so there is no "missed write" latch to need — the strobe simply never asserts.

CUPA is not involved here. Unlike the OAM path — whose write window is the CUPA pulse via ppu_wr — the VRAM-write window is set by the SM83 bus-phase signals (T1T2_n, SOTO_n, TYJY) feeding TAXY/SYSY/SOHY. The mode-3-gated tri-state enables are the lock. If they are stable across the CPU's write window, the strobe propagates cleanly; if mode 3 transitions during the window, the address pads and strobe tri-state mid-cycle, truncating the write at the pins. What the external SRAM does with a truncated cycle is off-die and out of scope.