x68k-archive

X68000 のディスクイメージを、Claude に聞けるナレッジベースに
Turn a pile of X68000 floppies into an archive you can actually ask questions of.

x68k-archive のデータの流れ ディスクイメージ群を xdf-fs が読み、xdf-index が全文索引を作り、xdf-mcp が MCP サーバとして公開し、Claude から自然言語で問い合わせる、という4段の流れを示した図。 disk images XDF / HDS / HDF + LZH の中身も xdf-index tantivy 全文索引 AI 要約 / メタデータ xdf-mcp MCP サーバ 7 ツール Claude Desktop / Code 読む 引く MCP SJIS → UTF-8 Human68k 18.3 名 本文・ファイル名・ 拡張子で検索 stdio / HTTP PIC 画像も表示 自然言語で 問い合わせ 手元で完結 — ディスクの中身は外に出ない / stays on your machine

ディスクイメージ → 索引 → MCP → Claude。索引もイメージもローカルに置いたまま使う。

背景 / Why

X68000 は、開けたら今でも熱の冷めやらない宝箱です。ただ、あれから 40 年近くが経って、 X68000 の時代と今のコンピューティングライフで何が決定的に違うかというと、 私は 検索性 だと考えています。

遠い記憶を頼りに——

「あれは確か Oh!X の 90 年前後の付録ディスクにあったよな?」

「電脳倶楽部の C 言語講座で、常駐プログラムの作り方が書かれてたよな?」

——と思い当たっても、そこから先は本体にフロッピーディスクを 1 枚ずつ投入してファイラで調べたり、 イメージ化したディスクをエミュレータに認識させて調べたり。貴重な時間を費やしてしまいます。 それはそれで、寄り道としては趣があるのですが、時間ばかり使ってしまい…… 玉手箱になってしまいませんか?

Open an X68000 disk and the heat still has not faded — it is a treasure chest. But nearly forty years on, the decisive difference between computing then and now is, I think, searchability. You half-remember something — "wasn't that on an Oh!X supplement disk from around 1990?", "didn't the 電脳倶楽部 C course explain how to write a memory-resident program?" — and from there it is feeding floppies into the real machine one at a time and walking them with a filer, or mounting an image in an emulator. There is a certain charm to that detour, admittedly — but the hours vanish, and the treasure chest quietly turns into tamatebako, the casket from the Urashima Tarō folktale: you open it, and the years are already gone.

これは何? / What is this

これは、X68000 (Human68k) の FD / SCSI・SASI HDD イメージを、 実機やエミュレータを起動せずにホストから直接読むための Rust ツール群です。 読めるだけでなく、中身を全文索引化し、MCP (Model Context Protocol) サーバとして Claude に繋ぎます。

数十枚〜数百枚のディスクに散らばった当時のソースコード・MML・ドキュメントを、 「どのディスクの何番目だったか」を覚えていなくても引けるようになります。 LZH の中身も展開して索引に入るので、DISK.LZH の奥に埋まったファイルにも届きます。

A Rust toolkit that reads X68000 (Human68k) disk images — XDF floppies, HDS (SCSI) and HDF (SASI) hard disks — directly from the host, with neither the real machine nor an emulator. It also builds a full-text index over their contents and exposes it to Claude through an MCP server, including files nested inside LZH archives.

何ができるか / What you can ask

Claude に繋いだあとは、こういう聞き方ができます。

「スプライトのスクロール処理をしている作例を探して、今の Unity ならどう書くか教えて」

"Find sprite scrolling examples in the archive, then show me how I'd write that in Unity today."

「このディスクの MUSIC ディレクトリにある MML を全部挙げて、使っている音源ドライバごとに分類して」

"List every MML file in this disk's MUSIC directory, grouped by which sound driver it targets."

「Dennou074A.img の TTL1.PIC を見せて」"Show me TTL1.PIC from Dennou074A.img."

これを支えているのが以下の 7 ツールです。Claude が必要に応じて自分で呼び分けます。

ツール用途
archive_search全文検索。出典 (イメージ:パーティション:パス) と抜粋を返す
archive_readファイル読み出し。テキストは SJIS → UTF-8、バイナリは hex
archive_listディレクトリ一覧
archive_summarizeイメージ単位の AI 要約 (「このディスクは何か」)
archive_view_imageX68000 の PIC 画像を PNG に変換してその場で表示
archive_metadata_query構造化メタデータへの確定的なクエリ (号数・投稿者・カテゴリ等)
archive_extract複数ファイルを ZIP にまとめて取り出す

はじめかた / Getting started

ホストに Rust は不要です。Docker があれば動きます。

# 1. ビルド
git clone https://github.com/rtanote/x68k-archive.git
cd x68k-archive
docker build -t x68k-archive .

# 2. 手持ちのイメージを索引化 (./archive に置く)
docker run --rm \
  -v $PWD/archive:/archive:ro \
  -v $PWD/index:/index \
  x68k-archive xdf-index build /archive --out /index

# 3. 動作確認
docker run --rm -v $PWD/index:/index x68k-archive \
  xdf-index search "スプライト" --index /index

あとは Claude Desktop / Claude Code の MCP 設定に xdf-mcp --index <索引ディレクトリ> を登録するだけです (--http を省略すると stdio モード)。手順は docs/claude-desktop-setup.md に書いてあります。

No Rust toolchain needed — Docker is enough. Build, index your own images, then register xdf-mcp --index <dir> as an MCP server in Claude Desktop or Claude Code.

コマンドラインだけでも使える / CLI only, no Claude needed

Claude を使わずに、素の CLI としても完結しています。xdfls / xdfcp / xdfgrep の 3 本。

$ xdfls disk.hds:0:/MUSIC
MUSIC:
  D------           0  1994-07-01 12:00  SRC/
  -----A-      11,151  1994-06-28 23:14  SAMPLE.ZMS
  -----A-       1,211  1994-06-28 23:15  SAMPLE.DOC

$ xdfgrep -i disk.hds:0 "*.zms"        # グロブで横断検索
$ xdfcp -R disk.xdf:/MUSIC ./out/       # ホストへ取り出し (mtime 保持)

ファイル名は Shift-JIS から UTF-8 に変換され、Human68k 拡張の 18.3 形式 (主名 8+9 バイト) の全角ファイル名もそのまま読めます。 イメージ指定は path:パーティション:/内部パス、LZH 内部は outer.lzh!/inner.zms です。

常駐サーバとして使う / Run it as a server

NAS にアーカイブを置いて Linux マシンで常駐させ、Tailscale Funnel 経由の HTTPS で Mac / Windows / iPad の Claude から使う構成も用意しています。 NFS マウント、秘密パスによる保護、systemd automount の設定まで docs/server-deployment.md に書いてあります。

$ cp .env.example .env    # ARCHIVE_DIR などを設定
$ docker compose up -d    # HTTP モードで常駐 (既定 :8765)

著作権について / About copyright

このリポジトリはツールだけを配布しています。 ディスクイメージ・索引・AI 要約・抽出物は一切含まれていません。

This repository ships tools only — no disk images, no index, no summaries. Use it on images you lawfully own. The generated index and summaries contain verbatim text from the originals, so keep them private. The MIT licence covers this source tree, not the content it processes.

リンク / Links