V10.8.26: the screen mirror sends only the rows that changed (the owner: choppy): a hash of each row's last part sent (x, w, pixels; 480 B of RAM, not the pool), a part the same as the last one on its row skipped, the changed rows of a strip together as one box; SCREEN 1 / 3 forget them; scr_rows (lcd.c's tap) placed past the tables, scr_tap as it was

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
This commit is contained in:
Claude committed 2026-11-24 03:48:15 +00:00
1 parent aea170bb3b
commit f9954c4727
4 files changed
+41 -7

No files matched your search

+36 -3
View File
@@ -77,9 +77,13 @@ static void mir_frame(const uint32_t *box, uint32_t k)
scr.prev = 0;
}
/* lcd.c: a fill (px 0: w x h of colour fill, as lcd_fill takes it) or a strip (w x h of px, a row every stride
* pixels, each pixel byte-swapped as the panel takes it) about to go to the panel at x, y */
static void scr_tap(uint32_t x, uint32_t y, uint32_t w, uint32_t h, const uint16_t *px, uint32_t stride, uint32_t fill)
/* (V10.8.26) a row's last part sent: a hash of its x, w and pixels. A row part the same as the last one sent on that
* row is not sent again (every part sent on a row replaces it, so a part is skipped only when nothing was drawn on
* that row since); SCREEN 1 and 3 forget them all. In the RAM, not the pool (the pool keeps its 8 KiB to spare). */
uint16_t scr_row[SCR_H];
/* a box sent (scr_rows: the rows that changed) */
static __attribute__((noinline)) void scr_tap(uint32_t x, uint32_t y, uint32_t w, uint32_t h, const uint16_t *px, uint32_t stride, uint32_t fill)
{
uint32_t i = 0, k = 0, c, hh, box[4];
if (!scr_on || !w || !h || x + w > SCR_W || y + h > SCR_H)
@@ -115,6 +119,34 @@ static void scr_tap(uint32_t x, uint32_t y, uint32_t w, uint32_t h, const uint16
if (scr_on)
mir_frame(box, 0); /* (the last one out; the new header is never sent) */
}
/* lcd.c: a fill (px 0: w x h of colour fill, as lcd_fill takes it) or a strip (w x h of px, a row every stride
* pixels, each pixel byte-swapped as the panel takes it) about to go to the panel at x, y: the rows that changed sent,
* those in a row together as one box */
static void scr_rows(uint32_t x, uint32_t y, uint32_t w, uint32_t h, const uint16_t *px, uint32_t stride, uint32_t fill)
{
uint32_t r, i, hs, r0 = 0, n = 0;
if (!scr_on || !w || !h || x + w > SCR_W || y + h > SCR_H)
return; /* (lcd.c clips before; nothing past the panel) */
for (r = 0; r <= h; r++) {
if (r < h) {
hs = x * 251u + w * 31u + 1u;
for (i = 0; i < w; i++)
hs = hs * 33u + (px ? px[r * stride + i] : fill);
hs = (hs ^ hs >> 16) & 0xFFFFu;
hs -= hs == 0xFFFFu; /* (0xFFFF: a row not sent yet) */
if (scr_row[y + r] != hs) {
scr_row[y + r] = (uint16_t)hs;
if (!n++)
r0 = r;
continue;
}
}
if (n)
scr_tap(x, y + r0, w, n, px ? px + r0 * stride : px, stride, fill);
n = 0;
}
}
#endif
/* SCREEN (78): op 0 query, 1 on (and the whole screen again), 2 keep it on, 3 the whole screen again, 4 off.
@@ -128,6 +160,7 @@ static int ed_screen_handle(uint32_t cmd, const uint8_t *a, uint32_t na)
#if SCR_HAS_LCD
if (!bad && (op == 1u || (op == 3u && scr_on))) {
ui.force = 1; /* the next frame redraws everything: the editor's first picture */
memset(scr_row, 0xFF, sizeof scr_row); /* (sent whole: no row is the same as the last sent) */
scr_on = 1;
} else if (!bad && op == 4u)
scr_on = 0; /* (op 2: ed_service's last_ms, any request, keeps it on) */
+1 -1
View File
@@ -49,7 +49,7 @@
#define FELUCCA_ID "FM-1_900" /* package identity (build.py: the .fwsc marker string) */
#endif
#ifndef FELUCCA_VERSION
#define FELUCCA_VERSION "V10.8.25" /* (2026-11-23) V10.8.21: SEQ > CLAY (the owner): DRONE CLAY, JIANT BYTE's drone and its four modulators (DEST SHAPE EUCLID AMOUNT; DECAY, STEP, SEED) on any track, kept with the project ('C' 'Y'), its pages' picture the modulators' telemetry. V10.7.77: GEN (the owner): DUBSTEP's wobble its rate moving (the wobble bass's LFO RATE automated half a bar each: 1/4 1/8 1/8T 1/16); CUMBIA villera one throw in two (a villera 'teclado': 92 .. 100, minor, the keyboard's lead up front). V10.7.76: DRUM-X MATH a wavetable (the owner: "harsh"): its t whole cycles of the hit's time (one shape evolving), interpolated between its samples; SOUND 3 draws it (four moments, cold to hot); hints trimmed (flash). V10.7.75: DRUM-X MATH (the owner): its RATIO (1/4 .. 16, 24, the inharmonic between) on SOUND 3's KNOB 4, COLOR read MOD AMT; MATH's RESTART the scope (its ramps' picture gone), ten more hints out (flash). V10.7.74: DRUM-X MATH (the owner): a sound's WAVE past BELL a MATH formula F01..F48 as its FM's modulator (COLOR its index; its t the hit's time, a sample in eight), kept with the project ('D' 'F'). V10.7.73: SCL > HARMONY its own tab (KEY CHORD HARMONY SCENE); the defaults once (the owner): LARGE off, CLICK REC, COUNT-IN 1 BAR. V10.7.72: GEN (the owner): MATH WEST STRING more (the archetypes' third options theirs, 25 %; a bass's one time in ten); GLO > GLOBAL the scope, its bars gone. V10.7.71: SCL > HARMONY's picture (the owner): the progression's chords as roman numerals in the key ("-" minor, "o" diminished), each its root's colour, the one playing lit; the obvious knobs' hints out (flash). V10.7.70: FX > PUNCH IN: KNOB 4 M4 (its ERASE PUNCH LANE's only), so OCT+ always the punch-in editor (an ERASE picked took it). V10.7.69: MATH FLOAT MORPH (the owner): ALGO B where CHIP was, MORPH A -> B where BEND was (between the ends B a sample in eight, interpolated: +12.5 % CPU); MATH's formulas (lofi_float, lofi_byte) their 14 divisions by a constant as multiplies (JIANT BYTE 0.16's build pass, tools/build.py const_divs: exact, less CPU a sample); the MACRO layer's dead branches out (flash). V10.7.68: EUCLID MODES > ROLE (MELODY CHORDS BASS ARP, was CHORD) on the harmony the other melodic tracks play, bar by bar (four bars when it changes), else SCL's key; a recorded melody EUCLID takes: its notes as they were; LFO / FX dice leftovers out (flash). V10.7.67: GEN and EUCLID MUTATE fuse two seeds (the owner: never one as it is; the second far from the first), A+B in the name; FX + OCT+ opens the punch-in editor again (as OCT+ on FX > PUNCH IN). V10.7.66: SCL > HARMONY (PROG LENGTH EVOLVE SKIP: every melodic sequence follows a progression); GEN 8 progressions more (neo-soul, jazz, IDM, progressive); EUCLID's melody CONTOUR RANGE MOTIF CHORD; macros FX > PUNCH IN's only (LFO's layer, HOME > ROUTES gone, MACROS in FX), GLO's layer says G4 UNDO; the PUNCH-IN EDITOR redone (the owner): a key WHAT (an effect, or PARAM: M1..M4, CUT PITCH TIMBRE VOLUME PAN DIST CHORUS DELAY REVERB VIBRATO on every track), HOW (an effect HOLD LATCH QUANT; PARAM HOLD RAMP UP RAMP DN SINE STUTTER S&H), AMOUNT (-100..+100 %; an effect its TARGET), TIME (1/16 .. 8 BARS); two slots A B; FX > PUNCH IN its knobs M1..M4 (PUNCH LANE: LEN RES); the layers MAP only (KNOBS STATE gone, ALGORITHM nothing held), the FX cards "M1 CUT"; FX + SELECT the FX pages (its dice gone). GENE while it plays waits for the bar to end (Hollusion); GENE 4: KEY NEW / KEEP (the first melodic track's key and mode kept), ENTRY ALL / BUILD (the new piece in a track a bar, the kit first); the old DIGITAL / NOISE / retired engines' conversions out (flash), the songs 7-8 notice out; voices past V10.6c's budget: tails first, FM6's quarter rate gone. V10.7.65: the PUNCH-IN EDITOR (the owner): OCT+ on FX > PUNCH IN opens it (the FX layer locked open; an ERASE picked on KNOB 4: OCT+ does it), DICE gone; the COMB / COMB- cut-off moved by the LFO and the ENV as the other filters; a key held and KNOB 1..4 its EFFECT (any, MOD a macro moved) TARGET (ALL SYN DRM T1..T6; MOD M1..M4) AMOUNT (MOD 1 BEAT .. 4 BARS) MODE (HOLD LATCH QUANT; MOD RAMP UP / DOWN SINE S&H), the mode said in the header; SELECT a slot (four, in the settings), OCT+ saves and plays it, OCT- leaves. V10.7.64: SCENE's LEADER PRESS (a key's note on every live track at once, each its own sound); SCENE on the live tracks only (it opened on T6, asleep with four: nothing heard, nothing drawn), every role with the key: a kit's DRUM loops its beat while a key is held, stopped too; the engines as the kit (the owner): FILTER TYPE CUT RES IMAGE (DIST the SENDS' only), PLAY POLY GLIDE UNISON VEL (the plain MORE gone, GL MODE off the panel), GAIN 0..+12 dB clean where a DRIVE was (ANALOG's MORE, WHEEL's COLOR; their DRIVE off the panel, kept), saved ('T' 'G'); FUGA's subject and answer on live tracks (the continuo after: with four tracks it began unheard); DUBSTEP's bass the wobble (a resonant low-pass on aLine truncated
#define FELUCCA_VERSION "V10.8.26" /* (2026-11-23) V10.8.21: SEQ > CLAY (the owner): DRONE CLAY, JIANT BYTE's drone and its four modulators (DEST SHAPE EUCLID AMOUNT; DECAY, STEP, SEED) on any track, kept with the project ('C' 'Y'), its pages' picture the modulators' telemetry. V10.7.77: GEN (the owner): DUBSTEP's wobble its rate moving (the wobble bass's LFO RATE automated half a bar each: 1/4 1/8 1/8T 1/16); CUMBIA villera one throw in two (a villera 'teclado': 92 .. 100, minor, the keyboard's lead up front). V10.7.76: DRUM-X MATH a wavetable (the owner: "harsh"): its t whole cycles of the hit's time (one shape evolving), interpolated between its samples; SOUND 3 draws it (four moments, cold to hot); hints trimmed (flash). V10.7.75: DRUM-X MATH (the owner): its RATIO (1/4 .. 16, 24, the inharmonic between) on SOUND 3's KNOB 4, COLOR read MOD AMT; MATH's RESTART the scope (its ramps' picture gone), ten more hints out (flash). V10.7.74: DRUM-X MATH (the owner): a sound's WAVE past BELL a MATH formula F01..F48 as its FM's modulator (COLOR its index; its t the hit's time, a sample in eight), kept with the project ('D' 'F'). V10.7.73: SCL > HARMONY its own tab (KEY CHORD HARMONY SCENE); the defaults once (the owner): LARGE off, CLICK REC, COUNT-IN 1 BAR. V10.7.72: GEN (the owner): MATH WEST STRING more (the archetypes' third options theirs, 25 %; a bass's one time in ten); GLO > GLOBAL the scope, its bars gone. V10.7.71: SCL > HARMONY's picture (the owner): the progression's chords as roman numerals in the key ("-" minor, "o" diminished), each its root's colour, the one playing lit; the obvious knobs' hints out (flash). V10.7.70: FX > PUNCH IN: KNOB 4 M4 (its ERASE PUNCH LANE's only), so OCT+ always the punch-in editor (an ERASE picked took it). V10.7.69: MATH FLOAT MORPH (the owner): ALGO B where CHIP was, MORPH A -> B where BEND was (between the ends B a sample in eight, interpolated: +12.5 % CPU); MATH's formulas (lofi_float, lofi_byte) their 14 divisions by a constant as multiplies (JIANT BYTE 0.16's build pass, tools/build.py const_divs: exact, less CPU a sample); the MACRO layer's dead branches out (flash). V10.7.68: EUCLID MODES > ROLE (MELODY CHORDS BASS ARP, was CHORD) on the harmony the other melodic tracks play, bar by bar (four bars when it changes), else SCL's key; a recorded melody EUCLID takes: its notes as they were; LFO / FX dice leftovers out (flash). V10.7.67: GEN and EUCLID MUTATE fuse two seeds (the owner: never one as it is; the second far from the first), A+B in the name; FX + OCT+ opens the punch-in editor again (as OCT+ on FX > PUNCH IN). V10.7.66: SCL > HARMONY (PROG LENGTH EVOLVE SKIP: every melodic sequence follows a progression); GEN 8 progressions more (neo-soul, jazz, IDM, progressive); EUCLID's melody CONTOUR RANGE MOTIF CHORD; macros FX > PUNCH IN's only (LFO's layer, HOME > ROUTES gone, MACROS in FX), GLO's layer says G4 UNDO; the PUNCH-IN EDITOR redone (the owner): a key WHAT (an effect, or PARAM: M1..M4, CUT PITCH TIMBRE VOLUME PAN DIST CHORUS DELAY REVERB VIBRATO on every track), HOW (an effect HOLD LATCH QUANT; PARAM HOLD RAMP UP RAMP DN SINE STUTTER S&H), AMOUNT (-100..+100 %; an effect its TARGET), TIME (1/16 .. 8 BARS); two slots A B; FX > PUNCH IN its knobs M1..M4 (PUNCH LANE: LEN RES); the layers MAP only (KNOBS STATE gone, ALGORITHM nothing held), the FX cards "M1 CUT"; FX + SELECT the FX pages (its dice gone). GENE while it plays waits for the bar to end (Hollusion); GENE 4: KEY NEW / KEEP (the first melodic track's key and mode kept), ENTRY ALL / BUILD (the new piece in a track a bar, the kit first); the old DIGITAL / NOISE / retired engines' conversions out (flash), the songs 7-8 notice out; voices past V10.6c's budget: tails first, FM6's quarter rate gone. V10.7.65: the PUNCH-IN EDITOR (the owner): OCT+ on FX > PUNCH IN opens it (the FX layer locked open; an ERASE picked on KNOB 4: OCT+ does it), DICE gone; the COMB / COMB- cut-off moved by the LFO and the ENV as the other filters; a key held and KNOB 1..4 its EFFECT (any, MOD a macro moved) TARGET (ALL SYN DRM T1..T6; MOD M1..M4) AMOUNT (MOD 1 BEAT .. 4 BARS) MODE (HOLD LATCH QUANT; MOD RAMP UP / DOWN SINE S&H), the mode said in the header; SELECT a slot (four, in the settings), OCT+ saves and plays it, OCT- leaves. V10.7.64: SCENE's LEADER PRESS (a key's note on every live track at once, each its own sound); SCENE on the live tracks only (it opened on T6, asleep with four: nothing heard, nothing drawn), every role with the key: a kit's DRUM loops its beat while a key is held, stopped too; the engines as the kit (the owner): FILTER TYPE CUT RES IMAGE (DIST the SENDS' only), PLAY POLY GLIDE UNISON VEL (the plain MORE gone, GL MODE off the panel), GAIN 0..+12 dB clean where a DRIVE was (ANALOG's MORE, WHEEL's COLOR; their DRIVE off the panel, kept), saved ('T' 'G'); FUGA's subject and answer on live tracks (the continuo after: with four tracks it began unheard); DUBSTEP's bass the wobble (a resonant low-pass on aLine truncated
#endif
#if FELUCCA_OTA && !FELUCCA_FLASH
#error "FELUCCA_OTA needs FELUCCA_FLASH"
+2 -2
View File
@@ -23,8 +23,8 @@ static uint8_t lcd_small[64];
#define SCR_HAS_LCD 1
uint8_t scr_on __attribute__((section(".pool.mirror"))); /* (not static, after the pool: kept out of the compiler's merged
* globals, so no other variable moves; app.ld) */
static void scr_tap(uint32_t x, uint32_t y, uint32_t w, uint32_t h, const uint16_t *px, uint32_t stride, uint32_t fill);
#define SCR_TAP(x, y, w, h, px, stride, fill) do { if (scr_on) scr_tap(x, y, w, h, px, stride, fill); } while (0)
static void scr_rows(uint32_t x, uint32_t y, uint32_t w, uint32_t h, const uint16_t *px, uint32_t stride, uint32_t fill);
#define SCR_TAP(x, y, w, h, px, stride, fill) do { if (scr_on) scr_rows(x, y, w, h, px, stride, fill); } while (0)
#else
#define SCR_TAP(x, y, w, h, px, stride, fill) ((void)0)
#endif
+2 -1
View File
@@ -396,7 +396,8 @@ def late_fns():
# Only the overflowing UI gaps move: keep all audio addresses pinned without wasting large holes.
"fm1_irq_on", "large_kind", "draw_confirm", "vx_analog", "toast_clear", "draw_text_box", "as_mix",
"ed_bk_r32", "set_engine", "step_lanes", "song_copy_section", "palette_from_stored",
"proj_steps", "splash_sig", "up_name_ok", "song_idx_touch", "song_end_row"}
"proj_steps", "splash_sig", "up_name_ok", "song_idx_touch", "song_end_row",
"scr_rows"} # (V10.8.26) the screen mirror's row check: past the tables
for f in LATE_SRC:
names |= set(re.findall(r"^static [^;=()]*?\b(\w+)\((?![^)]*\)\s*;)", (FW / "src" / f).read_text(), flags=re.M))
return names