commit 9f107b5f80cd05e1b9882d69d6acbc8d34eb485c Author: David Gwilliam Date: Mon Jun 15 22:33:53 2026 -0700 Initial commit: akai-fetch - AKAI sampler ISO downloader & extractor - fetch: Go CLI tool for searching, downloading, and extracting AKAI sampler ISOs from archive.org - scripts/extract_wavs.sh: Shell script driving akaiutil to convert samples to WAV - Dockerfile: Multi-stage build packaging akaiutil + fetch - third_party/akaiutil: Vendored akaiutil v4.6.7 source (GPLv2) - docs/akaiutil.md: Full akaiutil reference diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e872b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Binaries +fetch +akai-fetch +akai-fetch-bin +*.exe + +# Original akaiutil source (vendored copy in third_party/) +akaiutil-4.6.7/ + +# Build artifacts +*.o +*.obj + +# Data +*.iso +output/ +wavs + +# IDE +.vscode/ +.idea/ + +# OS +.DS_Store +Thumbs.db + +# Temp +/tmp/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..524bc90 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +# Stage 1: Build akaiutil from source +FROM debian:11 AS akaiutil-builder + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + && rm -rf /var/lib/apt/lists/* + +COPY third_party/akaiutil/ /src/akaiutil/ +WORKDIR /src/akaiutil +RUN make + +# Stage 2: Build fetch (Go tool) +FROM golang:1.26-alpine AS fetch-builder + +WORKDIR /src +COPY go.mod main.go /src/ +RUN CGO_ENABLED=0 go build -o /fetch . + +# Stage 3: Runtime image +FROM debian:11-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=akaiutil-builder /src/akaiutil/akaiutil /usr/local/bin/ +COPY --from=fetch-builder /fetch /usr/local/bin/fetch +COPY scripts/extract_wavs.sh /usr/local/bin/ + +WORKDIR /data +ENTRYPOINT ["fetch"] +CMD ["--help"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0637910 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +BIN := fetch +IMAGE := akai-fetch +REMOTE := dhg.lol + +build: + CGO_ENABLED=0 go build -o $(BIN) . + +docker: + docker build -t $(IMAGE) . + +docker-run: + docker run --rm -v "$(PWD)/output:/data" $(IMAGE) $(ARGS) + +install: build + scp $(BIN) $(REMOTE):/tmp/$(BIN) && \ + ssh $(REMOTE) "sudo mv /tmp/$(BIN) /DATA/Downloads/akai/$(BIN) && sudo chmod +x /DATA/Downloads/akai/$(BIN)" + +clean: + rm -f $(BIN) + +.PHONY: build docker docker-run install clean diff --git a/docs/akaiutil.md b/docs/akaiutil.md new file mode 100644 index 0000000..6eec08a --- /dev/null +++ b/docs/akaiutil.md @@ -0,0 +1,219 @@ +# akaiutil — AKAI Sampler Filesystem Tool + +**Version 4.6.7** (21-OCT-2022) — GPLv2 — by Klaus Michael Indlekofer + +Interactive console-based file manager for AKAI **S900/S950/S1000/S1100/S3000/CD3000** sampler disk images, floppies, hard drives, and CD-ROMs. + +## Usage + +``` +akaiutil [-h] [-r] [-F] [-C] [-l ] [-o ] [-s ] + [-n ] [-c ...] [-p ...] + [[-f] ] ... [[-f] ] ... +``` + +### Options + +| Flag | Description | +|------|-------------| +| `-h` | Print help | +| `-r` | Read-only mode (must come first) | +| `-F` | Disable floppy filesystem detection | +| `-C` | Disable block cache | +| `-l ` | Lock file for exclusive access | +| `-o ` | Byte offset where disk data starts (decimal or `0x` hex) | +| `-s ` | Pseudo-disk size in KB (for multi-disk images) | +| `-n ` | Max pseudo-disks per file descriptor (max 8) | +| `-c ` | (Windows) Open CD-ROM `\\.\cdromN` | +| `-p ` | (Windows) Open physical drive `\\.\physicaldriveN` | + +On Linux, pass raw devices like `/dev/da1`, `/dev/disk2s0`. + +### Examples + +```bash +# Open a floppy image +akaiutil fff.img + +# Open harddisk images +akaiutil hhh1.img hhh2.img + +# Multi-harddisk image with explicit size +akaiutil -s 524280 mmm.img + +# Linux raw device access +akaiutil /dev/da1 hhh.img + +# Read-only CD-ROM (macOS) +akaiutil -r /dev/disk2s0 +``` + +## Virtual Filesystem + +``` +/disk/// +``` + +Shorthand: `/N` = `/diskN`, `/floppyN` = `/diskN/A/`. Use `_` for spaces in names. `.` and `..` work as usual. + +## Interactive Commands + +### Navigation & Info + +| Command | Alias | Description | +|---------|-------|-------------| +| `help []` | `man` | List commands or show help for a command | +| `exit` / `quit` | `bye`, `q` | Exit | +| `restart` | — | Rescan disks | +| `restartkeep` | `restart.`, `sync` | Rescan, keep current directory | +| `df` | — | Show disk info (all disks + partitions) | +| `dinfo` | `pwd` | Show current directory info | +| `cd []` | — | Change directory | +| `cdi ` | — | Change to volume by index | +| `dir []` | `ls` | List directory | +| `dirrec` | `lsrec` | Recursive listing | +| `lcd ` | — | Change local (host) directory | +| `ldir` | `lls` | List local directory | +| `dircache` | `lscache` | Show block cache info | + +### File Operations + +| Command | Alias | Description | +|---------|-------|-------------| +| `del ` / `deli ` | `rm` / `rmi` | Delete file | +| `ren []` | `mv` | Rename/move file | +| `reni []` | `mvi` | Rename by index | +| `copy []` | `cp` | Copy file | +| `copyi []` | `cpi` | Copy by index | +| `infoi ` | — | Show file info | +| `infoall` | — | Show info for all files | + +### Import / Export + +| Command | Alias | Description | +|---------|-------|-------------| +| `get [ []]` | `export` | Export file to host | +| `geti [ []]` | `exporti` | Export by index | +| `getall` | `exportall` | Export all files | +| `put [/] []` | `import` | Import file (use `*` for all) | +| `getdisk ` | `dget`, `dexport` | Export entire disk image | +| `putdisk ` | `dput`, `dimport` | Import disk image | +| `getpart [] ` | `pget`, `pexport` | Export partition | +| `putpart []` | `pput`, `pimport` | Import partition | +| `gettags ` | `tagsget` | Export partition tags | +| `puttags ` | `tagsput` | Import partition tags | + +### WAV Conversion + +| Command | Alias | Description | +|---------|-------|-------------| +| `sample2wav ` / `sample2wavi ` | `s2wav` / `getwav` | Sample → WAV | +| `sample2wavall` | `s2wavall` | All samples → WAV | +| `wav2sample []` | `wav2s`, `putwav` | WAV → sample (auto-detect) | +| `wav2sample9` / `wav2sample9c` | `putwav9` / `putwav9c` | WAV → S900 (non-compressed / compressed) | +| `wav2sample1` | `putwav1` | WAV → S1000 | +| `wav2sample3` | `putwav3` | WAV → S3000 | + +WAV input must be mono/stereo, 8/16/24/32-bit PCM. + +### S900 Compression + +| Command | Alias | Description | +|---------|-------|-------------| +| `sample900compr ` | `s9compr` | Compress S900 sample | +| `sample900comprall` | `s9comprall` | Compress all S900 samples | +| `sample900uncompr ` | `s9uncompr` | Uncompress S900 sample | +| `sample900uncomprall` | `s9uncomprall` | Uncompress all | + +### Volume Management + +| Command | Alias | Description | +|---------|-------|-------------| +| `mkvol []` | `mkdir` | Create volume (auto-detect type) | +| `mkvol9` / `mkvol1` / `mkvol3` / `mkvol3cd` | `mkdir9` etc. | Create S900/S1000/S3000/CD3000 volume | +| `mkvoli [ []]` | `mkdiri` | Create volume at specific index | +| `delvol ` / `delvoli ` | `rmdir` | Delete volume | +| `wipevol ` / `wipevoli ` | `rmall` | Wipe all files in volume | +| `renvol ` | `mvdir` | Rename volume | +| `copyvol ` / `copyvoli ` | `cpvol` | Copy volume | +| `copypart ` | `cppart` | Copy all volumes of a partition | +| `setosvervol ` / `setlnum ` | — | Set volume OS version / load number | +| `fixramname ` / `fixramnameall` | — | Fix file name headers | + +### Volume Parameters + +| Command | Alias | Description | +|---------|-------|-------------| +| `lsparam` / `lsparami ` | — | List parameters | +| `initparam` / `initparami ` | — | Initialize parameters | +| `setparam ` / `setparami ` | — | Set parameter | +| `getparam ` / `putparam ` | `paramget` / `paramput` | Export/import parameters | + +### Tag Management + +| Command | Description | +|---------|-------------| +| `lstags` | List tags | +| `inittags` | Initialize all tags | +| `rentag ` | Rename a tag | +| `settagi ` / `settagall ` | Tag a file / all files | +| `clrtagi ` / `clrtagall ` | Untag | +| `setfiltertag ` / `clrfiltertag ` | Filter by tag | + +### Formatting / Filesystem Operations + +| Command | Description | +|---------|-------------| +| `formatfloppyl9` / `l1` / `l3` | Format low-density floppy for S900/S1000/S3000 | +| `formatfloppyh9` / `h1` / `h3` | Format high-density floppy | +| `wipefloppy` | Create filesystem on floppy | +| `formatharddisk9 []` | Format HD for S900 (SH205, SUPRA20M, SUPRA30M, SUPRA60M, or size) | +| `formatharddisk1 [ []]` | Format HD for S1000 | +| `formatharddisk3 [ []]` | Format HD for S3000 | +| `formatharddisk3cd [ []]` | Format CD3000 CD-ROM | +| `wipepart` / `wipepart3cd` | Create filesystem in partition | +| `fixpart` / `fixharddisk` | Fix filesystem | +| `scanbadblkspart` / `scanbadblksdisk` | Scan for bad blocks | +| `markbadblkspart` / `markbadblksdisk` | Mark free bad blocks | +| `setcdinfo [