c64-basic-v2-rnd-analysis
/c64-basic-v2-rnd-analysis
Analizuje dokładnie graf funkcji RND w C64 BASIC V2: ziarna, okresy, punkty stałe, cykle i statystyki składowych.
- Autor
- c64cryptoboy ↗
- Repozytorium
- retro-archaeology-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 08.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 77
- Skrypty
- 28
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 08.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 28 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
- Paczka skrócona: część plików jest zbyt duża albo wykonywalna. Pełny folder jest w repozytorium.
Skrypty: analysis/analyze_final_histograms.py, analysis/analyze_negative_seed_space.py, analysis/analyze_ti_seed_prefixes.py, analysis/canonical_seed_domain.py, analysis/cpu6502.py, analysis/generate_specialized_rnd_c.py, analysis/isa6502.py, analysis/negative_seed_image.py, analysis/prepare_outer_shell_targets.py, analysis/render_component_depth.py, analysis/render_histograms.py, analysis/render_small_gra
Co robi i kiedy
Analizuje dokładnie graf funkcji RND w C64 BASIC V2: ziarna, okresy, punkty stałe, cykle i statystyki składowych.
Oryginalny opis (EN)
Query, explain, and reproduce the exact stock C64 BASIC V2 RND graph, negative-FAC seed mapping, canonical ranks, cycles, basins, and literal reachability. Use for exact RND seeds, periods, fixed points, and component statistics.
Jak działa
- Start with a compact query
- Choose the relevant reference
- Scope and reporting guardrails
- Optional data and validation
- Provenance
Podgląd SKILL.md
--- name: c64-basic-v2-rnd-analysis description: Query, explain, and reproduce the exact stock C64 BASIC V2 RND graph, negative-FAC seed mapping, canonical ranks, cycles, basins, and literal reachability. Use for exact RND seeds, periods, fixed points, and component statistics. compatibility: Python 3.10+ for compact queries; external pinned C64 ROMs for ROM-backed checks; GCC and a POSIX little-endian host for C validation and runners. Retain repository shared support and the sibling ROM-reference skill. --- # C64 BASIC V2 RND analysis Use the deterministic tools in `analysis/` to answer exact seed and graph questions without reconstructing the arithmetic or rerunning billions of states. Compact data, references, tests, and query tools are bundled; ROM binaries and per-state metadata are not. ## Start with a compact query From this skill directory: ```bash cd analysis python3 -B rnd_query.py rank '7e 2a d3 ab c6' python3 -B rnd_query.py fac-to-seed '9f f1 ea b4 2a' python3 -B rnd_query.py components python3 -B rnd_query.py verify-results ``` The fixed-point state has canonical rank **1,708,815,729**. The supplied negative FAC maps directly to those same five state bytes. `components` prints canonical cycle, transient, median-depth, maximum-depth, and basin counts; transient medians exclude cycle nodes. These commands need only Python's standard library and bundled data, not an emulator, ROMs, or full metadata. FAC is BASIC's floating-point accumulator representation. FAC arguments above contain an exponent and restored normalized mantissa; the negative sign is understood separately. RNDX is the retained five-byte generator state, not its printed decimal approximation. For all 64 negative-FAC preimages of that fixed point: ```bash python3 -B rnd_query.py preimages '7e 2a d3 ab c6' ``` ## Choose the relevant reference - [Results](analysis/FINAL_REPORT.md): graph inventory, statistics, useful seeds, and a complete small orbit. - [Seed reference](analysis/SEED_REFERENCE.md): canonical-domain derivation, negative-FAC image and inverse, shell maxima, expression-only proof, integer clock seeds, and `RND(0)`. - [Reproduction](analysis/REPRODUCE.md): requirements, commands, bounded tests, and the explicit exhaustive-run gate. - [Validation](analysis/VALIDATION.md): exact transition contracts, differential evidence, metadata layout, restart recovery, and negative controls. - [Sources](analysis/SOURCES.md): prior work, historical design evidence, attribution, and unresolved ROM-derived-code provenance. - [External data](analysis/LOCAL_ARTIFACTS.md): metadata size, identity, and verification limits. Read the relevant proof before making an impossibility claim. Read all of the reproduction guide before rebuilding, validating against ROMs, or launching a fresh exhaustive run. A seed query does not authorize a production run. ## Scope and reporting guardrails 1. The canonical closed subset `C` contains **2,936,012,800** states. The all-valid-negative-FAC image `S` contains **10,745,675,776** distinct states. `C ⊂ S`, `T(S) ⊆ C`, and `T(C) ⊆ C`; do not replace containment with `T(S)=C`. 2. **547,608,330,240** normalized nonzero negative FAC encodings map into `S`. Weighting those inputs differs from counting each distinct output state once. 3. State identity includes all five RNDX bytes at `$008B-$008F`. Canonical rank is a bijective enumeration, not the raw four mantissa bytes. `S` uses a separate dense 64-bit rank. 4. Positive arguments advance once regardless of magnitude. Negative arguments replace state through byte reversal, exponent injection, normalization, and rounding. Zero samples CIA1 hardware and is outside both deterministic graphs. 5. Power-on state `80 4f c7 52 58` belongs to neither `C` nor `S`, has no valid negative-FAC preimage, and enters `C` after one positive advance. 6. The transition is many-to-one, has ramps, and is not a textbook integer LCG. Never use host floating point as an exact transition or decimal-parser oracle. The ROM transition assumes normal BASIC arithmetic workspace, including `$0068=0`. 7. FAC, decimal-literal, and expression reachability differ. A failed literal search is not an impossibility proof. Detect repeats using exact five-byte equality, not formatted BASIC output. 8. Both populations have the same 15 components, one cycle per component; all 15 cycle lengths happen to differ. A basin includes its cycle and feeders. 9. Over `S`, maxima remain `mu=58,681`, `lambda=58,078`, and `mu+lambda=116,759`. `RND(-4.33901453)` is a practical maximizing seed, not the only FAC/state representation across `S`. `RND(-1)` is a simpler maximum-period seed. Neither is cryptographically suitable. Report the population, weighting, cycle inclusion, five-byte state, rank, and ROM identity. `mu` counts steps to the cycle; `lambda` is its length; `mu+lambda` counts unique internal states before repetition. ## Optional data and validation Per-state classification requires an external **11,744,051,200-byte (10.9375-GiB)** `metadata.bin` plus its matching completed-run files: ```bash python3 -B rnd_query.py classify '7e 2a d3 ab c6' --run-dir /path/to/completed-run ``` `C64_RND_RUN_DIR` selects that run; `C64_RND_SHELL_DIR` selects alternate shell aggregates. If data is missing, report unavailable classification rather than launching production. The compact expanded-population table remains available at `analysis/scratch/negative-shell-production/final-table.txt`. ROM-free query tests, from `analysis/`: ```bash unset C64_RND_RUN_DIR C64_RND_SHELL_DIR PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest -v test_rnd_query sha256sum -c compact-result-sha256.txt ``` The classification test retains its existing explicit metadata gate. Full report and transition tests additionally require external pinned ROMs, configured through `C64_ROM_DIR`; consult the reproduction guide. Missing ROMs are a prerequisite failure, not a reason to alter test expectations or skip rules. Fresh exhaustive runs need explicit approval, matching ROM hashes, validated restart behavior, a native little-endian filesystem, and at least 15 GiB free disk space (25 GiB preferred). Recorded canonical and shell runtimes were about 2 hours 22 minutes and 33 minutes, respectively; performance is host-dependent. Use `run_full_histogram.py` for canonical production, not direct C invocation. ## Provenance ROM binaries are external. The bundled `analysis/generated_rnd_cycle.c` and `analysis/scratch/generated_fin.c` are mechanically ROM-derived and retain **unresolved provenance/licensing status pending owner decision**. Inclusion is not clearance or a new license grant. Preserve their [attribution and uncertainty notices](analysis/SOURCES.md), the sibling [ROM sources](../c64-rom-reference/references/SOURCES.md), and the repository [notices](../../THIRD_PARTY_NOTICES.md).
Pliki w paczce (77)
- SKILL.md 7 KB
- analysis/CHIPTUNESAK_LICENSE.txt 1 KB
- analysis/FINAL_REPORT.md 18 KB
- analysis/LOCAL_ARTIFACTS.md 2 KB
- analysis/REPRODUCE.md 16 KB
- analysis/SEED_REFERENCE.md 32 KB
- analysis/SOURCES.md 12 KB
- analysis/VALIDATION.md 13 KB
- analysis/analyze_final_histograms.py 5 KB
- analysis/analyze_negative_seed_space.py 5 KB
- analysis/analyze_ti_seed_prefixes.py 6 KB
- analysis/batch_rnd_graph.c 6 KB
- analysis/canonical_seed_domain.h 6 KB
- analysis/canonical_seed_domain.py 6 KB
- analysis/compact-result-sha256.txt 3 KB
- analysis/cpu6502.py 1 KB
- analysis/export_component_depth.c 6 KB
- analysis/extract_component_frontiers.c 5 KB
- analysis/full_rnd_histogram.c 29 KB
- analysis/generate_specialized_rnd_c.py 16 KB
- analysis/generated_rnd_cycle.c 166 KB
- analysis/invert_positive_frontiers.c 6 KB
- analysis/isa6502.py 1 KB
- analysis/negative_seed_image.py 13 KB
- analysis/negative_seed_image_domain.h 4 KB
- analysis/negative_shell_histogram.c 22 KB
- analysis/pilot_rnd_histogram.c 10 KB
- analysis/prepare_outer_shell_targets.py 2 KB
- analysis/probe_rnd_intermediate.c 1 KB
- analysis/render_component_depth.py 5 KB
- analysis/render_histograms.py 8 KB
- analysis/render_small_graph.py 5 KB
- analysis/reproducibility-sha256.txt 4 KB
- analysis/rnd_paths.py 1 KB
- analysis/rnd_query.py 10 KB
- analysis/run_full_histogram.py 6 KB
- analysis/summarize_outer_shell_frontiers.py 7 KB
- analysis/test_canonical_seed_domain.py 2 KB
- analysis/test_final_report.py 8 KB
- analysis/test_full_rnd_histogram.py 7 KB
- analysis/test_negative_seed_image.py 4 KB
- analysis/test_rnd_query.py 5 KB
- analysis/throwaway_rom_cycle.c 10 KB
- analysis/throwaway_rom_cycle.py 4 KB
- analysis/validate_canonical_domain.c 3 KB
- analysis/validate_generated_rnd.py 7 KB
- analysis/validate_outer_shell_frontiers.py 2 KB
- analysis/scratch/component-frontier-intermediates.csv 49 KB
- analysis/scratch/component-frontier-predecessors.csv 52 KB
- analysis/scratch/component-frontiers.csv 1 KB
- analysis/scratch/find_maximizing_literals.py 4 KB
- analysis/scratch/generate_fin_c.py 2 KB
- analysis/scratch/generated_fin.c 244 KB
- analysis/scratch/literal-search.log 3 KB
- analysis/scratch/maximizing-literals.txt 2 KB
- analysis/scratch/outer-shell-frontiers.csv 1 KB
- analysis/scratch/outer-shell-frontiers.json 169 KB
- analysis/scratch/search_literal_reachability.py 2 KB
- analysis/scratch/ti-seed-prefixes.json 10 KB
- analysis/scratch/full-production/cycle-components.csv 1 KB
- analysis/scratch/full-production/final-output-sha256.txt 1 KB
- analysis/scratch/full-production/final-statistics.json 7 KB
- analysis/scratch/full-production/hist-lambda.csv 1 KB
- analysis/scratch/full-production/hist-mu.csv 668 KB
- analysis/scratch/full-production/summary.json 1 KB
- analysis/scratch/negative-shell-production/final-statistics.json 3 KB
- analysis/scratch/negative-shell-production/final-table.txt 1 KB
- analysis/scratch/negative-shell-production/summary.json 1 KB
- analysis/visualization/README.md 1 KB
- analysis/visualization/rnd-component-depth.svg 137 KB
- analysis/visualization/rnd-histograms.svg 29 KB
- analysis/visualization/small-mu5-lambda7.bas 1 KB
- analysis/visualization/small-mu5-lambda7.dot 1 KB
- analysis/visualization/small-mu5-lambda7.json 1 KB
- analysis/visualization/small-mu5-lambda7.svg 9 KB
- analysis/visualization/small-mu5-lambda7.txt 2 KB
- scripts/find-project.py 1 KB
Pominięte w paczce: 5 (zbyt duże albo wykonywalne), są w repozytorium.
Wersje
W bazie nie ma innych skilli o nazwie c64-basic-v2-rnd-analysis.
Migawka bazy z 13.11.2026 · wersja paczki fee7debf20ef (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
Brak podobnych skilli w bazie.