Files
fmini-1/tests/editor_bridge.c
T
Claude 232264d571 FMini-1 v1.7.1: fmug is now fmini everywhere (files, identifiers, engine name, editor, docs)
The project's first name, FMUG, is gone. Nothing about the sound or the stored data changes.

- Files: eng_fmini.c, fmini_app.c, ui_fmini.c, editor_fmini.c, eng_fmini_filter.h, eng_fmini_presets.h, the tests, the
  tools (fmini_bank.py, fmini_filter.py, fmini_retune.py, fmini_levels.json, gen_fmini_presets.py) and
  web/make_fmini_installer.py.
- Identifiers: fmug_ / FMUG_ / FELUCCA_FMUG_ONLY became fmini_ / FMINI_ / FELUCCA_FMINI_ONLY; the editor commands are
  FMINI_GET / FMINI_PUT / FMINI_PRESET (numbers 82-84 unchanged). The engine reports the name "FMINI" (was "FMUG") on the
  device and in the editor's engine list; the editor still accepts "FMUG" from firmware up to 1.7.0.
- Short forms fmg_ / GR_FMG0..6 and FG_* are left as they are.
- Tables: tests/golden.txt and tests/target_budget.txt only had their keys renamed.
- Docs: CLAUDE.md and DEVELOPING.md say there is one branch (main) and record the rename; the test-suite notes now describe
  the second regress section (FELUCCA_CPU2=0: 41 FMINI patches differ from the golden, as on 1.7.0).
- Site: docs/emu and docs/index.html rebuilt for v1.7.1; the splash pictures show the new version.

Checked: the firmware's instructions are identical to 1.7.0 (only the addresses of string literals move); the 100 FMINI golden
hashes are unchanged; every screen of the README shots is pixel-identical except the splash; the preset lab's metrics for the
100 patches are identical; the host suite fails in the same seven sections as before (fm4, ui_render, three regress, union_test,
web pages) and nowhere else. Not tested on a real FM-1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-10-20 19:35:44 -03:00

33 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-3.0-only
* The firmware's real editor handler behind stdin / stdout, for web/test_editor_fmini.py: each input line is the hex of a
* SysEx request (F0 .. F7); the answer is the hex of the reply frame (or an empty line when there is none).
* Track 1 is an FMINI track on its first factory patch, as on an FMini-1. */
#define EDITOR_TEST_NO_MAIN 1
#include "editor_test.c"
#include <stdio.h>
int main(void)
{
char line[2048];
reset();
set_engine_of(&trk[0], ENGI_FMINI);
apply_preset_to(&trk[0], 0);
trk[0].engine = trk[0].eng_req;
fmini_track_loaded(&trk[0]);
song.sel = 0;
setvbuf(stdout, 0, _IOLBF, 0);
while (fgets(line, sizeof line, stdin)) {
uint8_t a[1024];
uint32_t n = 0, i, got;
char *p = line;
unsigned v;
int k;
while (sscanf(p, "%2x%n", &v, &k) == 1 && n < sizeof a) { a[n++] = (uint8_t)v; p += k; }
if (n < 6u) { puts(""); continue; }
got = request(a[4], a + 5, n - 6u); /* (F0 7D 46 4C cmd args F7) */
for (i = 0; i < got; i++)
printf("%02x", host_wire[i]);
puts("");
}
return 0;
}