# 559 experiments `partial_mapper.py` contains the four checkpoints recorded in the audit log. It is not a solution. `MAPPER559_VARIANT` chooses the checkpoint: | Variant | What it does | Result | | --- | --- | --- | | `first` | bank 13 at `$A000`, bank 0 at `$C000`, mapper-330 PRG writes active | CPU leaves ROM to `$4010`, PPU mask `$00` | | `bank13` | bank 13 at `$A000` and `$C000`, PRG writes ignored, `$F800/$5800` ack | gets past the crash, but CPU loops in RAM/IRQ; PPU mask `$00` | | `bank30` | bank 30 at `$C000` instead of 13 | CPU executes data at `$DC8F` | | `all13` | bank 13 in all three windows | CPU at `$074E` (RAM), PPU mask `$00` | Run one with: ``` set MAPPER559_VARIANT=bank13 python tools/run_rom.py "$ROM" --frames 600 \ --install-module mappers/559-sangokushi-subor/experiments/partial_mapper.py \ --trace evidence/partial-trace.jsonl ``` Do not present any of these as support for the mapper. They are the negative results that narrow the next experiment. ## The working model and the scripts that fitted it (audit entry 16) - `diff_mapper.py`: the 559 model read off the patched stores. `PRESCALE`, `START_PHASE` and `FIRE_AT` are class settings so the IRQ timing can be fitted; the default is one scanline (341/3 CPU cycles), /IRQ on the wrap. - `compare_carts.py`: runs the licensed mapper-19 cart and the pirate in lockstep with the same presses; prints differing pixels every 60 frames and writes both pictures every 300 (with `NES_PALETTE`). Without `--install-module` it uses famicom-python's own `Subor559`. - `fit_irq.py`: saves both carts at the map screen once, then scores IRQ timing variants of `diff_mapper.Subor559` over 60 frames each (`--sweep coarse` or `fine`). ``` python compare_carts.py "$ORIG" "$PIRATE" --frames 600 --out cmp python fit_irq.py "$ORIG" "$PIRATE" fitwork --sweep fine ``` Rerun 2026-11-20 (PyPy, famicom-python `f407e00`): `compare_carts.py` without a module gives 0 px from frame 180 to 420 and ~1,216-1,223 px from 540 (the erased copyright text). The fine sweep gives 6.6 px/frame mean at 341/3 (worst 43), 6.3 at 113.75 (worst 50), and 1,470-1,537 at 113.5 and 114.5: the step is pinned to within about a quarter of a cycle of one scanline. 341/3 is kept as the model because it is the one with a physical reason, not because it scores best.