aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md383
1 files changed, 31 insertions, 352 deletions
diff --git a/README.md b/README.md
index 1437dd2..42622a8 100644
--- a/README.md
+++ b/README.md
@@ -1,379 +1,58 @@
-# YP3 Audiobook Rockbox
+# YP3 Audiobook Firmware
-Rockbox for the **YP3** MP3 player (SmartLink SL6801, 128x160 screen, five
-buttons), set up as a portable **audiobook player**. It is the unofficial
-YP3 port of Rockbox
-([jaydens-tasty-slop/rockbox](https://github.com/jaydens-tasty-slop/rockbox))
-with three patches that make `.m4b` audiobooks work the way you'd expect.
+This repo is simply the [YP3 Rockbox Firmware](https://github.com/jaydens-tasty-slop/rockbox) with slightly better audiobook features. It adds a bookmark to your .m4b audiobooks when the player is closed or powered off and chapter support. Your position is also saved every minute.
-Ready-to-flash firmware is in [`release/`](release/). It is installed with
-[rockslop](https://github.com/jaydens-tasty-slop/rockslop), the YP3 port's
-flasher, which you download separately ([Get rockslop](#1-get-rockslop)).
+Use Down+Left/Right to jump audiobooks by chapter.
-> **Unofficial and experimental.** Neither this nor the YP3 port it is built
-> on has had any review beyond testing on real players. Flashing can brick a
-> player. Every flash backs up the stock firmware first, and the player's
-> download mode is in its boot ROM, which flashing cannot touch.
+Hold Center then select **Chapters** to pick a chapter from a list.
-## Contents
+Tapping Left/Right skips 30 seconds.
-- [What it does](#what-it-does)
-- [Controls](#controls)
-- [Installing](#installing)
-- [Adding audiobooks](#adding-audiobooks)
-- [Power on and off](#power-on-and-off)
-- [Troubleshooting](#troubleshooting)
-- [Updating, and going back to stock](#updating-and-going-back-to-stock)
-- [Known issues](#known-issues)
-- [Building from source](#building-from-source)
-- [Repository layout](#repository-layout)
-- [Versions and sources](#versions-and-sources)
-- [Licences and credits](#licences-and-credits)
+## Install
-## What it does
+You need a charged YP3, a microSD card formatted **FAT32** (not exFAT), and Linux.
+On Windows/macOS, use the rockslop GUI with **USE A FILE** instead.
-- **Plays `.m4b`** (and `.m4a`/`.mp4`/MP3 etc.). AAC, HE-AAC and mono are
- all handled, and so are books with the index (`moov`) at the end of the
- file.
-- **Keeps your place.**
- - The position is saved when you pause and every minute while playing,
- so a crash, a RESET or a flat battery costs you at most a minute.
- (Stock Rockbox only saved it when a file started or stopped, which
- could lose hours in a single-file book.)
- - Power-off saves it, and power-on goes straight back into the book,
- rewound 5 s.
-- **Each book has its own bookmark.** Starting another book saves your place
- in the current one first. Picking a book from Files resumes it where you
- left off, even with several books in one folder.
- - The main menu's **Recent Bookmarks** lists the books you're partway
- through.
-- **Chapters inside `.m4b` files** (Nero `chpl` lists and iTunes/Audible
- QuickTime chapter tracks):
- - Down+Left / Down+Right jump to the previous / next chapter.
- - On the Now Playing screen, the title line shows the chapter and "Next
- Track" shows the next chapter. The track number reads like `3/24`.
- - The progress bar has a tick at each chapter.
- - Hold Centre → **Chapters** lists them with start times. Pick one to
- jump there.
- - A book split into one file per chapter works the same way, with files
- as chapters.
-- **Tapping Left/Right jumps 30 s** and never leaves the book.
-
-## Controls
-
-Now Playing screen:
-
-| Button | Tap | Hold |
-|---|---|---|
-| Centre | play / pause | menu (~0.3 s), **Chapters** first; power off (3 s) |
-| Left / Right | back / forward 30 s | seek, speeding up |
-| Down+Left / Down+Right (press both together) | previous / next chapter | — |
-| Up | volume up | stop (saves a bookmark) |
-| Down | volume down | volume down, repeating |
-| Up+Left | main menu (works on every screen) | — |
-
-- **Previous chapter** restarts the current chapter, or goes to the one
- before if you're in the first 3 s of it.
-- **Next chapter** in the last chapter beeps instead of starting another
- book.
-
-In menus and lists: Up/Down move, Right or Centre selects, Left goes back,
-and Up+Left goes to the main menu.
-
-These are only defaults, changed under Settings → Playback Settings:
-- Skip Length 30 s
-- Prevent Track Skipping on
-- rewind on resume 5 s and on unpause 2 s
-- bookmarks created and loaded automatically
-- Start Screen "Resume Playback"
-
-## Installing
-
-You need:
-
-- A YP3, charged. The flasher refuses below 3.3 V.
-- A **microSD card, SDHC or SDXC** (4 GB or more; old ≤2 GB SD 1.x cards
- fail), **formatted FAT32 with an MBR partition table.** Rockbox can't read
- exFAT, which most 64 GB+ cards come with.
-- A data USB cable, and a Linux x86-64 computer with udisks2
- (`udisksctl`). For Windows or macOS, use the rockslop GUI instead (below)
- with **USE A FILE** and the same package.
-
-### 1. Get rockslop
-
-rockslop is the flasher: it backs up the player, writes the firmware, and
-copies Rockbox's files to the card. Its source and releases are at
-https://github.com/jaydens-tasty-slop/rockslop (site:
-https://rockslop.jayd.ml).
-
-This firmware was flashed and tested with the command-line version
-**`20261122_011647-8715cfc`**. Download that one into `tools/` (ignored by
-git) and check it:
+**1. Get [rockslop](https://github.com/jaydens-tasty-slop/rockslop)** (the flasher) and allow it USB access:
```sh
mkdir -p tools
-curl -fL -o tools/rockslop-cli \
- https://github.com/jaydens-tasty-slop/rockslop/releases/download/20261122_011647-8715cfc/rockslop-cli-linux-x86_64
-echo "60a138210817bdfa25383d8bbaaa3b6a625740fe696561887385d3cb7e17fb36 tools/rockslop-cli" | sha256sum -c
+curl -fL -o tools/rockslop-cli https://github.com/jaydens-tasty-slop/rockslop/releases/download/20261122_011647-8715cfc/rockslop-cli-linux-x86_64
chmod +x tools/rockslop-cli
-tools/rockslop-cli --version # rockslop-cli 20261122_011647-8715cfc
-```
-
-- **Newer rockslop releases** should work too: rockslop refuses a package
- in a format it can't read, and says so.
-- **If that release is gone,** build the CLI from source at commit
- `8715cfc99d392de62dd30ce06dc9703098e22c0f` (Rust plus the ALSA headers;
- see rockslop's README): `cargo build --release`, which gives
- `target/release/rockslop-cli`.
-- **Windows and macOS:** use the GUI (`rockslop.exe` / `Rockslop.app`) from
- the same [releases page](https://github.com/jaydens-tasty-slop/rockslop/releases).
- Pick **USE A FILE** and choose this repository's package. The steps on the
- player are the same.
-
-### 2. One-time computer setup
-
-Let your user reach the player over USB without root, with rockslop's udev
-rule:
-
-```sh
-sudo tee /etc/udev/rules.d/70-rockslop.rules >/dev/null <<'EOF'
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="301a", ATTR{idProduct}=="2800", MODE="0660", TAG+="uaccess"
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="301a", ATTR{idProduct}=="2801", MODE="0660", TAG+="uaccess"
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="10d6", ATTR{idProduct}=="10d6", MODE="0660", TAG+="uaccess"
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="10d6", ATTR{idProduct}=="b00b", MODE="0660", TAG+="uaccess"
-EOF
+sudo curl -fL -o /etc/udev/rules.d/70-rockslop.rules https://raw.githubusercontent.com/jaydens-tasty-slop/rockslop/8715cfc99d392de62dd30ce06dc9703098e22c0f/packaging/udev/70-rockslop.rules
sudo udevadm control --reload
```
-That is rockslop's `packaging/udev/70-rockslop.rules`. Reconnect the player
-afterwards if it was plugged in. Then check the firmware package:
-
-```sh
-(cd release && sha256sum -c *.sha256) # must say OK
-tools/rockslop-cli check release/rockbox-yp3-audiobook-1.0.tar.xz
-```
-
-### 3. Prepare the card
+**2. Put the microSD card in the player.**
-Format the card FAT32 **before** flashing (this erases it), in a card reader
-or later through the player. Replace `/dev/sdX` with the card after checking
-`lsblk`:
-
-```sh
-lsblk -o NAME,SIZE,MODEL # find the card; be sure
-sudo wipefs -a /dev/sdX
-sudo parted -s /dev/sdX mklabel msdos mkpart primary fat32 1MiB 100%
-sudo mkfs.vfat -F 32 -n AUDIOBOOKS /dev/sdX1
-```
-
-Then put the card **in the player**.
-
-### 4. Flash
+**3. Flash:**
```sh
tools/rockslop-cli flash release/rockbox-yp3-audiobook-1.0.tar.xz
```
-1. The first time on a computer, it shows a waiver. Type `NO BACKSIES`.
-2. When it prints `waiting for the YP3`, put the player in **download mode**:
- 1. Unplug the USB cable.
- 2. Power the player off: hold Centre until it goes off. It won't power
- off while plugged in.
- 3. **Hold Down**, plug in the USB cable, and release Down when the
- terminal prints `YP3 found in download mode`. The screen may stay
- dark; that's normal.
- 4. If it isn't found, unplug, then hold Down and tap **RESET** on the
- right side. You can also run `tools/rockslop-cli status`.
-3. Answer `y` to `Back up and flash YP3 ...?`.
-4. Wait for `done: unplug the player`. It runs through these stages by
- itself:
- 1. Backs up the whole flash, to `~/.local/share/rockslop/backups/`.
- 2. Writes and checks the firmware.
- 3. Reboots into Rockbox.
- 4. Copies about 105 MB (1,835 files) to the card and reads it all back.
-
- The card copy is slow: the player's USB runs at about 0.5–1 MB/s and
- most of the files are small. The progress bar can sit at 0% for minutes
- while files are still being written.
-5. Unplug. Rockbox is running.
-
-**Keep the stock backup safe.** Copy
-`~/.local/share/rockslop/backups/yp3-*-stock.bin` and its `.sha256`
-somewhere other than this computer. (Don't commit it to a public
-repository: it's the maker's firmware.) The flash also leaves a copy on
-the card, at `.rockbox/yp3-*-stock.bin`.
-
-## Adding audiobooks
-
-Put `.m4b` files anywhere on the card except `.rockbox/`. Each book can have
-its own folder, or several can share one. Then pick a book from **Files** on
-the player.
-
-- **Card reader (recommended):** fast.
-- **Through the player:** with Rockbox running, plug it in and it appears as
- a USB disk. This runs at about 0.5–1 MB/s, so a 500 MB book takes around
- 10 minutes. If no disk appears, set Settings → General Settings → System →
- USB → USB Mode to **Mass Storage**.
-
-Book title, author and chapter names come from the file's tags. For
-chapters, `.m4b` files made by most tools work (ffmpeg, iTunes, Audible
-converters, m4b-tool).
-
-## Power on and off
-
-- **Power on:** on battery, hold Centre **about 3–4 s**, until the Rockbox
- logo appears. Release earlier and power drops again.
-- **Power off:** hold Centre 3 s in Rockbox. The position is saved.
-- With USB plugged in, the player doesn't power off; it restarts.
-
-## Troubleshooting
-
-| Symptom | Cause and fix |
-|---|---|
-| `ATA error: -5`, then the screen goes dark | **No card** in the player, a card not clicked in fully, or an old SD 1.x card. Insert a working SDHC/SDXC card. Nothing needs reflashing. |
-| Flash ends with `E502: could not mount the player's card: ... not a mountable filesystem` | The card has no FAT32 partition (blank or exFAT). Leave the player plugged in on its USB screen, format the card as in [Prepare the card](#3-prepare-the-card) (it shows up as "Rockbox Internal Storage"), then run `tools/rockslop-cli sync release/rockbox-yp3-audiobook-1.0.tar.xz`. |
-| Sync seems stuck at 0% | It isn't. Many small files over slow USB; watch the card fill with `du -sh /run/media/$USER/*`. Allow about 5–10 minutes. |
-| Won't power on, or only a **pure white screen** that ignores every button; plugged in without holding anything, `status` says `download mode` | The power chip still has its one-shot "boot to download mode" flag set, which can happen after flashing or an unclean power-off. Rerun the `flash` command with the player in download mode: it writes nothing if the firmware matches, and reboots into Rockbox properly. Then power off **from Rockbox** (hold Centre 3 s). Holding Centre about 10 s (the power chip's own reset) can also clear it. |
-| `NO USB DISK from Rockbox` | Settings → General Settings → System → USB → USB Mode → **Mass Storage**, or unplug, hold any key, and plug in again. |
-| Only the card step failed | The firmware is installed. With Rockbox running and plugged in: `tools/rockslop-cli sync release/rockbox-yp3-audiobook-1.0.tar.xz` |
-| The new defaults don't apply | Settings saved by an earlier Rockbox on the card win. Use Settings → General Settings → Reset Settings, or set them by hand. |
-
-The flasher logs to `~/.local/share/rockslop/rockslop.log`, and every
-rockslop error code is explained in its
-[ERRORS.md](https://github.com/jaydens-tasty-slop/rockslop/blob/8715cfc99d392de62dd30ce06dc9703098e22c0f/ERRORS.md).
-
-## Updating, and going back to stock
-
-- **Reflash or update:** flash the new package the same way. Only sectors
- that differ are written, and only card files that differ are copied.
-- **Stock firmware:** put the player in download mode and run
- `tools/rockslop-cli restore yp3`. It uses the newest stock
- backup on this computer, or on the card, or the image you name:
- `restore yp3 path/to/yp3-...-stock.bin`.
-- **The upstream YP3 port without these patches, for comparison:**
- `tools/rockslop-cli flash yp3`. This downloads its latest
- release from GitHub.
-
-## Known issues
-
-- **Volume steps are tiny.** Each tap of Up/Down changes the volume by
- 0.5 dB (142 steps from silent to full), which is hard to hear. Holding
- Down repeats, but holding Up is Stop. The same is true of the upstream
- port.
-- At most **255 chapters** per file are kept. The last one then runs to the
- end of the book.
-- Chapters in **MP3** audiobooks (ID3 `CHAP` frames) are not read. MP3
- books split into one file per chapter work as chapters.
-- Elapsed and remaining times are for the whole file, not the chapter.
-- When a book ends, playback carries on into the next file in its folder.
-- Files over 4 GB (MP4 `co64`) are not supported.
-
-## Building from source
-
-`scripts/build.sh` rebuilds the package from the files in this repository:
-1. Unpacks the upstream source snapshot.
-2. Applies `patches/`.
-3. Runs the upstream release script, with the vendored theme assets and
- rockslop's packager, `packaging/mkpkg.py`.
-
-It downloads two things:
-- **The Arm GNU toolchain** (gcc-arm-none-eabi 10.3-2021.10, about 150 MB),
- checked against its pinned sha256 and cached in `~/.cache/yp3-audiobook`
- (or `$YP3_CACHE`).
-- **rockslop's source** at the pinned commit, `git clone`d for `mkpkg.py`.
- To use a copy you already have instead, set
- `MKPKG=/path/to/rockslop/packaging/mkpkg.py`.
-
-```sh
-# Arch: base-devel git perl python curl bzip2 xz zip
-# Debian/Ubuntu: build-essential git perl python3 curl bzip2 xz-utils zip
-scripts/build.sh audiobook-1.1
-tools/rockslop-cli check build/out/rockbox-yp3-audiobook-1.1.tar.xz
-```
-
-It takes about 5–10 minutes. A handful of big game plugins never fit and are
-skipped; the script lists them. Clone the repository to a **short path**:
-the upstream build fails with "Argument list too long" from deep
-directories, and the script refuses paths it knows are too long.
-
-The script works in `build/` (ignored by git, safe to delete): the patched
-source is `build/rockbox`, and the package lands in `build/out/`.
-
-To change the firmware, edit `build/rockbox` (a git repository with the
-patches as commits), commit, then regenerate the patches:
-
-```sh
-rm patches/*.patch
-git -C build/rockbox format-patch -o "$PWD/patches" "$(git -C build/rockbox rev-list --max-parents=0 HEAD)"..
-```
-
-**Chapter reader tests** run on the computer (gcc and ffmpeg). They build
-`apps/chapters.c` with AddressSanitizer and test it against generated
-audiobooks:
+When it says `waiting for the YP3`: unplug the player, power it off (hold Center),
+then **hold Down while plugging in USB**. Let go when it's found, answer `y`, and wait
+for `done: unplug the player`. Copying files to the card is slow, so give it 5–10 minutes.
-```sh
-tests/chapters/run.sh # after scripts/build.sh, or: run.sh path/to/patched/tree
-```
-
-**Releasing a new version:** build in a container, so the package has no
-paths from your computer in it. The compiler records the build directory
-in some game plugins and in the debug map. Mounted at `/src`, the paths
-are the same for everyone:
-
-```sh
-podman run --rm -v "$PWD":/src:z -v "$HOME/.cache/yp3-audiobook":/cache:z \
- -e YP3_CACHE=/cache -w /src docker.io/library/debian:bookworm sh -c '
- apt-get update && apt-get install -y --no-install-recommends \
- build-essential git perl python3 curl bzip2 xz-utils zip ca-certificates &&
- git config --global --add safe.directory "*" &&
- scripts/build.sh audiobook-X.Y'
-```
-
-(`docker` works the same way. Create `~/.cache/yp3-audiobook` first.) Then:
-
-1. Test it on a player.
-2. Copy the package to `release/` as `rockbox-yp3-audiobook-X.Y.tar.xz` and
- write its checksum: `(cd release && sha256sum rockbox-yp3-audiobook-X.Y.tar.xz > rockbox-yp3-audiobook-X.Y.tar.xz.sha256)`.
-3. Commit and tag `vX.Y`.
-
-Remove old packages from `release/` if you like; they stay in git history.
-
-## Repository layout
-
-```
-release/ tested firmware packages for rockslop, with .sha256
-tools/ (not in git) where you download rockslop-cli
-patches/ the audiobook changes, against upstream 822b9f5e
-scripts/ build.sh
-tests/ chapters/: host tests of the M4B chapter reader
-vendor/ source snapshots and assets the build uses (SHA256SUMS):
- rockbox-822b9f5e.tar.xz upstream YP3 Rockbox source
- yp3-assets-1.tar.xz themes and models upstream adds
-LICENSE GNU GPL v2
-```
+**4. Add books:** copy `.m4b` files to the card with a card reader, or plug in the
+player while it's running. **Power off before removing the card.** Pulling it while
+the player is on can crash it.
-## Versions and sources
+## If something goes wrong
-| Part | Version | Upstream |
-|---|---|---|
-| Firmware package `release/rockbox-yp3-audiobook-1.0.tar.xz` | `audiobook-1.0`; the boot screen shows `0e6e29726d-261125` | upstream + `patches/`, built in a container (see [Building from source](#building-from-source)) |
-| YP3 Rockbox port | commit `822b9f5e999122bc25738fc9746bb7a17bb48fa6` (2026-11-21) | https://github.com/jaydens-tasty-slop/rockbox |
-| rockslop (flasher; `mkpkg.py` for builds) | CLI release `20261122_011647-8715cfc`, commit `8715cfc99d392de62dd30ce06dc9703098e22c0f`, Linux CLI sha256 `60a13821…17fb36` | https://github.com/jaydens-tasty-slop/rockslop ([site](https://rockslop.jayd.ml)) |
-| Theme/model assets | `yp3-assets-1` | rockbox repo release `yp3-assets-1` |
-| Toolchain | gcc-arm-none-eabi 10.3-2021.10, sha256 `97dbb4f0…16c9a3` | developer.arm.com |
+- **`ATA error: -5`:** no SD card in the player.
+- **`could not mount the player's card`:** format the card FAT32, then run
+ `tools/rockslop-cli sync release/rockbox-yp3-audiobook-1.0.tar.xz` with Rockbox running.
+- **White screen, or it boots into download mode:** run the flash command again
+ (step 3). It reboots the player properly.
+- **Back to stock:** put the player in download mode and run `tools/rockslop-cli restore yp3`.
-Building with `scripts/build.sh` gives the same firmware as `release/`,
-anywhere. Only the paths recorded in some game plugins and in the debug
-map differ, unless it is built in the container as above.
+## Building
-## Licences and credits
+`scripts/build.sh` rebuilds the package from the upstream source in `vendor/`
+plus the changes in `patches/`. Output goes to `build/out/`.
-- **Rockbox and the YP3 port:** GNU GPL v2 or later (`LICENSE`). Plugins,
- themes and fonts carry their own licences, which are installed on the card
- in `.rockbox/licenses/`.
-- **rockslop** (not included; linked above): GPL-2.0-or-later.
-- **The audiobook patches** (`patches/`) are under the same licence as
- Rockbox.
+## License
-Credit goes to the Rockbox project, the YP3 port and rockslop by
-jaydens-tasty-slop, and the authors listed in their CREDITS files.
+GPL v2 or later, like Rockbox. See `LICENSE`.