mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-05 12:24:42 +01:00
V10.8.60 (2/2): the USB resampler's table halved, its 7.5 KiB the sound's per-block code in RAM; core 1's parts from the RAM copy
(the owner: "dale": JIANT BYTE's CPU technique, byte-cpu-light, in JIANT FM) - usb.c rs_tab: phases 0..79 only (7.5 KiB of the pool back); phases 80..159 read phase 159 - p's taps on the input's history kept newest first too (rs.bl / rs.br, 256 B): the FIR loop as it was (target budget 881 of 838, +5 %), the same products and sums (tests/uac_test.c bit for bit, its table checks through RS_TAB). - app.ld: RAMTEXT 7.5 KiB lower (POOL its 7.5 KiB shorter, its spare as it was: 8448 B); app.ld .hot_text.lo.* and tools/build.py HOT_LO (the lowest of the RAM code: what was there stays): voice_block, mod_begin, mod_voice, tf_run, mc_split, mc_join, drum_side_begin, macro_master, tone_set, lev_block. RAM code 40168 of 42496 (2328 B headroom). - fx.c mc_job: core 1's parts through mix_part_m0, the RAM copy (BYTE's devcpu): its own inlined flash copy gone (3.5 KiB of the image back). - seq.c kx_block: a kit's P_XPR (a GEN DRUM part's 110) no longer runs the pass it never reads (BYTE's devcpu2; the same state each block). Not ported: the UI's canvas halved and drawn in bands (BYTE's devcpu3, its 35 KiB for more RAM code: FM's pages draw far more tall strips; a later step), the SINE quarter table in RAM, CLAY / PFX / LIFE idle shortcuts (FM's differ). The lines model (tests/cpu_lines_test.py, worst block a core, before -> after): 101 GEN EXPLORE s123 + CLOUD/delay/chorus 77/50 -> 60/31 %; 102 59/48 -> 41/30; 103 95/22 -> 78/14; 104 72/48 -> 54/32; 105 84/59 -> 66/40; 0c CPU TEST's song 84/74 -> 70/58. The scenes' sound the same bit for bit (cpu_lines_test hashes before and after); audio.c as V23's. Layout recorded again (FELUCCA_REPIN=keep); the plain build passes. Image 580120 of 584336 (4216 B free), BT segment as before, RAM .data+.bss 97220 of 98304, pool spare 8448. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
This commit is contained in:
9 files changed
+4188
-2316
No files matched your search
+6
-2
@@ -20,8 +20,10 @@ MEMORY
|
||||
XIP (rx) : ORIGIN = 0x02000120, LENGTH = 0x8EA90 /* = tools/fm1pkg_make.py APP_SLOT (0.9.13: the region ends at 0x92FFE) */
|
||||
LOWBUF (rw) : ORIGIN = 0x01C00000, LENGTH = 0x8000
|
||||
RAM (rwx) : ORIGIN = 0x01C08000, LENGTH = 96K
|
||||
POOL (rw) : ORIGIN = 0x01C20000, LENGTH = 0x4D800
|
||||
RAMTEXT (rwx): ORIGIN = 0x01C6D800, LENGTH = 0x8800 /* (0.6.97, 0.7.0: up 4 KiB each, the image grew: a call from here must
|
||||
POOL (rw) : ORIGIN = 0x01C20000, LENGTH = 0x4BA00
|
||||
RAMTEXT (rwx): ORIGIN = 0x01C6BA00, LENGTH = 0xA600 /* (V10.8.60: 7.5 KiB lower, the USB resampler's table halved,
|
||||
* usb.c rs_tab, JIANT BYTE's devcpu2: more of the sound's
|
||||
* per-block code in RAM, tools/build.py HOT_LO) (0.6.97, 0.7.0: up 4 KiB each, the image grew: a call from here must
|
||||
* reach its end; the user stack 4 KiB shorter each time, 15.75 KiB;
|
||||
* 0.9.9-stab, as 0.9.12: 1 KiB lower, from the pool: the 320 MHz switch;
|
||||
* 0.9.9-beta4: 9 KiB lower, from the pool (8 KiB of its main-loop
|
||||
@@ -63,6 +65,8 @@ SECTIONS
|
||||
* same RAM code window (_rt_start .. _hot_end) */
|
||||
.hot_text : {
|
||||
_hot_start = .;
|
||||
KEEP(*(.hot_text.lo.*)) /* (V10.8.60, tools/build.py HOT_LO, JIANT BYTE's devcpu3: the lowest, what was before
|
||||
* stays where it was) */
|
||||
KEEP(*(.hot_text*)) /* (tools/build.py HOT_FNS: their sections renamed in the optimised IR) */
|
||||
. = ALIGN(4);
|
||||
_hot_end = .;
|
||||
|
||||
@@ -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.59" /* (2026-11-27) V10.8.59 (the owner: "una visual por canción, muy audio reactiva, todas deformadas y fusionadas"; SCL simplified and PER1/PER2 settings no longer read for the room): VISUAL from the song (GEN seed, genre, mood, energy; else the project), hits (kick jump and thump, snare glitch, note lobes), one field bends every layer; V10.8.58 (the owner: "veamos qué se puede hacer con menos espacio"): VISUAL composed in the same room: the data a few boxes apart with their callouts, a head with crown, temples, cheekbones, jaw and neck (no egg), WHEEL's worms in some scenes on the other third, the core and the ground placed and sized by the seed, the mesh or its rows alone (topographic), the skull's spokes with square tips, PALETTE every layer (MIXED: one of three duos a scene); V10.8.57 (the owner: "podría ser mucho mejor", references "anatomía cibernética y data", "una mezcla de todo eso", the whole screen, no shape at several sizes): HOME > VISUAL the whole screen (a knob a line at the foot), a composition from a seed: a ground (an isometric mesh of the output's history with digits, stars out of a vanishing point, a rain of glyphs), WHEEL's worms, a core on a third (a radial skull diagram, a scanned head with its thermal scan lines, or a creature), the data (tracking boxes joined, live numbers); KNOB 1 DENSITY, 3 PALETTE MIXED THERMAL ORG/BLUE GRN/RED AMBER MONO; the saver another every 30 s; V10.8.56 (the owner: "visuales random en HOME", both): HOME > VISUAL, BEING's second page (ROUTES' place), a figure from a seed of the creatures' pieces (OCT+ a new one, "VISUAL #n"; KNOB 1 COMPLEX, 2 WOBBLE, 3 PALETTE, 4 REACT), moving with the sound; MENU > DISPLAY > SAVER (OFF 1 3 5 10 MIN, 3 the default): the figure the whole screen after that long with no panel input, the first touch only brings the page back; V10.8.55 (the owner: "the snail and the caterpillar can be better: a misreading of the original, not the engine"; "a bit more deformity in the circles, cheap, a modifier of the animations' engine"; "DRUM-X too"): the creatures' circles wobble (vx_wf: two lobes turning, more with the sound); their colours as their originals' (ANALOG's isotherms, DRIVE's spikes and NOISE's cilia; WHEEL's tubes warmed by DRIVE; STRING's silk by BRIGHT; MATH BYTE's segments lit by the byte its voice holds); in silence an idle wave (the snail's sole, the caterpillar's colours on HOME > BEING); DRUM-X's kit a table of beings (one call); PHASE's snail and MATH's caterpillar drawn through vx_gx as their originals were (head and eyestalks at the left, the shell on its back, the wave its sole; the caterpillar crawling in a wave, segments thinning to the tail, its skins the sound, the head at the right); V10.8.54 (the owner: "pasá todas esas", Studio's projects, RESOUND): ANALOG WHEEL PHASE MATH STRING's creatures through one routine (vx_gx; WHEEL's worms waving with their crowns, ANALOG's spikes cilia and oscillators); editor PROJ_LIST 95 / PROJ_NAME 96 / PROJ_OP 97 (Studio's library: rename a part or a project live, copy move delete a project); GLO + A4 RESOUND (new sounds for the whole song, its notes kept; GLO + G4 back); RESTART, a DRUM sound's mute, LANE, REC GRID, PROJECT n, MIXER's KNOB 4 and "A > B NEXT BAR" said; a lens page's OCT+ gestures in its footer (1.5 s, and while OCT+ is held); V10.8.53 (the owner: "every picture from the same engine, so their room shrinks"): the pictures' shared engine (ui_gx.c: cells, a sine, chips, keys); DELAY REVERB CHORUS SENDS drawn with it, DIST's and CLIP's curve one; the big numbers in M (the V face gone), the count-in on one line, the EQ's curve, the TOOLS picture and the small beings of the lists gone; SEQ EDIT (SEQ held): KNOB 1 / 2 the selection, 3 the ACTION (STRETCH .. MUTATE, GENERATE in the selection with KNOB 4 its genre and a new seed, RANDOM on its grid 1/4 .. 1/32), 4 its amount, OCT+ does it, F#5 UNDO / REDO; GLO's mutes, UNMUTE ALL, SCL's ROOT and REC's QUANTIZE say what they did; V10.8.52 (the owner: "don't lose songs"): SAVE + C4..F4 / OCT+ over a part with music asks OVERWRITE A? (OCT+ yes, once a part until another project opens), the part it had back with GLO + G4 UNDO (again: the save again); a GEN draft saved with PROJECTS > SAVE is that project from then on (SAVE + C4, the autosave and RESTORE LAST follow it: they stayed on the music before GEN); V10.8.51 (the owner): projects of before V10.7 no longer migrated (OLD PROJECT: OPEN IN STUDIO, the slot untouched; Studio converts them: web_proj_load / web_proj_save); the MOD MATRIX AMOUNT -200 .. +198 % (100 % a full source the whole range, exactly); GEN's pieces under -1 dBFS before the master (a genre's headroom: were up to +13 dBFS); SEQ TOOLS' STRETCH SQUEEZE REPEAT on the steps held (SEL 5-8); PLAY: THE PART; V10.8.50 (the owner: "copy, paste, duplicate; select"): SEQ TOOLS C5 is DUP (the copied steps again right after them, LEN grown), step keys held + EDIT clear those stepLine truncated
|
||||
#define FELUCCA_VERSION "V10.8.60" /* (2026-11-27) V10.8.60 (the owner: "dale", JIANT BYTE's CPU technique: the FM-1's time a block goes by the flash's 32-byte lines the sound reads): the USB resampler's table halved (its history kept newest first too), its 7.5 KiB the RAM code's: a voice's block, the matrix, the FILTER, the split and the drums' sides in RAM; core 1's parts from the RAM copy; the expression keys' pass not run for a kit; the lines model (tests/cpu_lines_test.py, tools/audio_map.txt); V10.8.59 (the owner: "una visual por canción, muy audio reactiva, todas deformadas y fusionadas"; SCL simplified and PER1/PER2 settings no longer read for the room): VISUAL from the song (GEN seed, genre, mood, energy; else the project), hits (kick jump and thump, snare glitch, note lobes), one field bends every layer; V10.8.58 (the owner: "veamos qué se puede hacer con menos espacio"): VISUAL composed in the same room: the data a few boxes apart with their callouts, a head with crown, temples, cheekbones, jaw and neck (no egg), WHEEL's worms in some scenes on the other third, the core and the ground placed and sized by the seed, the mesh or its rows alone (topographic), the skull's spokes with square tips, PALETTE every layer (MIXED: one of three duos a scene); V10.8.57 (the owner: "podría ser mucho mejor", references "anatomía cibernética y data", "una mezcla de todo eso", the whole screen, no shape at several sizes): HOME > VISUAL the whole screen (a knob a line at the foot), a composition from a seed: a ground (an isometric mesh of the output's history with digits, stars out of a vanishing point, a rain of glyphs), WHEEL's worms, a core on a third (a radial skull diagram, a scanned head with its thermal scan lines, or a creature), the data (tracking boxes joined, live numbers); KNOB 1 DENSITY, 3 PALETTE MIXED THERMAL ORG/BLUE GRN/RED AMBER MONO; the saver another every 30 s; V10.8.56 (the owner: "visuales random en HOME", both): HOME > VISUAL, BEING's second page (ROUTES' place), a figure from a seed of the creatures' pieces (OCT+ a new one, "VISUAL #n"; KNOB 1 COMPLEX, 2 WOBBLE, 3 PALETTE, 4 REACT), moving with the sound; MENU > DISPLAY > SAVER (OFF 1 3 5 10 MIN, 3 the default): the figure the whole screen after that long with no panel input, the first touch only brings the page back; V10.8.55 (the owner: "the snail and the caterpillar can be better: a misreading of the original, not the engine"; "a bit more deformity in the circles, cheap, a modifier of the animations' engine"; "DRUM-X too"): the creatures' circles wobble (vx_wf: two lobes turning, more with the sound); their colours as their originals' (ANALOG's isotherms, DRIVE's spikes and NOISE's cilia; WHEEL's tubes warmed by DRIVE; STRING's silk by BRIGHT; MATH BYTE's segments lit by the byte its voice holds); in silence an idle wave (the snail's sole, the caterpillar's colours on HOME > BEING); DRUM-X's kit a table of beings (one call); PHASE's snail and MATH's caterpillar drawn through vx_gx as their originals were (head and eyestalks at the left, the shell on its back, the wave its sole; the caterpillar crawling in a wave, segments thinning to the tail, its skins the sound, the head at the right); V10.8.54 (the owner: "pasá todas esas", Studio's projects, RESOUND): ANALOG WHEEL PHASE MATH STRING's creatures through one routine (vx_gx; WHEEL's worms waving with their crowns, ANALOG's spikes cilia and oscillators); editor PROJ_LIST 95 / PROJ_NAME 96 / PROJ_OP 97 (Studio's library: rename a part or a project live, copy move delete a project); GLO + A4 RESOUND (new sounds for the whole song, its notes kept; GLO + G4 back); RESTART, a DRUM sound's mute, LANE, REC GRID, PROJECT n, MIXER's KNOB 4 and "A > B NEXT BAR" said; a lens page's OCT+ gestures in its footer (1.5 s, and while OCT+ is held); V10.8.53 (the owner: "every picture from the same engine, so their room shrinks"): the pictures' shared engine (ui_gx.c: cells, a sine, chips, keys); DELAY REVERB CHORUS SENDS drawn with it, DIST's and CLIP's curve one; the big numbers in M (the V face gone), the count-in on one line, the EQ's curve, the TOOLS picture and the small beings of the lists gone; SEQ EDIT (SEQ held): KNOB 1 / 2 the selection, 3 the ACTION (STRETCH .. MUTATE, GENERATE in the selection with KNOB 4 its genre and a new seed, RANDOM on its grid 1/4 .. 1/32), 4 its amount, OCT+ does it, F#5 UNDO / REDO; GLO's mutes, UNMUTE ALL, SCL's ROOT and REC's QUANTIZE say what they did; V10.8.52 (the owner: "don't lose songs"): SAVE + C4..F4 / OCT+ over a part with music asks OVERWRITE A? (OCT+ yes, once a part until another project opens), the part it had back with GLO + G4 UNDO (again: the save again); a GEN draft saved with PROJECTS > SAVE is that project from then on (SAVE + C4, the autosave and RESTORE LAST follow it: they stayed on the music before GEN); V10.8.51 (the owner): projects of before V10.7 no longer migrated (OLD PROJECT: OPEN IN STUDIO, the slot untouched; Studio converts themLine truncated
|
||||
#endif
|
||||
#if FELUCCA_OTA && !FELUCCA_FLASH
|
||||
#error "FELUCCA_OTA needs FELUCCA_FLASH"
|
||||
|
||||
+9
-2
@@ -2846,7 +2846,12 @@ static void fx_run(uint32_t n); /* (below) */
|
||||
#else
|
||||
#define CPU_LINES_HOST 1
|
||||
#endif
|
||||
|
||||
#if FELUCCA_HOTRAM || CPU_LINES_HOST
|
||||
static void mix_part_m0(track_t *t, uint32_t n); /* (below; V10.8.60, JIANT BYTE's devcpu: core 1's parts too) */
|
||||
#define mix_part_c1 mix_part_m0
|
||||
#else
|
||||
#define mix_part_c1 mix_part_m
|
||||
#endif
|
||||
static __attribute__((noinline)) void mc_job(uint32_t a) /* core 1: the buses (MC_FX), the parts of mask a & 0x3F, a >> 8
|
||||
* samples */
|
||||
{
|
||||
@@ -2860,7 +2865,9 @@ static __attribute__((noinline)) void mc_job(uint32_t a) /* core 1: the buses (
|
||||
for (i = 0; i < NPART; i++)
|
||||
if ((a >> i) & 1u) {
|
||||
mc_cur = (int8_t)i;
|
||||
mix_part_m(&trk[i], n);
|
||||
mix_part_c1(&trk[i], n); /* (V10.8.60, JIANT BYTE's devcpu) the RAM copy, as the buses':
|
||||
* one copy for both cores, out of the I-cache (was a second,
|
||||
* inlined in mc_job, in the flash) */
|
||||
}
|
||||
mc_cur = -1;
|
||||
}
|
||||
|
||||
+6
-2
@@ -269,8 +269,12 @@ static __attribute__((noinline)) void kx_block(void)
|
||||
if (kb_on[k] && vk[k].at > vs.atl[kb_trk[k] % NTRK])
|
||||
vs.atl[kb_trk[k] % NTRK] = vk[k].at;
|
||||
g = kx_g[0] | kx_g[1]; /* (V10.7.6) nothing held or recorded, every ramp and pressure at 0 */
|
||||
for (i = 0; i < NTRK; i++) /* (as the pass below leaves them then): not run, ~10 % of the tick */
|
||||
g |= vs.atl[i] | ((uint32_t)trk[i].p[P_XPR] ^ 127u) | kx_amt[i][0] | kx_amt[i][1] | vs.at8[i];
|
||||
for (i = 0; i < NTRK; i++) { /* (as the pass below leaves them then): not run, ~10 % of the tick */
|
||||
uint32_t xr = 127u - (uint32_t)trk[i].p[P_XPR]; /* (V10.8.60, JIANT BYTE's devcpu2) a recording the pass below
|
||||
* reads: under 32, not a kit's (a GEN song's DRUM part at 110:
|
||||
* the pass, for nothing) */
|
||||
g |= vs.atl[i] | kx_amt[i][0] | kx_amt[i][1] | vs.at8[i] | (xr && xr < 32u && !drum_track(&trk[i]) ? xr : 0u);
|
||||
}
|
||||
if (!g)
|
||||
return;
|
||||
for (i = 0; i < NTRK; i++) {
|
||||
|
||||
+15
-7
@@ -177,6 +177,8 @@ static struct {
|
||||
_Static_assert(RS_H >= UAC_FIR_N && (RS_H & (RS_H - 1u)) == 0 && UAC_FIR_N % 4u == 0u, "the history holds a window");
|
||||
static struct {
|
||||
int16_t l[2u * RS_H], r[2u * RS_H]; /* r right after l (the FIR loop reads both from one pointer) */
|
||||
int16_t bl[2u * RS_H], br[2u * RS_H]; /* (V10.8.60) the same history newest first (br right after bl): phases
|
||||
* 80 .. 159 read it forward with phase 159 - p's taps (rs_tab holds 80) */
|
||||
uint32_t w; /* input frames written */
|
||||
uint32_t ph; /* the next output's phase, 0..159 (its newest input frame: the next written) */
|
||||
#if FELUCCA_UAC_TONE
|
||||
@@ -186,7 +188,10 @@ static struct {
|
||||
/* (0.8.9) all 160 phases in RAM (the pool, built from the 80 in the flash the first time the ring primes at 48 kHz):
|
||||
* one forward loop, no flash reads (the table no longer pushes the render's code out of the cache), and core 1 can
|
||||
* run it outside the audio ISR, with the flash off */
|
||||
static int32_t rs_tab[UAC_FIR_L][UAC_FIR_N] __attribute__((section(".pool"))); /* (15 KiB) */
|
||||
static int32_t rs_tab[UAC_FIR_L / 2u][UAC_FIR_N] __attribute__((section(".pool"))); /* (V10.8.60, JIANT BYTE's
|
||||
* devcpu2: 7.5 KiB, the 80 phases: phase 159 - p is phase p
|
||||
* backwards, uac_rs_run reads it so; the other 7.5 KiB the RAM
|
||||
* code's) */
|
||||
static uint32_t rs_in[HALF_FRAMES] __attribute__((section(".pool"))); /* a half (CORES 2) or a block, 16-bit L | R */
|
||||
static struct {
|
||||
uint8_t c1; /* this stream resamples on core 1, a half at a time (chosen when it primes) */
|
||||
@@ -1245,15 +1250,14 @@ static void uac_rs_init(void) /* the resampler from si
|
||||
{
|
||||
uint32_t i, p;
|
||||
for (i = 0; i < 2u * RS_H; i++)
|
||||
rs.l[i] = rs.r[i] = 0;
|
||||
rs.l[i] = rs.r[i] = rs.bl[i] = rs.br[i] = 0;
|
||||
rs.w = rs.ph = 0;
|
||||
if (rs_tab[0][UAC_FIR_N / 2u - 1u]) /* (the pool is zeroed at boot) */
|
||||
return;
|
||||
for (i = 0; i < UAC_FIR_N; i++) { /* each tap along the phases: its differences summed back */
|
||||
int32_t x = UAC_FIR0[0][i], a = UAC_FIR0[1][i], b = UAC_FIR0[2][i], c = UAC_FIR3S[i];
|
||||
for (p = 0; p < UAC_FIR_L / 2u; p++) {
|
||||
rs_tab[p][i] = x;
|
||||
rs_tab[UAC_FIR_L - 1u - p][UAC_FIR_N - 1u - i] = x; /* (phase 159 - p: phase p backwards) */
|
||||
rs_tab[p][i] = x; /* (phase 159 - p: phase p backwards, read so) */
|
||||
x += a;
|
||||
a += b;
|
||||
if (p < UAC_FIR_L / 2u - 3u) {
|
||||
@@ -1339,14 +1343,18 @@ static UAC_C1_TEXT uint32_t uac_rs_run(const uint32_t *in, uint32_t n, uint32_t
|
||||
if (ph >= UAC_FIR_L) /* (core 1 may misread a word: never past the table) */
|
||||
ph = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
uint32_t f = in[i], s = h & (RS_H - 1u);
|
||||
uint32_t f = in[i], s = h & (RS_H - 1u), qn = RS_H - 1u - s;
|
||||
rs.l[s] = rs.l[s + RS_H] = (int16_t)f;
|
||||
rs.r[s] = rs.r[s + RS_H] = (int16_t)(f >> 16);
|
||||
rs.bl[qn] = rs.bl[qn + RS_H] = (int16_t)f; /* (V10.8.60: newest first from qn) */
|
||||
rs.br[qn] = rs.br[qn + RS_H] = (int16_t)(f >> 16);
|
||||
h++;
|
||||
s = (h - UAC_FIR_N) & (RS_H - 1u); /* the window: oldest .. this frame */
|
||||
do {
|
||||
const int16_t *x = &rs.l[s]; /* R: x[2 * RS_H] */
|
||||
const int32_t *c = rs_tab[ph];
|
||||
int b = ph >= UAC_FIR_L / 2u; /* (V10.8.60) 80 .. 159: 159 - ph's taps on the history newest
|
||||
* first (the same products, the same sums) */
|
||||
const int16_t *x = b ? &rs.bl[qn] : &rs.l[s]; /* R: x[2 * RS_H] */
|
||||
const int32_t *c = rs_tab[b ? UAC_FIR_L - 1u - ph : ph];
|
||||
int64_t al = 0, ar = 0;
|
||||
int32_t yl, yr;
|
||||
for (j = UAC_FIR_N / 4u; j; j--, x += 4, c += 4) {
|
||||
|
||||
+6
-4
@@ -775,6 +775,8 @@ static double rnd_x(int64_t i, void *ctx) /* input frame i: nois
|
||||
|
||||
/* (0.8.9) the 0.7 .. 0.8.8 resampler (uac_tap48's loop: 80 phases, 80..159 read backwards; the table's 80 phases
|
||||
* checked exactly above), the one the 160-phase RAM table and the four-tap loop must equal bit for bit */
|
||||
/* (V10.8.60) the table holds phases 0 .. 79; 159 - p is p backwards */
|
||||
#define RS_TAB(ph, j) ((ph) < UAC_FIR_L / 2u ? rs_tab[ph][j] : rs_tab[UAC_FIR_L - 1u - (ph)][UAC_FIR_N - 1u - (j)])
|
||||
static int16_t old_l[64], old_r[64];
|
||||
static uint32_t old_w, old_ph;
|
||||
static uint32_t old_block(const int32_t *in, uint32_t n, int32_t *l, int32_t *r)
|
||||
@@ -789,7 +791,7 @@ static uint32_t old_block(const int32_t *in, uint32_t n, int32_t *l, int32_t *r)
|
||||
do {
|
||||
int64_t al = 0, ar = 0;
|
||||
for (j = 0; j < UAC_FIR_N; j++) {
|
||||
int32_t c = ph < UAC_FIR_L / 2u ? rs_tab[ph][j] : rs_tab[UAC_FIR_L - 1u - ph][UAC_FIR_N - 1u - j];
|
||||
int32_t c = RS_TAB(ph, j);
|
||||
al += (int64_t)c * old_l[s + j];
|
||||
ar += (int64_t)c * old_r[s + j];
|
||||
}
|
||||
@@ -823,11 +825,11 @@ static void test_resampler(void)
|
||||
int64_t t = 0;
|
||||
for (k = 0; k < UAC_FIR_N; k++) {
|
||||
double want = H[i + RL * (RN - 1u - k)] * (1 << 30);
|
||||
t += rs_tab[i][k];
|
||||
if (fabs(rs_tab[i][k] - want) > 2e-5 * (1 << 30))
|
||||
t += RS_TAB(i, k);
|
||||
if (fabs(RS_TAB(i, k) - want) > 2e-5 * (1 << 30))
|
||||
tab_ok = 0;
|
||||
if (i < UAC_FIR_L / 2u)
|
||||
chk += (uint64_t)(i * UAC_FIR_N + k + 1u) * (uint64_t)(int64_t)rs_tab[i][k];
|
||||
chk += (uint64_t)(i * UAC_FIR_N + k + 1u) * (uint64_t)(int64_t)RS_TAB(i, k);
|
||||
}
|
||||
sum_ok &= t == (int64_t)1 << 30;
|
||||
}
|
||||
|
||||
+2286
-2296
File diff suppressed because it is too large.
Load diff
+1842
File diff suppressed because it is too large.
Load diff
+17
-2
@@ -39,7 +39,7 @@ import size_fns # noqa: E402
|
||||
APP_XIP = 0x02000120 # app.bin offset 0 in the XIP map; the SPL jumps here
|
||||
APP_SLOT = fm1pkg_make.APP_SLOT
|
||||
LOADER_LOAD = 0x01C0A800
|
||||
POOL_END = 0x01C6D800 # (JIANT 0.6.78) app.ld: POOL's end, RAMTEXT's start (0.6.97, 0.7.0: up 4 KiB each; 0.9.9-beta4: 9 KiB lower;
|
||||
POOL_END = 0x01C6BA00 # (V10.8.60: 7.5 KiB lower, usb.c rs_tab halved) (JIANT 0.6.78) app.ld: POOL's end, RAMTEXT's start (0.6.97, 0.7.0: up 4 KiB each; 0.9.9-beta4: 9 KiB lower;
|
||||
# 0.9.9-stab: 1 KiB lower, the 320 MHz switch's RAM code)
|
||||
RAMTEXT_END = 0x01C76000 # .. RAMTEXT's end (the user stack's guard band)
|
||||
LOADER_NAME = b"usb_hid_ota.bin" # the file name the SPL looks for
|
||||
@@ -198,6 +198,21 @@ HOT_FNS = ("mix_block", "mix_part_m0", "fx_run0", "perf_begin", "perf_pre", "per
|
||||
# in the flash for its room: both are called through a pointer, a key or a beat at a time) # (V10.7.65: the punch-in keys, packed)
|
||||
|
||||
|
||||
# (V10.8.60, technique from JIANT BYTE byte-cpu-light) more of the sound's per-block code in RAM, in the room the USB
|
||||
# resampler's halved table gave (usb.c rs_tab, app.ld RAMTEXT 7.5 KiB lower): the FM-1's time a block goes by the 32-byte
|
||||
# lines of the flash the sound reads (~1.25 us each, the I-cache shared by both cores and the UI), not its instructions
|
||||
# (tests/cpu_lines_test.py, the lines model, tools/audio_map.txt). Placed first in .hot_text (app.ld .hot_text.lo.*),
|
||||
# the lowest of the RAM code, so what was there stays where it was
|
||||
HOT_LO = (
|
||||
# a voice's block, every engine's (its envelopes, glide, pitch, the matrix's call, the render's), both cores
|
||||
"voice_block",
|
||||
# the matrix's block and a voice's routes, every part's; a part's FILTER (tf_run); the parts' split (mc_split) and
|
||||
# core 1's join; the DRUM parts' sides (DRUM-X's every block); the macros' master; the buses' tone; the leveler
|
||||
"mod_begin", "mod_voice", "tf_run", "mc_split", "mc_join", "drum_side_begin", "macro_master", "tone_set",
|
||||
"lev_block")
|
||||
HOT_FNS = HOT_FNS + HOT_LO
|
||||
|
||||
|
||||
def share_strings(ir, keep=()):
|
||||
"""(V10.7.21) a string literal or a compound literal (a preset's MODS list ..) whose bytes sit whole inside another
|
||||
constant byte array (most often its tail: "BASS" in "PEDAL BASS", "OFF" in a packed name table) or equal one becomes
|
||||
@@ -301,7 +316,7 @@ def hot_sections(ir):
|
||||
def put(m):
|
||||
nonlocal found
|
||||
found += 1
|
||||
return f'{m.group(1)} section ".hot_text.{m.group(2)}" {{'
|
||||
return f'{m.group(1)} section ".hot_text.{"lo." if m.group(2) in HOT_LO else ""}{m.group(2)}" {{'
|
||||
ir = re.sub(r"^(define [^\n]*?@(" + "|".join(HOT_FNS) + r")\([^\n]*?)\s*\{$", put, ir, flags=re.M)
|
||||
return ir, found
|
||||
|
||||
|
||||
Reference in new issue
Block a user