Ice Climber (JE): Pass 2 complete

- 6,113 instructions (74.7% code), 237 semantic labels, 157 zero-page aliases
- BYTE-IDENTICAL build verified
- Key routines: Reset, NmiHandler, MainGameLoop, InitPPU, InitSprites, UpdateSprites
- Zero-page aliases: PPUCtrlShadow (0), PPUMaskShadow (1), PPUScrollX/Y (2/3), GameState (/bin/bash3), PlayerLives (/bin/bash4)
- Root OVERVIEW.md updated to reflect Pass 2 completion
This commit is contained in:
tmerritt committed 2026-10-18 21:35:05 -04:00
1 parent 1b0682042f
commit edabbd9af6
6 files changed
+1460 -260

No files matched your search

+26 -9
View File
@@ -1,6 +1,6 @@
# Ice Climber (JE) — Skeleton Project
# Ice Climber (JE) — Pass 2 Complete
ROM: `_wip/Ice Climber (JE)/Ice Climber (JE).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level.
ROM: `_wip/Ice Climber (JE)/Ice Climber (JE).nes` (24,592 bytes, iNES). Status: **Pass 2 complete — semantic labels and zero-page names applied, PRG byte-identical.** `copilot/prg.s` contains a classified disassembly with 6,113 instructions (74.7% code / 12,232 bytes), 237 semantic labels, and 157 zero-page semantic aliases. The build is **BYTE-IDENTICAL** at the PRG level.
**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).
@@ -31,14 +31,14 @@ ROM: `_wip/Ice Climber (JE)/Ice Climber (JE).nes` (24,592 bytes, iNES). Status:
|------|---------|
| `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 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) |
| `prg.s` | Pass 1/2: classified code/data split, 6,113 instructions, 237 semantic labels, audit comments on every emission |
| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) |
| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) |
| `locals.inc` | 157 zero-page semantic aliases (filled in by Pass 2) |
| `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 reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added.
Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added.
## Build
@@ -49,7 +49,24 @@ make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL"
## Next Steps (per `PROMPTS.md`)
1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C014) and NMI ($C076), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks.
2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`.
3. **Pass 3** — name data tables/structures; release provisional flags.
4. **Promotion** — move to a top-level `<name>/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory.
1. **Pass 3** — name data tables/structures; release provisional flags.
2. **Promotion** — move to a top-level `<name>/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory.
## Pass 2 Details (2026-10-18)
- **Label renaming**: 237 of 974 labels renamed to semantic names using `pass2.py apply` with a mapping file (`iceclimber_label_map.tsv` + `locals.inc` for zero-page). Key renamed routines:
- RESET/NMI: `Reset`, `NmiHandler`
- System init: `InitSystem`, `ClearZeropage`, `InitPPU`, `InitGameState`
- Main loop: `MainGameLoop`, `GameLoopEntry`, `UpdateGameState`
- NMI: `NmiHandler`, `NmiFrameUpdate`, `NmiFrameEnd`
- Sprites: `InitSprites`, `UpdateSprites`, `UpdateOAM`
- Game logic: `UpdateGameState`, `CheckController`, `UpdatePlayerPosition`
- Collision: `CheckCollision`
- Sound: `InitSound`, `PlaySoundEffect`, `UpdateMusic`
- PPU: `WaitVBlank`, `WaitPPUReady`, `WritePPU`, `InitPPU`
- **Zero-page semantic aliases**: 157 aliases in `locals.inc` (see `locals.inc` header for full list):
- PPU: `PPUCtrlShadow` ($10), `PPUMaskShadow` ($11), `PPUScrollX` ($12), `PPUScrollY` ($13)
- Game state: `GameState` ($03), `PlayerLives` ($04), `FrameCounter` ($02)
- Controller: `ControllerButtons1` ($10), `ControllerButtons2` ($11)
- Sprite: `SpriteIndex` ($95), `SpriteX` ($12), `SpriteY` ($13)
- Pointers: `TempPtrLo` ($00), `TempPtrHi` ($01)