diff --git a/GUIDE.md b/GUIDE.md index 0ec1df3..b835357 100644 --- a/GUIDE.md +++ b/GUIDE.md @@ -1,6 +1,6 @@

SLOOP

-# SLOOP 2.8.4 — The Complete Guide +# SLOOP 2.8.5 — The Complete Guide Everything SLOOP does, every button, every combination, every page, in one place. This guide is written to be read from the top the first time, then used as a reference: the [cheat sheet](#26-cheat-sheet) at the end has every combination on one page. diff --git a/README.md b/README.md index 209004d..b43504f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Free and open source (GPL-3.0), based on SLOOP

-# SLOOP 2.8.4 +# SLOOP 2.8.5 **A live groovebox firmware for the M-VAVE FM-1 — for any style.** Four tracks — three synths and a drum machine with 16 sounds on the white keys — twelve synthesis engines (six-operator FM with DX7 patches, and now physical models and noise), 153 sounds, 37 drum kits (808, 909, trap, phonk, house, techno, UK garage, jungle, amapiano, reggaeton, synthwave, chiptune, ambient, jazz…), your own samples, ghost notes and ratchets, parameter locks, micro timing and fills, note repeat, one-key chords, 27 punch-in effects, a vinyl / sidechain / DJ-filter master, and a teenage-engineering-style screen that always shows what your hands can do next. No factory patterns, nothing to load: everything you hear, you play. SLOOP is free and open source (GPL-3.0), based on [Felucca](https://github.com/hugelton/Felucca) by Leo Kuroshita / Hügelton Instruments. -> **Status:** 2.8.4, running on the FM-1. Still a beta: install at your own risk, and please report what you find (GitHub issues). +> **Status:** 2.8.5, running on the FM-1. Still a beta: install at your own risk, and please report what you find (GitHub issues). +> **2.8.5:** FM-1 units with the newer UC25HQ80 flash chip (sold from late 2026, mostly on AliExpress) were taken for an unknown chip: projects stayed in RAM ("flash error") and the update loader refused to install. Both chips are known now. +> > **2.8.4:** a bug-fix release. no more distortion at the end of notes, 3.5 mm and USB; UNISON no longer stacks its voices in phase; PHYS strings in tune; NZ ARCADE, SAMPLE and GRAIN follow the top keys; a firm press on a layer button opens its pages; on REC READY a knob changes only its own value; the way back to the official firmware with V16. > **2.8.3:** hold a note under others. On a POLY track, a note you hold while you play others over it keeps sounding while you record and when you play it back, in a free take too (it used to restart and cut out), it goes on through steps that already have notes when you overdub, and in SEQ → NOTES its LEN now runs on under the notes after it (a long bass under a melody) instead of stopping at *NOTE AHEAD*. On a MONO or LEGATO sound (track 1's 808 BOOM), the screen says *MONO: SET VOICE POLY*. MIDI in: a burst too fast to keep no longer leaves a note stuck. A quick tap on a button no longer flashes its layer page: a layer shows after 0.35 s held (0.14 s before), or at once when you use a key or knob. Drums: on a busy beat the kick (and the other hits) no longer drop out: a drum sound hit again takes its own voice before another's, and the kick is taken last. Samples (SAMPLE, SLICE): a sample played again on a voice still sounding (the same chop again on POLY, every note on MONO, LEGATO or UNISON) now starts from silence with its ATK; it used to start at the level the voice had, with a click, and ATK did nothing. The second core: on some FM-1s it can misread a word under heavy USB traffic (a backup over USB); it now checks every job before running it and refuses a wrong one, and SLOOP goes on with one core until the next power-off instead of crashing (a fault on the second core used to leave the crash screen until a power cycle). diff --git a/build-sloop.ps1 b/build-sloop.ps1 index 2d438d1..6d38f29 100644 --- a/build-sloop.ps1 +++ b/build-sloop.ps1 @@ -1,17 +1,17 @@ -# SLOOP 2.8.4: build the firmware, then open the browser installer. +# SLOOP 2.8.5: build the firmware, then open the browser installer. # Uses the dependencies already prepared (WSL MinUI-Build, JieLi toolchain, SDK files in build/deps/ac79). # SLICE stays out (FELUCCA_SLICE=0): with its built-in BREAK the image does not fit the app slot. $ErrorActionPreference = 'Stop' Set-Location $PSScriptRoot Write-Host "" -Write-Host " S L O O P 2.8.4" -ForegroundColor White +Write-Host " S L O O P 2.8.5" -ForegroundColor White Write-Host " ---- ---- ---- ----" -ForegroundColor DarkGray Write-Host "== Building the firmware (WSL MinUI-Build)" -ForegroundColor Cyan Remove-Item Env:FELUCCA_SLICE -ErrorAction SilentlyContinue python tools/build_windows.py --distro MinUI-Build --toolchain /root/fm1-codex-deps/jieli/toolchain --sdk build/deps/ac79 --slice 0 if ($LASTEXITCODE -ne 0) { throw "The build failed" } Write-Host "== Making the installer site" -ForegroundColor Cyan -python web/make_site.py build/felucca.fwsc 2.8.4 build/sloop-site +python web/make_site.py build/felucca.fwsc 2.8.5 build/sloop-site if ($LASTEXITCODE -ne 0) { throw "make_site failed" } Write-Host "" Write-Host "Installer: http://localhost:8766/webapp/installer/ (Chrome or Edge, FM-1 on USB)" -ForegroundColor Green diff --git a/docs/firmware/sloop-2.8.4.fwsc b/docs/firmware/sloop-2.8.4.fwsc deleted file mode 100644 index 7ec315a..0000000 Binary files a/docs/firmware/sloop-2.8.4.fwsc and /dev/null differ diff --git a/docs/firmware/sloop-2.8.5.fwsc b/docs/firmware/sloop-2.8.5.fwsc new file mode 100644 index 0000000..9e198df Binary files /dev/null and b/docs/firmware/sloop-2.8.5.fwsc differ diff --git a/docs/webapp/editor/index.html b/docs/webapp/editor/index.html index ad04948..328e246 100644 --- a/docs/webapp/editor/index.html +++ b/docs/webapp/editor/index.html @@ -890,7 +890,7 @@
- + diff --git a/docs/webapp/installer/index.html b/docs/webapp/installer/index.html index 0379126..d8e1ef1 100644 --- a/docs/webapp/installer/index.html +++ b/docs/webapp/installer/index.html @@ -90,7 +90,7 @@


   
-  

