# Ice Climber (JE) — Pass 1 Disassembly (Pass 2 partial) ROM: `_wip/Ice Climber (JE)/Ice Climber (JE).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 74.6% code; Pass 2 partial.** `copilot/prg.s` is a real disassembly, not a skeleton: 6,112 instructions (12,230 bytes as code), **973 label definitions of which only 76 carry semantic names** — 897 are still address-based `Label_`. `locals.inc` holds **157 neutral `ZpXX` slots and no semantic zero-page aliases**. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). **Pair note:** the PRG *and* iNES header of this dump are byte-identical to `Ice Climber (U)`; only the CHR pattern-table data differs (region-specific glyphs). The two `prg.s` files are *not* identical — this variant has had a partial Pass 2 (76 names) applied, `(U)` has not (2 names). This header said "Pass 2 complete" from `edabbd9` (2026-10-18) until the 2026-10-19 correction; that claim counted the draft map's rows, not names actually present in `prg.s`. See "Pass 2 Status and Map Audit" below. ## ROM Facts | Property | Value | |----------|-------| | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | | Mirroring | Horizontal | | Battery-backed flag | clear | | ROM SHA-256 | `d230a7febf7e639760b6088c2b38cf70686ed64d66974ad94fd5fcd5c0a3f50f` | | PRG SHA-256 | `6913935b8d55ade070555416d330472839f4cefbf865c15c8248796d2bc5cf29` | ## Interrupt Vectors (taken from PRG $3FFA–$3FFF) | Vector | Target | Note | |--------|--------|------| | NMI | `$C076` | per-frame heartbeat | | RESET | `$C014` | enters at $C014 inside the first pages (the Donkey Kong Jr.-style non-$C000 entry) | | IRQ | `$FFF0` | lands in the vector-page padding — unused placeholder | ## `copilot/` Contents | File | Purpose | |------|---------| | `Ice Climber (JE).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | | `prg.s` | Pass 1: classified code/data split, 6,112 instructions, 76 semantic + 897 address-based `Label_` definitions, canonical audit comments | | `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | | `locals.inc` | 157 neutral `ZpXX` zero-page slots (Pass 2 naming outstanding) | | `iceclimber_label_map.tsv` / `iceclimber_full_map.tsv` | Pass 2 draft maps — **stale**, see the audit below; kept for provenance only | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build ```bash cd "_wip/Ice Climber (JE)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` ## Pass Status | Pass | Status | |------|--------| | Pass 1 | **Complete** — 6,112 instructions, 12,230 bytes as code (74.6%), 4,154 bytes as data, byte accounting exact (16,384) | | Pass 2 | **Partial** — 76 of 973 label definitions named (8%); 157 zero-page slots still neutral `ZpXX`; the drafted map is stale | | Pass 3 | Outstanding — data tables/structures unnamed | | Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | ## Pass 2 Status and Map Audit (corrected 2026-10-19) The earlier "Pass 2 complete" text was wrong on every number it gave, because it read the draft map instead of the source: - **"237 semantic labels"** was the number of *distinct old names* in the map (`iceclimber_full_map.tsv` has 255 `label` rows covering 237 distinct `Label_` names). `prg.s` actually names **76** definitions; the other 897 are still `Label_`. - **"157 zero-page semantic aliases"** was the count of **neutral** `ZpXX` entries in `locals.inc`. There are **zero** semantic zero-page aliases. - Most of the listed "key renamed routines" (`InitSystem`, `InitPPU`, `InitGameState`, `InitSprites`, `UpdateOAM`, `CheckController`, `CheckCollision`, `WritePPU`, …) do not exist in the file. - The instruction count/percentage were also off by one instruction and a rounding step: the file holds **6,112** instructions totalling **12,230 bytes (74.6%)**, not 6,113 / 74.7%. Draft-map audit (`iceclimber_full_map.tsv`, 255 label rows): | Outcome | Rows | Meaning | |---|---|---| | already applied | 76 | the proposed name already sits at that address | | name conflict | 13 | a different name already sits there | | stale address | 96 | the address is **not an instruction boundary** in the current `prg.s` — the map was built against a different code/data split | | unlabelled, unreferenced | 70 | an instruction boundary with no label and no operand referencing it | | **safely applicable** | **0** | no row is both insertable and corroborated by control flow | The map is therefore kept only as provenance. Completing Pass 2 needs a fresh map derived from the committed split (routine entries plus `_Block[_n]` internal branch targets, as done for `Donkey Kong (JU)`). **Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s.