Skip to content

Improvement: a ledger of the Octatrack's battery RAM, checked - #1322

Merged
repeat98 merged 1 commit into
mainfrom
claude/battery-ram-ledger
Nov 8, 2026
Merged

repeat98 merged 1 commit into
mainfrom
claude/battery-ram-ledger

Conversation

@repeat98

@repeat98 repeat98 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

What

Battery RAM that stock leaves free (0x100f859c-0x100fff00) keeps its contents through a power cycle. The base, Play Modes and drafts all keep data there, but nothing recorded who holds which range. Today the new module store (#1320) first took a range that overlaps the Micro Timing draft's table (0x100f8ffc-0x100f97ff, #1262), and no check noticed. The draft's own manifest says "there is no declaration slot for a draft's battery words".

  • sdk/machines/octatrack/battery-ram.json lists each range, its owner and what it holds:

    • Play Modes' PMNV;
    • Micro Timing's table;
    • the base's diag log, fxmap map, crash record, stall record and boot guard.
  • sdk/tests/test_battery_ram.py (in sdk:check) refuses:

    • two ranges that overlap, or a range outside the free span;
    • an address that the base names in the free span outside every range;
    • an address that a module or draft names (folder name = owner) outside a range its owner holds.

    It reads C, C++ and ColdFire assembly with comments removed. Test, probe and emulator files may name any range, because they read rather than keep. Vendored upstream/ trees are skipped.

  • The module guides' README ("A module owns what it saves") names the file.

When #1320 rebases onto this, it adds its range (0x100f9800-0x100fc000, owner base), and the check refuses it until then.

How I checked

  • All three tests pass on main.
  • The scanner's own unit test covers addresses inside comments, C's u suffix, assembly, test files and the base. It already caught one bug of mine: a \b that missed suffixed literals.
  • Against Octatrack base: a store for every module's state, per project (ot_store) #1320's store.c:
    • Both versions of its address are refused as in no range.
    • Declaring the first range (0x100f8f08-0x100fbf10) would be refused as overlapping Micro Timing.
  • npm run pr:ready: Ready. The first run failed in sdk/runtime/upload/tests/run_host.sh on an acknowledgement timeout while another build loaded the machine. That test passes alone, and the rerun was Ready.

Guides

The guides had no place to say which battery RAM a module may use. The ledger is that place now, and the README line points to it.

🤖 Generated with Claude Code

sdk/machines/octatrack/battery-ram.json names who holds each range of the battery
RAM stock leaves free. sdk/tests/test_battery_ram.py refuses overlapping
ranges and any address the base, a module or a draft names there outside its
owner's range (comments skipped; test, probe and emulator files read freely).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Nov 8, 2026
@repeat98
repeat98 enabled auto-merge November 8, 2026 10:35
@repeat98
repeat98 merged commit 0788cda into main Nov 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant