P4: lock PRNG prologue + correct constants (DAT_*=1); scale via prng_fvar30

CRITICAL fix: soothe_mem.bin is VA-linear (offset=RVA). DAT_18262b5c8/b704/b700
are INT 1 (cvtdq2ps -> 1.0), NOT the 0.4552/0.6089/0.6070 read earlier via a bad
section offset. Transcribed FUN_180529fe0 PRNG prologue into prng_fvar30():
fVar30=(int)(LUT[s+1]*LUT[s]+0.001). At live state 112 this is deterministically
1.0 over 300 frames, so scale level *= (1/2048)*440.95 is not randomized in
practice. Scale coefficient now computed structurally; t1kq unchanged -0.43 dB.
This commit is contained in:
2026-08-20 16:14:50 +03:00
parent f1f06765f7
commit ddf2ac2050
3 changed files with 62 additions and 1 deletions
+21
View File
@@ -884,3 +884,24 @@ exact LCG sequence per frame. scale already calibrated (t1kq -0.43 dB).
4. combine/accumulator (0x5407c8) exact feedback (1500Hz comb err +6.4 dB)
5. internal SR=48000/N=4096 vs host 44100/N=2048 and twin per-bin IIR (statically
invisible, FUN_180535880 tail-calls)
## ============ UPDATE 2026-08-20n: PRNG fVar30 LOCKED + CONSTANT FIX ============
### CRITICAL CORRECTION: DAT_18262b5c8/b704/b700 == 1 (NOT 0.4552/0.6089/0.6070)
soothe_mem.bin is a VA-linear dump: file offset = RVA = VA - 0x180000000.
Earlier 0.4552/0.6089/0.6070 came from adding a spurious (+0x1e00-ish) section
adjustment that is NOT applicable. Verified at raw=RVA=0x262b5c8/b704/b700:
bytes 01 00 00 00 => int 1. Code does cvtdq2ps => (float)1 = 1.0. All three = 1.
Verified constants at raw=RVA: 0x24c3c58=0.001, 0x24c3e28=0.8, 0x24c4674=-0.7,
0x24c4670=-0.5 (match NOTES).
### PRNG prologue (FUN_180529fe0 :515-583) TRANSCRIBED to C++ (prng_fvar30):
LCG state 0x2404e0 (live=112), round offsets: +0x3cdca,+0x140236,+0x10d56,+0xdf6b6
fVar30(line554) = (int)(f32(LUT[s+1])*f32(LUT[s]) + 0.001f) [b5c8=b704=1]
=> at live state 112, fVar30 == 1.0 deterministically over 300 frames.
=> scale step: level *= (fVar30/0x1a0)*0x540870*0x54088c = /2048*440.95*1.0.
scale is NOT effectively randomized for this LUT/state.
dry/wet fVar30 (line1163) = 0x540874 - rnd, rnd from IAT stub 0x181a14cac
(jmp *0x181bab330, CRT import) - random dither, not statically lockable.
### framed_model.cpp: scale coeff now computed via prng_fvar30() (prng_state_=112),
not a hardcoded constant. t1kq still -0.43 dB at level_scale=600 (unchanged).