+


@@ -536,7 +536,7 @@ const sayK = (k, arg = "") => { lastKey = k; lastArg = arg; $("status").textCont const say = (txt) => { lastKey = null; $("status").textContent = txt; }; const log = (t) => { $("log").textContent += t + "\n"; }; let image = null; -const meta = {"version": "2.8.4", "product": "FM-1_900", "pkg": "../../firmware/sloop-2.8.4.fwsc", "sha256": "5a6a0843c868650dba6718cf85e43e719aec18c3dc5cc803c57c38b382158d4e"}; +const meta = {"version": "2.8.5", "product": "FM-1_900", "pkg": "../../firmware/sloop-2.8.5.fwsc", "sha256": "b0446effb840740a3aa5c386ce004e79334e4f833d48d82a9eb5edbfde92ae67"}; let writing = false; const lockAll = (on) => { diff --git a/docs/webapp/sw.js b/docs/webapp/sw.js index 0736350..9ac041c 100644 --- a/docs/webapp/sw.js +++ b/docs/webapp/sw.js @@ -4,9 +4,9 @@ // https, so Web MIDI asks as usual (a downloaded file on Android opens as content://, where Chrome refuses MIDI). // Online the network always wins (the page as published, never an old one); the copy is only the fallback. // A new site (any file changed) is a new sw.js: the new copy replaces the old one. -const STAMP = "2.8.4-e184aa2f1c74"; // version + a hash of the files +const STAMP = "2.8.5-a3a06f53523b"; // version + a hash of the files const CACHE = "sloop-site-" + STAMP; -const FILES = ["../firmware/sloop-2.8.4.fwsc", "editor/", "editor/FUKIAI-LICENSE.txt", "editor/fukiai.ttf", "editor/preview-worklet.js", "editor/preview.js", "editor/sloop-preview.wasm", "icon-192.png", "icon-512.png", "icon-maskable-512.png", "installer/", "sloop.webmanifest"]; // relative to this file +const FILES = ["../firmware/sloop-2.8.5.fwsc", "editor/", "editor/FUKIAI-LICENSE.txt", "editor/fukiai.ttf", "editor/preview-worklet.js", "editor/preview.js", "editor/sloop-preview.wasm", "icon-192.png", "icon-512.png", "icon-maskable-512.png", "installer/", "sloop.webmanifest"]; // relative to this file const KEEP = new Set(FILES.map((f) => new URL(f, self.location).href)); const key = (url) => { // the copy's name of a request: no query, index.html = the folder diff --git a/firmware/hal/fm1_flash.h b/firmware/hal/fm1_flash.h index 8befc33..961cf25 100644 --- a/firmware/hal/fm1_flash.h +++ b/firmware/hal/fm1_flash.h @@ -12,6 +12,7 @@ #pragma once #include #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; diff --git a/firmware/hal/fm1_flash_id.h b/firmware/hal/fm1_flash_id.h new file mode 100644 index 0000000..d2d2e1a --- /dev/null +++ b/firmware/hal/fm1_flash_id.h @@ -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 diff --git a/firmware/loader/loader.c b/firmware/loader/loader.c index ad1ffed..b1c4ea2 100644 --- a/firmware/loader/loader.c +++ b/firmware/loader/loader.c @@ -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" diff --git a/firmware/src/project.c b/firmware/src/project.c index acce904..2a893d7 100644 --- a/firmware/src/project.c +++ b/firmware/src/project.c @@ -790,7 +790,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; diff --git a/firmware/src/recovery.c b/firmware/src/recovery.c index 8337f6a..fd712e9 100644 --- a/firmware/src/recovery.c +++ b/firmware/src/recovery.c @@ -64,7 +64,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, "SLOOP USB RESCUE", C_WHITE, 1); diff --git a/firmware/src/ui.c b/firmware/src/ui.c index 2750f0e..5d33b97 100644 --- a/firmware/src/ui.c +++ b/firmware/src/ui.c @@ -3,7 +3,7 @@ /* Felucca user interface. Four columns map to KNOB 1..4. Rendering is lazy: * every element remembers what it last drew and is redrawn only on change. */ #ifndef FELUCCA_VERSION -#define FELUCCA_VERSION "SLOOP 2.8.4" /* the beat machine firmware for the FM-1 (based on Felucca) */ +#define FELUCCA_VERSION "SLOOP 2.8.5" /* the beat machine firmware for the FM-1 (based on Felucca) */ #endif static void project_save(uint32_t slot); static void arrangement_save(void); diff --git a/tests/recovery_test.c b/tests/recovery_test.c index f981234..f6646a3 100644 --- a/tests/recovery_test.c +++ b/tests/recovery_test.c @@ -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 @@ -99,6 +100,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; }