mirror of
https://github.com/isod89/clipper-fm1.git
synced 2026-12-05 12:24:32 +01:00
Clipper 1.3.1 (FM-1): the newer flash chip. FM-1 units sold from late 2026 (mostly AliExpress) carry a UC25HQ80 flash (JEDEC 0xB36014) instead of the Puya P25Q80 (0x856014), the same size and commands: taken for an unknown chip, nothing was saved (flash error) and the update loader refused to install. The app, the USB rescue and the update loader now know both (firmware/hal/fm1_flash_id.h); the recovery test checks both and refuses any other. Thanks to Sven (The Firmware Hub)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AgC1EFHrYDcX1kyyeDW9sw
This commit is contained in:
11 files changed
+61
-22
No files matched your search
@@ -7,7 +7,7 @@ Free and open source (GPL-3.0). It grew out of <a href="https://github.com/isod8
|
||||
|
||||
---
|
||||
|
||||
> **Status: 1.3.** Clipper runs on the FM-1. 1.3 is a bug-fix release (see [New in 1.3](#new-in-13-a-bug-fix-release)); 1.2 brought SLOOP 2.8.3's fixes (see [New in 1.2](#new-in-12-sloop-283s-fixes-a-steadier-second-core-the-ewi-as-one-voice)). It passes its whole test suite on a computer. There is still a lot to do (see [What is left to do](#what-is-left-to-do)). Install it at your own risk, and keep a backup made with the editor. You can go back to the official firmware (V16 or V15) from the installer page, or to SLOOP with its own `INSTALL-SLOOP.bat`.
|
||||
> **Status: 1.3.1.** Clipper runs on the FM-1. 1.3.1 knows the newer flash chip of the FM-1 units sold recently (see [New in 1.3.1](#new-in-131-the-newer-flash-chip)); 1.3 is a bug-fix release (see [New in 1.3](#new-in-13-a-bug-fix-release)); 1.2 brought SLOOP 2.8.3's fixes (see [New in 1.2](#new-in-12-sloop-283s-fixes-a-steadier-second-core-the-ewi-as-one-voice)). It passes its whole test suite on a computer. There is still a lot to do (see [What is left to do](#what-is-left-to-do)). Install it at your own risk, and keep a backup made with the editor. You can go back to the official firmware (V16 or V15) from the installer page, or to SLOOP with its own `INSTALL-SLOOP.bat`.
|
||||
|
||||
SLOOP is a groovebox. **Clipper is a synthesizer** with 23 engines and 407 sounds, one instrument (two in MULTI) like the original FM-1 firmware, Felucca and Baudgirl's FM-1+VA. It has no tracks, no drum machine, no song mode and no built-in samples. It keeps SLOOP's 12 sound engines, effects, arpeggiator, step sequencer, USB audio and MIDI, and adds **HYBRID**: one voice built from three oscillators, two filters and a modulation matrix, with the whole patch editable in the browser.
|
||||
|
||||
@@ -52,6 +52,10 @@ SLOOP is a groovebox. **Clipper is a synthesizer** with 23 engines and 407 sound
|
||||
|
||||
**The web editor** (Chrome or Edge, nothing to install): every parameter live; a pro step sequencer (tools, generators, velocity lanes, a pattern library); the whole HYBRID and FMX patches; the MOD SEQ's lanes; the tuning and `.scl` files; DX7 banks; your own wavetables; a sound library, undo / compare / A-B / randomize tools; backups of the whole FM-1.
|
||||
|
||||
## New in 1.3.1: the newer flash chip
|
||||
|
||||
FM-1 units sold recently (mostly on AliExpress) carry a UC25HQ80 flash chip (JEDEC ID 0xB36014) instead of the Puya P25Q80 (0x856014): the same size, the same commands. Clipper only knew the old one, so on these units nothing was saved ("flash error": projects, presets and settings stayed in RAM) and the update loader refused to install. 1.3.1 knows both, in the firmware, the USB rescue and the update loader (`firmware/hal/fm1_flash_id.h`). Nothing else changes. Thanks to Sven (The Firmware Hub) for the heads-up.
|
||||
|
||||
## New in 1.3: a bug-fix release
|
||||
|
||||
A bug-fix release. Thanks to everyone who reported issues on GitHub: every fix below has its own test, and the whole firmware was checked again (the editor's protocol, MIDI in and a damaged flash fuzzed, every engine, sound and key measured).
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
# Clipper 1.3: build the firmware, then open the browser installer.
|
||||
# Clipper 1.3.1: build the firmware, then open the browser installer.
|
||||
# Uses the same tools as SLOOP (WSL MinUI-Build, the JieLi toolchain) and the three AC79 SDK files in
|
||||
# build\deps\ac79 (copied from the SLOOP folder the first time if they are not here yet).
|
||||
# Port 8767 (SLOOP uses 8766): a SLOOP window left open does not get mixed up with this one.
|
||||
@@ -6,7 +6,7 @@ param([string]$Voices = "8")
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-Location $PSScriptRoot
|
||||
Write-Host ""
|
||||
Write-Host " C L I P P E R 1.3 ($Voices voices)" -ForegroundColor White
|
||||
Write-Host " C L I P P E R 1.3.1 ($Voices voices)" -ForegroundColor White
|
||||
Write-Host " ---- ---- ---- ----" -ForegroundColor DarkGray
|
||||
if ($Voices -notin @("8", "12", "16")) { throw "Voices: 8, 12 or 16" }
|
||||
$sdk = "build\deps\ac79"
|
||||
@@ -29,7 +29,7 @@ Remove-Item Env:FELUCCA_SLICE -ErrorAction SilentlyContinue
|
||||
python tools/build_windows.py --distro MinUI-Build --toolchain /root/fm1-codex-deps/jieli/toolchain --sdk $sdk --slice 0 --nvoice $Voices
|
||||
if ($LASTEXITCODE -ne 0) { throw "The build failed" }
|
||||
Write-Host "== Making the installer site" -ForegroundColor Cyan
|
||||
python web/make_site.py build/felucca.fwsc 1.3 build/clipper-site
|
||||
python web/make_site.py build/felucca.fwsc 1.3.1 build/clipper-site
|
||||
if ($LASTEXITCODE -ne 0) { throw "make_site failed" }
|
||||
Write-Host ""
|
||||
Write-Host "Installer: http://localhost:8767/webapp/installer/ (Chrome or Edge, FM-1 on USB)" -ForegroundColor Green
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
## Clipper 1.3.1: FM-1 units with the newer flash chip
|
||||
|
||||
FM-1 units sold recently (mostly on AliExpress) carry a different flash chip, the UC25HQ80 (JEDEC ID 0xB36014), instead of the Puya P25Q80 (0x856014). It has the same size (1 MiB) and the same commands, but Clipper only knew the old one, so on these units:
|
||||
- projects, presets and settings were not saved (the screen said "flash error": everything stayed in RAM until power-off);
|
||||
- the update loader refused to install a new version.
|
||||
|
||||
Clipper 1.3.1 knows both chips: in the firmware, in the USB rescue and in the update loader. Nothing else changes.
|
||||
|
||||
If you have one of these units and already installed an older Clipper, its update loader does not know the chip and will refuse 1.3.1 too: go back to the official firmware first (the installer page's *Return to the official firmware*, or M-VAVE's M-UPGRADE with FM-1 V16), then install 1.3.1. From 1.3.1 on, updates install normally.
|
||||
|
||||
Thanks to Sven (The Firmware Hub) for the heads-up.
|
||||
|
||||
**Compatibility:** projects, presets, samples and settings are kept; the project format is unchanged.
|
||||
|
||||
Install from the browser: https://isod89.github.io/clipper-fm1/webapp/installer/ (Chrome or Edge, the FM-1 on USB).
|
||||
@@ -12,6 +12,7 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include "fm1_xip.h"
|
||||
#include "fm1_flash_id.h" /* FL_JEDEC_OK: the flash parts the FM-1 ships with */
|
||||
|
||||
#define RAMFN __attribute__((section(".ram_text"), noinline, used))
|
||||
#define RAMINL static inline __attribute__((always_inline))
|
||||
@@ -148,7 +149,7 @@ RAMINL int fl_wait_ready(uint32_t max_us, uint32_t *took_us)
|
||||
|
||||
/* ---- entry points: IRQs OFF, args/buffers in RAM ---- */
|
||||
|
||||
static RAMFN uint32_t fl_jedec_ram(void) /* expect 0x856014 */
|
||||
static RAMFN uint32_t fl_jedec_ram(void) /* FL_JEDEC_OK (fm1_flash_id.h) */
|
||||
{
|
||||
fl_saved_t s; uint32_t id;
|
||||
if (fl_enter(&s)) return 0;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0-only */
|
||||
/* The FM-1's flash parts: the JEDEC ids (0x9F) the firmware knows. Same size (1 MiB), the same plain SPI NOR commands
|
||||
* (0x03/0x0B read, 0x02 program, 0x20 4 KiB erase, 0x05/0x35 status, 0x06 write enable).
|
||||
* 0x856014 Puya P25Q80, the FM-1 as first sold
|
||||
* 0xB36014 UC25HQ80, FM-1 units sold from late 2026 (mostly AliExpress)
|
||||
* Any other id: the flash is left alone (saves stay in RAM, the update loader refuses). */
|
||||
#pragma once
|
||||
#ifndef FL_JEDEC_OK
|
||||
#define FL_JEDEC_OK(id) ((id) == 0x856014u || (id) == 0xB36014u)
|
||||
#endif
|
||||
@@ -71,7 +71,7 @@ static void ldr_record_clear(void)
|
||||
{
|
||||
fm1_updata_parm_clear(); /* CRC 0: the SPL ignores it on a warm reset */
|
||||
}
|
||||
static int ldr_flash_known(void) { return fl_jedec_ram() == 0x856014u; } /* as the app (project.c) */
|
||||
static int ldr_flash_known(void) { return FL_JEDEC_OK(fl_jedec_ram()); } /* as the app (project.c) */
|
||||
static void ldr_progress(uint32_t done, uint32_t total) { (void)done; (void)total; ldr_poll(); }
|
||||
#include "ldr_core.c"
|
||||
|
||||
|
||||
@@ -1097,7 +1097,7 @@ UI_SMALL static void persist_boot(void) /* before settings_in
|
||||
#if FELUCCA_FLASH
|
||||
persist_t p;
|
||||
uint32_t f = irq_save();
|
||||
flash_ok = FL_FAR(fl_jedec_ram)() == 0x856014u; /* the expected 1 MiB part, else stay RAM-only */
|
||||
flash_ok = FL_JEDEC_OK(FL_FAR(fl_jedec_ram)()); /* a known 1 MiB part (fm1_flash_id.h), else stay RAM-only */
|
||||
irq_restore(f);
|
||||
if (!flash_ok)
|
||||
return;
|
||||
|
||||
@@ -56,7 +56,7 @@ static void recovery_main(void)
|
||||
recovery_last = recovery_usb_last = fm1_ticks();
|
||||
recovery_fraction = fm1_ms = 0;
|
||||
/* No persist_boot or OTA cleanup: no flash write just for entering rescue. */
|
||||
flash_ok = FL_FAR(fl_jedec_ram)() == 0x856014u;
|
||||
flash_ok = FL_JEDEC_OK(FL_FAR(fl_jedec_ram)());
|
||||
lcd_init();
|
||||
lcd_fill(0, 0, 240, 240, C_BLACK);
|
||||
draw_text_box(0, 64, 240, &FONT_S, "CLIPPER USB RESCUE", C_WHITE, 1);
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#define UI_SMALL /* (gfx.c: minsize on the device; a test alone: nothing) */
|
||||
#endif
|
||||
#ifndef FELUCCA_VERSION
|
||||
#define FELUCCA_VERSION "CLIPPER 1.3" /* the synthesizer firmware for the FM-1 (from SLOOP 2.5, based on Felucca) */
|
||||
#define FELUCCA_VERSION "CLIPPER 1.3.1" /* the synthesizer firmware for the FM-1 (from SLOOP 2.5, based on Felucca) */
|
||||
#endif
|
||||
static void project_save(uint32_t slot);
|
||||
static void arrangement_save(void);
|
||||
|
||||
+10
-1
@@ -16,6 +16,7 @@ static uint32_t input_buttons, stop_at_retry;
|
||||
static jmp_buf exit_loop;
|
||||
#define FM1_TICKS_PER_US 24u
|
||||
#define FL_FAR(x) x
|
||||
#include "../firmware/hal/fm1_flash_id.h"
|
||||
#define C_BLACK 0
|
||||
#define C_WHITE 65535
|
||||
#define FONT_S font
|
||||
@@ -96,6 +97,14 @@ int main(void)
|
||||
assert(jedec_reads == 1 && lcd_calls == 1);
|
||||
assert(services == 7 && sessions == 2); /* idle startup starts no update */
|
||||
assert(bootguard_begin(&bootguard) == BOOT_ROM);
|
||||
puts("recovery: boot failures, manual key, timer wrap, polled USB during OTA, retry, flash refusal and ROM fallback passed");
|
||||
/* the flash parts: the Puya P25Q80 and the UC25HQ80 known, anything else not (and recovery_main reads it) */
|
||||
assert(FL_JEDEC_OK(0x856014u) && FL_JEDEC_OK(0xB36014u) && !FL_JEDEC_OK(0xEF4014u) && !FL_JEDEC_OK(0u) && !FL_JEDEC_OK(0xFFFFFFu));
|
||||
jedec = 0xB36014u; flash_ok = 0; recovery_active = 0; retries = 0; stop_at_retry = 3;
|
||||
if (!setjmp(exit_loop)) recovery_main();
|
||||
assert(flash_ok);
|
||||
jedec = 0xEF4014u; flash_ok = 1; retries = 0; stop_at_retry = 3;
|
||||
if (!setjmp(exit_loop)) recovery_main();
|
||||
assert(!flash_ok);
|
||||
puts("recovery: boot failures, manual key, timer wrap, polled USB during OTA, retry, flash refusal and ROM fallback, the UC25HQ80 flash known passed");
|
||||
return 0;
|
||||
}
|
||||
+12
-12
@@ -1,18 +1,18 @@
|
||||
# Clipper: publish the release on GitHub, from this folder (PUBLISH-GITHUB.bat).
|
||||
# 1. the source: clipper-1.3.bundle -> the repository OWNER/REPO (created if it does not exist), branch main, the tag
|
||||
# 2. the release v1.3 (the latest): docs/release-1.3.md, the firmware package (if INSTALL-CLIPPER.bat built it),
|
||||
# 1. the source: clipper-1.3.1.bundle -> the repository OWNER/REPO (created if it does not exist), branch main, the tag
|
||||
# 2. the release v1.3.1 (the latest): docs/release-1.3.1.md, the firmware package (if INSTALL-CLIPPER.bat built it),
|
||||
# the demo WAV
|
||||
# 3. the installer and the editor on GitHub Pages (branch gh-pages, from build\clipper-site)
|
||||
# Uses your own Git and GitHub CLI (gh) and your own GitHub login. Nothing is ever forced on main: a repository that
|
||||
# already has another history stops the script. gh-pages is generated: it is replaced each time.
|
||||
param([string]$Owner = "", [string]$Repo = "clipper-fm1", [string]$Tag = "v1.3")
|
||||
param([string]$Owner = "", [string]$Repo = "clipper-fm1", [string]$Tag = "v1.3.1")
|
||||
$ErrorActionPreference = 'Continue'
|
||||
Set-Location (Split-Path $PSScriptRoot)
|
||||
function Fail([string]$m) { Write-Host ""; Write-Host "ERROR: $m" -ForegroundColor Red; exit 1 }
|
||||
function Step([string]$m) { Write-Host "== $m" -ForegroundColor Cyan }
|
||||
|
||||
Write-Host ""
|
||||
Write-Host " C L I P P E R 1.3 -> GitHub" -ForegroundColor White
|
||||
Write-Host " C L I P P E R 1.3.1 -> GitHub" -ForegroundColor White
|
||||
Write-Host " ---- ---- ---- ----" -ForegroundColor DarkGray
|
||||
# Git and GitHub CLI: on the PATH, else where their installers put them, else installed now with winget (asked first)
|
||||
function Find-Tool([string]$t) {
|
||||
@@ -52,7 +52,7 @@ if (-not $Owner) { $Owner = "$(gh api user --jq .login)".Trim() }
|
||||
if (-not $Owner) { Fail "could not read your GitHub user name" }
|
||||
$full = "$Owner/$Repo"
|
||||
$pages = "https://$Owner.github.io/$Repo"
|
||||
$bundle = "clipper-1.3.bundle"
|
||||
$bundle = "clipper-1.3.1.bundle"
|
||||
if (-not (Test-Path $bundle)) { Fail "$bundle not found in this folder" }
|
||||
$work = Join-Path "build" "publish"
|
||||
$repoDir = Join-Path $work "repo"
|
||||
@@ -82,13 +82,13 @@ if ($LASTEXITCODE -ne 0) {
|
||||
if ("$(git ls-remote --tags origin "refs/tags/$Tag")".Trim()) {
|
||||
Write-Host " (the tag $Tag is already on GitHub: kept as it is)" -ForegroundColor DarkGray
|
||||
} else {
|
||||
git -c user.name="$Owner" -c user.email="$email" tag -a $Tag -m "Clipper 1.3"
|
||||
git -c user.name="$Owner" -c user.email="$email" tag -a $Tag -m "Clipper 1.3.1"
|
||||
git push origin $Tag
|
||||
if ($LASTEXITCODE -ne 0) { Pop-Location; Fail "pushing the tag $Tag" }
|
||||
}
|
||||
$notes = Join-Path (Resolve-Path "..").Path "release-notes.md"
|
||||
$src = Join-Path "docs" "release-1.3.md"
|
||||
if (-not (Test-Path $src)) { Pop-Location; Fail "docs/release-1.3.md is missing from the bundle (an older bundle?)" }
|
||||
$src = Join-Path "docs" "release-1.3.1.md"
|
||||
if (-not (Test-Path $src)) { Pop-Location; Fail "docs/release-1.3.1.md is missing from the bundle (an older bundle?)" }
|
||||
$text = (Get-Content -Raw -Encoding UTF8 $src).Replace("https://isod89.github.io/clipper-fm1", $pages).Replace("isod89/clipper-fm1", $full)
|
||||
[IO.File]::WriteAllText($notes, $text, (New-Object Text.UTF8Encoding $false)) # (no BOM: GitHub shows the text as it is)
|
||||
Pop-Location
|
||||
@@ -100,16 +100,16 @@ $fw = Get-ChildItem (Join-Path (Join-Path $site "firmware") "clipper-*.fwsc") -E
|
||||
if ($fw) { $assets += $fw.FullName }
|
||||
else { Write-Host "(No firmware built: run INSTALL-CLIPPER.bat first. The release is published without the .fwsc; run this script again afterwards to add it.)" -ForegroundColor Yellow }
|
||||
$ed = Join-Path (Join-Path (Join-Path $site "webapp") "editor") "clipper-editor.html" # (1.2) the editor in one file, for offline use
|
||||
if (Test-Path $ed) { $edc = Join-Path $work "clipper-editor-1.3.html"; Copy-Item $ed $edc; $assets += (Resolve-Path $edc).Path }
|
||||
if (Test-Path $ed) { $edc = Join-Path $work "clipper-editor-1.3.1.html"; Copy-Item $ed $edc; $assets += (Resolve-Path $edc).Path }
|
||||
if (Test-Path "clipper-1.0-demo.wav") { $assets += (Resolve-Path "clipper-1.0-demo.wav").Path }
|
||||
gh release view $Tag --repo $full *> $null
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Step "The release $Tag exists: updating its notes and files"
|
||||
gh release edit $Tag --repo $full --prerelease=false --latest --title "Clipper 1.3" --notes-file $notes
|
||||
gh release edit $Tag --repo $full --prerelease=false --latest --title "Clipper 1.3.1" --notes-file $notes
|
||||
if ($assets.Count -gt 0) { gh release upload $Tag @assets --repo $full --clobber }
|
||||
} else {
|
||||
Step "Creating the release $Tag"
|
||||
gh release create $Tag @assets --repo $full --latest --title "Clipper 1.3" --notes-file $notes
|
||||
gh release create $Tag @assets --repo $full --latest --title "Clipper 1.3.1" --notes-file $notes
|
||||
}
|
||||
if ($LASTEXITCODE -ne 0) { Fail "the release $Tag" }
|
||||
|
||||
@@ -124,7 +124,7 @@ if (Test-Path (Join-Path (Join-Path (Join-Path $site "webapp") "installer") "ind
|
||||
git init --quiet
|
||||
git checkout --quiet -b gh-pages
|
||||
git add -A
|
||||
git -c user.name="$Owner" -c user.email="$email" commit --quiet -m "Clipper 1.3: the installer and the editor"
|
||||
git -c user.name="$Owner" -c user.email="$email" commit --quiet -m "Clipper 1.3.1: the installer and the editor"
|
||||
git push --force "https://github.com/$full.git" gh-pages
|
||||
$ok = $LASTEXITCODE -eq 0
|
||||
Pop-Location
|
||||
|
||||
Reference in new issue
Block a user