mirror of
https://github.com/ruppert/fmini-1.git
synced 2026-12-06 04:44:27 +01:00
MENU > LARGE keeps one size per knob (#251): each knob shows all its values in the size its longest value fits, so a value no longer jumps between sizes while it is turned. No new fonts. Updates check the package's size on the device: the update entry and the update loader take only a package whose firmware area is exactly the FM-1's. Another device's package is refused before anything is erased (the update screen shows FAILED -15; the loader answers -14). Second core (beta, PR #247): MENU > SYSTEM > 2ND CORE, OFF by default. ON (BETA) applies from the next power-on: the second core renders some of the four parts of each block, bit for bit the one-core sound. A unit whose second core misreads goes on with one core and sets it back to OFF. FELUCCA_CPU2=0 builds none of it. Start, mailbox and guards from X0X (with Melodee's dual-core findings), the split and hardening after Jangada. Felucca-Engines: ANALOG, LOFI, TRIO, WHEEL and NOISE, the engine interface, the shared DSP helpers and their table generator move to https://github.com/hugelton/Felucca-Engines under the MIT licence, included as the git submodule firmware/engines. The firmware stays GPL-3.0-only; clone with --recurse-submodules. The sound is unchanged (the same golden renders); the engines' own tests run with Felucca's. Co-authored-by: Кирилл Сапфиров <gospodindilly@gmail.com>
27 lines
1.8 KiB
Bash
27 lines
1.8 KiB
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
# Copyright (C) 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments
|
|
# Felucca in the browser: the firmware's sources as the host tests build them (web/emu/felucca_web.c), compiled
|
|
# to WebAssembly with Emscripten, plus the page. After X0X's web/emu/build.sh (charlesvestal/fm1-x0x, GPL-3.0).
|
|
# web/emu/build.sh -> build/emu/{index.html, worklet.js, felucca.wasm, fonts/}
|
|
# Run after one ./build.sh (build/gen: the tables, the fonts, the CC0 samples).
|
|
# -ffp-contract=off: no fused multiply-adds, as the host build. EMU_OPT replaces -O2, EMU_CFLAGS adds flags
|
|
# (EMU_CFLAGS=-msimd128: let the compiler vectorise; every browser with AudioWorklet has wasm SIMD).
|
|
# The page shows the version (FELUCCA_VERSION) marked "(preview)" before its release; EMU_PREVIEW=0 drops the mark.
|
|
set -e
|
|
cd "$(dirname "$0")/../.."
|
|
[ -f build/gen/felucca_tables.h ] || { echo "emu: run ./build.sh once first (build/gen)"; exit 1; }
|
|
command -v emcc >/dev/null 2>&1 || { echo "emu: no emcc (Emscripten)"; exit 1; }
|
|
VERSION=$(sed -n 's/^#define FELUCCA_VERSION "\([^"]*\)".*/\1/p' firmware/src/felucca.c | head -n 1)
|
|
mkdir -p build/emu/fonts
|
|
# shellcheck disable=SC2086
|
|
emcc ${EMU_OPT:--O2} -ffp-contract=off -std=gnu99 -w ${EMU_CFLAGS:-} \
|
|
"-DFELUCCA_VERSION=\"$VERSION\"" -Ibuild/gen -Ifirmware/src \
|
|
--no-entry -sSTANDALONE_WASM -sSTACK_SIZE=1048576 -sINITIAL_MEMORY=33554432 -sFILESYSTEM=0 \
|
|
-o build/emu/felucca.wasm web/emu/felucca_web.c
|
|
[ "${EMU_PREVIEW:-1}" = 0 ] && PREVIEW='' || PREVIEW=' (preview)'
|
|
sed -e "s/@VERSION@/$VERSION/g" -e "s/@PREVIEW@/$PREVIEW/g" web/emu/index.html > build/emu/index.html
|
|
cp web/emu/worklet.js build/emu/
|
|
cp web/emu/fonts/DotGothic16-subset.woff web/emu/fonts/OFL.txt build/emu/fonts/
|
|
echo "emu: build/emu ($(wc -c < build/emu/felucca.wasm | tr -d ' ') B wasm, $VERSION)"
|