mirror of
https://github.com/isod89/sloop-fm1.git
synced 2026-12-06 12:54:21 +01:00
SLOOP 2.7.1: the second core held with the bus-invalid traps off (after Felucca 1.6.1): a late second core no longer ends in a FELUCCA CRASH screen and a restart; the crash screen shows the stack and the second core's state, 10 s
This commit is contained in:
1 parent
ba54ba5f0e
commit
4ec1ac829f
12 files changed
+60
-15
No files matched your search
@@ -17,7 +17,7 @@ Free and open source (GPL-3.0), based on <a href="https://github.com/hugelton/Fe
|
||||
|
||||
SLOOP turns the FM-1 into a four-track groovebox you play live: **three synths and a drum machine** with 16 sounds on the white keys, twelve synthesis engines, 153 sounds, 37 drum kits, your own samples, a song mode you play with your hands, USB audio, MIDI in on the jack and MIDI clock — and now **physical models** (guitars, sitar, bells, hand drums), a **noise** engine, **six-operator FM with DX7 patches**, **parameter locks**, **micro timing**, **fills**, a **quick chain** of sections and the **sequencer to MIDI out**. House, techno, hip-hop, trap, drum & bass, amapiano, synthwave, lo-fi, ambient, chiptune — it does not pick a style for you. No factory patterns, nothing to load: everything you hear, you play.
|
||||
|
||||
> **Status:** 2.7 (two processor cores, fifteen arp modes, KBD HOLD, drum TUNE and DECAY, favourite sounds, looping samples, QUANT off, MIDI 3, your own screen colours; after 2.6's 27 punch-in effects, INSERT and MIDI LEARN). Still a beta: install at your own risk, and please [report](../../issues) what you find. Your projects, presets, samples and settings are kept when you update, and you can go back at any time (see [Going back](#going-back)).
|
||||
> **Status:** 2.7.1 (a fix for 2.7: an FM-1 whose second core ran late showed a FELUCCA CRASH screen and restarted; it now carries on, on one core). 2.7: two processor cores, fifteen arp modes, KBD HOLD, drum TUNE and DECAY, favourite sounds, looping samples, QUANT off, MIDI 3, your own screen colours; after 2.6's 27 punch-in effects, INSERT and MIDI LEARN. Still a beta: install at your own risk, and please [report](../../issues) what you find. Your projects, presets, samples and settings are kept when you update, and you can go back at any time (see [Going back](#going-back)).
|
||||
|
||||
## Contents
|
||||
|
||||
@@ -43,6 +43,8 @@ SLOOP turns the FM-1 into a four-track groovebox you play live: **three synths a
|
||||
|
||||
## What's new in 2.7
|
||||
|
||||
**2.7.1** fixes a crash: when the FM-1's second core did not finish its share of the sound in time, SLOOP stops it and carries on on one core, but stopping it raised a false alarm on the chip, and the FM-1 showed a red FELUCCA CRASH screen and restarted. It now holds the second core the safe way (after Felucca 1.6.1): a short glitch, and the music goes on. The crash screen also says more (the stack, the second core's state) and stays 10 seconds, long enough for a photo.
|
||||
|
||||
- **Two cores:** the sound now runs on both of the FM-1's cores (andrerezemini, #111): about twice the room, so many voices and INSERT effects no longer crackle. On by default (HOME menu → SYSTEM → 2ND CORE).
|
||||
- **Fifteen arp modes** from Felucca 1.5.1 (REPEAT, DNUP, UP+8, CONV, DIVG, PINKY, THUMB, WALK, CHORD), ORD in the order you pressed, and the arp keeps going when you change the sound.
|
||||
- **KBD HOLD** (#103): HOLD with the arp off holds your chord. **ARP SWG** works stopped too (#52).
|
||||
|
||||
+3
-3
@@ -1,17 +1,17 @@
|
||||
# SLOOP 2.7: build the firmware, then open the browser installer.
|
||||
# SLOOP 2.7.1: 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.7" -ForegroundColor White
|
||||
Write-Host " S L O O P 2.7.1" -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.7 build/sloop-site
|
||||
python web/make_site.py build/felucca.fwsc 2.7.1 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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -890,7 +890,7 @@
|
||||
<button id="connect" class="pri" data-t="connect" data-ic="port_usb_c"></button>
|
||||
<div class="links"><a class="dim" href="../installer/" data-t="installer"></a><button class="lang" id="lang"></button></div>
|
||||
<button id="install" class="pri" data-t="install" hidden></button>
|
||||
<!--DL--><a class="dim" id="offline" href="sloop-editor.html" download="sloop-editor-2.7.html" data-t="offline"></a><!--/DL-->
|
||||
<!--DL--><a class="dim" id="offline" href="sloop-editor.html" download="sloop-editor-2.7.1.html" data-t="offline"></a><!--/DL-->
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
Binary file not shown.
@@ -90,7 +90,7 @@
|
||||
<p id="status"></p>
|
||||
<pre id="log"></pre>
|
||||
<a class="ed" href="../editor/" data-t="editor"></a>
|
||||
<p class="small"><a href="../editor/sloop-editor.html" download="sloop-editor-2.7.html" data-t="edOffline"></a></p>
|
||||
<p class="small"><a href="../editor/sloop-editor.html" download="sloop-editor-2.7.1.html" data-t="edOffline"></a></p>
|
||||
<p><button id="app" class="ed" hidden data-t="appInstall"></button></p>
|
||||
<hr>
|
||||
<p class="small" data-t="direct"></p>
|
||||
@@ -514,7 +514,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.7", "product": "FM-1_900", "pkg": "../../firmware/sloop-2.7.fwsc", "sha256": "194a254cc4df80e27b52efee58821c304391c1c0c4df8d61fa23c2c246f8c9b3"};
|
||||
const meta = {"version": "2.7.1", "product": "FM-1_900", "pkg": "../../firmware/sloop-2.7.1.fwsc", "sha256": "7c9d269d15d1c1a48e0ebada7ffa2c2aa196c19d51056fd3f760d322322b335f"};
|
||||
|
||||
let writing = false, stock = null;
|
||||
const lockAll = (on) => {
|
||||
|
||||
+2
-2
@@ -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.7-6e6066c0d589"; // version + a hash of the files
|
||||
const STAMP = "2.7.1-c4ebf0d8d2aa"; // version + a hash of the files
|
||||
const CACHE = "sloop-site-" + STAMP;
|
||||
const FILES = ["../firmware/sloop-2.7.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.7.1.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
|
||||
|
||||
@@ -54,8 +54,7 @@ void __attribute__((section(".c1_text"), noreturn, used)) fm1_c1_main(void)
|
||||
|
||||
static void fm1_cpu1_hold(void)
|
||||
{
|
||||
FM1_C1_CON |= 0x2u;
|
||||
FM1_C1_CON &= ~0x8u;
|
||||
fm1_cpu1_halt(); /* (2.7.1, fm1_sys.h) the bus-invalid traps off around the hold */
|
||||
FM1_C1_SYNC();
|
||||
fm1_c1_on = 0;
|
||||
}
|
||||
|
||||
+36
-2
@@ -131,11 +131,44 @@ static void fm1_reset_reason(void)
|
||||
fm1_boot.wdt_con = fm1_p33_read(FM1_P3_WDT_CON);
|
||||
}
|
||||
|
||||
/* SLOOP 2.7.1, after Felucca 1.6.1 (Leo Kuroshita, GPL-3.0, fm1_sys.h fm1_cpu1_halt): hold the second core with the
|
||||
* bus-invalid traps off. Holding core 1 cuts the access it has on the bus, and the chip flags that a few instructions
|
||||
* later as a bus-invalid access (DBG_MSG bits 4, 5, 16..21): with the traps on (fm1_guard.h FM1_GUARD_BUS) core 0 took
|
||||
* the exception. On a FM-1 whose core 1 once ran late (fm1_cpu1_wait: 8 ms, then one core), that was a FELUCCA CRASH
|
||||
* screen in mix_block (vec 1, DBG_MSG bit 21) and a reboot instead of a glitch. So: traps off, hold, let the flag
|
||||
* come, clear it, traps back as they were. Registers only: safe when core 1 never ran */
|
||||
#define FM1__C1_CON (*(volatile uint32_t *)0x1EEE004u)
|
||||
#define FM1__DBG_WR_EN (*(volatile uint32_t *)0x1EEE240u)
|
||||
#define FM1__DBG_MSG_CLR (*(volatile uint32_t *)0x1EEE248u)
|
||||
#define FM1__DBG_EN (*(volatile uint32_t *)0x1EEE340u)
|
||||
#define FM1__DBG_BUS 0x003F0030u /* bus-invalid traps: AXI rd/wr (4, 5), C0/C1 fetch/rd/wr (16..21) */
|
||||
FM1_INLINE void fm1_cpu1_halt(void)
|
||||
{
|
||||
uint32_t locked = !(FM1__DBG_WR_EN & 1u), en, bus = FM1__DBG_BUS;
|
||||
volatile uint32_t n;
|
||||
__asm__("" : "+r"(bus)); /* (as Felucca: ~bus not folded into a constant) */
|
||||
if (locked)
|
||||
FM1__DBG_WR_EN = 0xE7u; /* unlock (as fm1_guard.h) */
|
||||
en = FM1__DBG_EN;
|
||||
FM1__DBG_EN = en & ~bus;
|
||||
__asm__ volatile("csync" ::: "memory");
|
||||
FM1__C1_CON |= 0x2u; /* hold: bit 1 set, then bit 3 (enable) cleared */
|
||||
FM1__C1_CON &= ~0x8u;
|
||||
__asm__ volatile("csync" ::: "memory");
|
||||
for (n = 0; n < 256u; n++) /* the flag comes some instructions after the hold */
|
||||
;
|
||||
FM1__DBG_MSG_CLR = bus;
|
||||
__asm__ volatile("csync" ::: "memory");
|
||||
FM1__DBG_EN = en;
|
||||
if (locked && (FM1__DBG_WR_EN & 1u))
|
||||
FM1__DBG_WR_EN = 0xE7u; /* lock again */
|
||||
__asm__ volatile("csync" ::: "memory");
|
||||
}
|
||||
|
||||
static void fm1_reboot(void)
|
||||
{
|
||||
__asm__ volatile("cli");
|
||||
*(volatile uint32_t *)0x1EEE004u |= 0x2u; /* the second core held (fm1_cpu1.h) */
|
||||
*(volatile uint32_t *)0x1EEE004u &= ~0x8u;
|
||||
fm1_cpu1_halt(); /* the second core held (2.7.1: no bus flag to trap on) */
|
||||
fm1_p33_or(FM1_P3_PR_PWR, 0x10);
|
||||
for (;;)
|
||||
;
|
||||
@@ -173,6 +206,7 @@ FM1_INLINE void fm1_enter_update(const uint8_t *parm)
|
||||
if (!(*(volatile uint32_t *)0x1EEE240u & 1u)) /* drop CPU0 write limits, as fm1_enter_uboot */
|
||||
*(volatile uint32_t *)0x1EEE240u = 0xE7u;
|
||||
*(volatile uint32_t *)0x1EEE348u = 0;
|
||||
fm1_cpu1_halt(); /* (2.7.1) held with the traps off, before the record */
|
||||
for (i = 0; i < FM1_UPDATA_PARM_LEN; i++)
|
||||
FM1_UPDATA_PARM[i] = parm[i];
|
||||
fm1_core_reset();
|
||||
|
||||
+11
-1
@@ -143,8 +143,18 @@ UI_SMALL static void fm1_fault(const fm1_crash_t *c)
|
||||
draw_text_box(10, 102, 220, &FONT_S, b, C_WHITE, 0);
|
||||
hexs(b, c->rets);
|
||||
draw_text_box(10, 120, 220, &FONT_S, b, C_WHITE, 0);
|
||||
hexs(b, c->sp); /* (2.7.1) more to read on a photo of it: the stack, */
|
||||
draw_text_box(10, 144, 220, &FONT_S, b, C_WHITE, 0);
|
||||
{ /* the second core (state 3 = running, how many late jobs) */
|
||||
char t[28];
|
||||
str_cpy(t, "C1 ", sizeof t);
|
||||
fmt_int(t + str_len(t), (int32_t)cpu1_state);
|
||||
str_cpy(t + str_len(t), " LATE ", 7);
|
||||
fmt_int(t + str_len(t), (int32_t)(cpu1_timeouts > 99u ? 99u : cpu1_timeouts));
|
||||
draw_text_box(10, 162, 220, &FONT_S, t, C_WHITE, 0);
|
||||
}
|
||||
t0 = fm1_ticks();
|
||||
while ((uint32_t)(fm1_ticks() - t0) < 4000u * 1000u * FM1_TICKS_PER_US)
|
||||
while ((uint32_t)(fm1_ticks() - t0) < 10000u * 1000u * FM1_TICKS_PER_US) /* (2.7.1: 10 s, time for a photo) */
|
||||
;
|
||||
fm1_reboot();
|
||||
}
|
||||
|
||||
+1
-1
@@ -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.7" /* the beat machine firmware for the FM-1 (based on Felucca) */
|
||||
#define FELUCCA_VERSION "SLOOP 2.7.1" /* the beat machine firmware for the FM-1 (based on Felucca) */
|
||||
#endif
|
||||
static void project_save(uint32_t slot);
|
||||
static void arrangement_save(void);
|
||||
|
||||
Reference in new issue
Block a user