# Flash chips and SIMMs **No Fujitsu datasheet is pinned.** Tried and failed on 2026-11-11 and 2026-11-12: datasheetcatalog (404), Digi-Key's media host (404), bitsavers (404), archive.org search (no item), electro-tech-online's `mbm29f016a_fujitsu.pdf` (404, although a search lists it), elecfans (HTTP 468), dtsheet (403), and an Infineon/Mouser copy of the AMD Am29F016D sheet (returned an HTML stub). The Fujitsu document number is DS05-20844 (from search listings). Everything about the command set below is MAME's `intelfsh.cpp` `[mame]`, tier 5, plus the general shape of the AMD/Fujitsu command set. Pinning the MBM29F016A datasheet (or the Am29F016, its AMD twin) is the first task of the flash milestone (U8). ## The chips | Where | Chip | Size | Bus | | --- | --- | --- | --- | | Cartridge | Fujitsu 29F400TA-90 | 512 KiB | 8-bit; the BIOS | | SIMM 1, 2 | 4 × Fujitsu 29F016A-90 (two normal, two reverse pinout) | 4 × 2 MiB = 8 MiB | 32-bit: one chip per byte lane | | SIMM 3 to 7 | 8 × 29F016A, both sides | 16 MiB | chips in pairs | | "32 Mbit" SIMM 5 | 2 chips populated | 4 MiB | | MAME identifies the 29F016A as manufacturer `04`, device `AD`, 2 MiB, 64 KiB sectors. The BIOS knows four vendors' chips by name: FUJITSU, Intel/SHARP, HITACHI, MXIC `[rom]`, so its programmer has more than one command set in it; only the Fujitsu path is exercised by the known boards. ## Byte lanes **Program SIMMs** `[mame]`, checked against the CD `[ran]`: the longword at `06000000 + 4n` is `chip0[n] << 24 | chip1[n] << 16 | chip2[n] << 8 | chip3[n]`. A CPU write of a longword sends one command byte to each chip, so the BIOS programs four chips at once. **Graphics SIMMs**: chips work in pairs. In the 2 MiB CPU window at `04200000`, even chip of the pair supplies bytes 0 and 2 of each longword and the odd chip bytes 1 and 3; the pair's 4 MiB is reached in two halves `[mame]`. As linear data (what the DMA engine and the sound unit read, and what the CD files hold), a pair is its two chips byte-interleaved, even chip first `[ran]`. ## The graphics flash bank register `040C0088`, high word `[mame]`. Value `v`; `v - 2` selects the pair and the half: bit 0 is the half (second 2 MiB of the pair's address space as the window sees it), the rest picks the pair. | `v` | Chips | | --- | --- | | `02`, `03` | SIMM 3 chips 0, 1 (two halves) | | `04`-`09` | SIMM 3 chips 2 to 7 | | `0A`-`11` | SIMM 4 | | `12`-`19` | SIMM 5 | | `1A`-`21` | SIMM 6 | | `22`-`29` | SIMM 7 (would follow; never populated) | The same "first 4 MiB is special and skipped" offset appears everywhere a linear graphics address is used: DMA sources and sound sample addresses subtract `400000` `[mame]`. In linear terms the graphics space starts at 4 MiB, as if SIMM 1 and 2's place came first (U9). An unpopulated pair reads `FFFFFFFF` `[mame]`. ## Command set, as MAME models it Byte-wide, AMD style. Unlock: write `AA` to address `555`, `55` to `2AA` (MAME compares the low 12 bits and also accepts `AAA`), then a command at `555`: | Command | Meaning | | --- | --- | | `90` | autoselect: read manufacturer at 0, device at 1 | | `A0` | program one byte: the next write is address and data; bits can only go from 1 to 0 | | `80`, then unlock again, then `30` at a sector address | sector erase (64 KiB to `FF`) | | `80`, unlock, `10` at `555` | chip erase | | `F0` | reset to read mode | Status while busy is read from the chip (toggle and data-polling bits in the real part). MAME's program and erase timing is its own, not the chip's; it special-cases this chip so that a read anywhere returns status while a sector erases (other chips return data outside the sector). Real timing (program about 8 µs a byte, erase about a second a sector, from memory of the family datasheet, **unchecked**) decides how long flashing takes and is U8. `07FF0048` bit 0 toggles during programming `[mame]`: perhaps write-enable or Vpp control (U20). ## What the board must model - A `Flash29F016A` with read, autoselect, program, sector and chip erase, reset; contents as a `bytearray`; a dirty flag so the board can save state. - A `Simm` of 4 or 8 chips, absent chips reading `FF`. - A decoded linear view of SIMM 3 to 7 (the interleave above) kept in step with chip writes, for the DMA engine and the sound unit. MAME keeps exactly such a copy. - Milestones up to "CD boot and flashing" need only read mode, because the BIOS of a correctly flashed board does not write. Whether the BIOS reads the chips' IDs (autoselect) on every boot is **not checked**: its messages suggest it identifies the SIMMs (step 2 of [boot.md](boot.md)). Build autoselect in M3 so M2 does not depend on the answer; a MAME run with flash logging answers it.