Files
psxrecomp/docs/internal
Shokunin c981b3a2d7 bios emitter: test cache-line starts on the runtime PC
The cached line-leader rule charges a fetch at every 16-byte line start of
the runtime PC. The BIOS emitter tested bits[3:0] of the ROM address instead
and assumed every copy window preserves them. OpenBIOS copies its kernel from
ROM 0x1FC1E4D4 to RAM 0x500, which shifts them by 4. Each kernel line
crossing was charged one instruction early, where it is a hit, and the real
crossing went uncharged. 1,152 kernel instruction sites differed from the
interpreter.

The test now uses the runtime PC that relocate_ra already computes. In the
OpenBIOS kernel, 823 misplaced fetch sites go and 773 are added at runtime
line starts. Retail profiles are unaffected: SCPH-1001's copy windows are
16-byte aligned and SCPH-101/5552 declare none. The uncached_fetch_charge
ctest now also replays every cached OpenBIOS run from a cold cache against
the interpreter's fetch path and the Beetle transcription.

R4 (OpenBIOS, recompiled kernel, HLE boot) reaches the game entry 6,013
guest cycles later than with the uncached fix alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 12:27:57 -07:00
..

Internal dev-logs & design notes

These are the working design documents and burn-down logs the project was built from. They are historical/working notes, not contributor onboarding docs — they capture decisions, phased plans, and deep subsystem investigations in the order they happened, and some sections are superseded by later ones.

If you're new here, start with the top-level README.md, then docs/ARCHITECTURE.md, docs/EXECUTION_MODEL.md, docs/BUILDING.md, and CONTRIBUTING.md. Come here when you need the why behind a specific subsystem.

Plans & roadmap

Cycle accuracy & timing

BIOS / scheduler

Renderer / widescreen

Project conventions & tracking

  • PRINCIPLES.md — this repo's debugging and enhancement principles (first-divergence, verified-enhancement HLE). Source comments cite it as docs/internal/PRINCIPLES.md; a "recomp-template PRINCIPLES.md" citation means a different repo's file.
  • ISSUES.md — the historical framework issue log. Live framework work is tracked in Beads (epic beads-eio.3), not here.
  • DEBUG.md — the debugging playbook behind the TCP debug server; the command reference itself is ../TCP_COMMANDS.md.
  • audit_inventory.md — what the codegen/GTE audit pipeline covers and why.

Overlay design & discovery

BIOS / boot hardening

GTE / CPU investigations

Upstream contributor reviews

upstream/ holds per-PR review notes for community contributions, one file per change, named <contributor>-<pr>-<topic>.md.

Overlay cache internals

  • SLJIT_PERSIST_CACHE.md — removed. It described the persisted shard cache of the sljit Tier-2 backend, which was deleted in 5b7e69b4 (2026-07-15). For the current model see runtime/src/overlay_loader.c (per-entry candidate validity), tools/compile_overlays.py (shard formation and the .ranges manifest), and ../COMPILING_OVERLAYS.md.

Removed