chore: FFT giants, factor tables, spectral class map, block-processor chain
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
import ghidra.app.script.GhidraScript;
|
||||||
|
import ghidra.program.model.listing.Function;
|
||||||
|
import ghidra.program.model.listing.FunctionIterator;
|
||||||
|
import ghidra.util.task.TaskMonitor;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
public class ListFuns extends GhidraScript {
|
||||||
|
@Override
|
||||||
|
public void run() throws Exception {
|
||||||
|
FunctionIterator it = currentProgram.getFunctionManager().getFunctions(true);
|
||||||
|
PrintWriter pw = new PrintWriter(new java.io.BufferedWriter(
|
||||||
|
new java.io.FileWriter("/home/m/re-tools/funs_range.txt")));
|
||||||
|
long lo = 0x180500000L, hi = 0x180530000L;
|
||||||
|
while (it.hasNext()) {
|
||||||
|
Function f = it.next();
|
||||||
|
long off = f.getEntryPoint().getOffset();
|
||||||
|
if (off >= lo && off <= hi) {
|
||||||
|
int n = 0;
|
||||||
|
try { n = (int)f.getBody().getNumAddresses(); } catch (Exception e) {}
|
||||||
|
pw.println(Long.toHexString(off) + " " + n + " " + f.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pw.close();
|
||||||
|
println("LISTFUNS_DONE");
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
-2
@@ -8,7 +8,7 @@ import java.io.PrintWriter;
|
|||||||
public class SearchRefs extends GhidraScript {
|
public class SearchRefs extends GhidraScript {
|
||||||
@Override
|
@Override
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
String[] targets = {"180008140","180039aa0","181c5cd10","18003f1a0","18003f600"};
|
String[] targets = {"180008140","180039b00","18003a2a0","18003b6c0","180034280","18003f1a0","18003f600","1800356f0","18052e130","18052df60"};
|
||||||
AddressSpace as = currentProgram.getAddressFactory().getDefaultAddressSpace();
|
AddressSpace as = currentProgram.getAddressFactory().getDefaultAddressSpace();
|
||||||
PrintWriter pw = new PrintWriter(new java.io.BufferedWriter(
|
PrintWriter pw = new PrintWriter(new java.io.BufferedWriter(
|
||||||
new java.io.FileWriter("/home/m/re-tools/xrefs.txt")));
|
new java.io.FileWriter("/home/m/re-tools/xrefs.txt")));
|
||||||
@@ -18,7 +18,7 @@ public class SearchRefs extends GhidraScript {
|
|||||||
pw.println("### TARGET " + ts);
|
pw.println("### TARGET " + ts);
|
||||||
ReferenceIterator it = currentProgram.getReferenceManager().getReferencesTo(t);
|
ReferenceIterator it = currentProgram.getReferenceManager().getReferencesTo(t);
|
||||||
int n=0;
|
int n=0;
|
||||||
while (it.hasNext() && n<200) {
|
while (it.hasNext() && n<300) {
|
||||||
Reference r = it.next();
|
Reference r = it.next();
|
||||||
pw.println(" from " + r.getFromAddress() + " type=" + r.getReferenceType());
|
pw.println(" from " + r.getFromAddress() + " type=" + r.getReferenceType());
|
||||||
n++;
|
n++;
|
||||||
|
|||||||
+120
-872
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
|||||||
|
180536f90,180535880,18052da00,18052d990,18052da70
|
||||||
+1051
File diff suppressed because it is too large
Load Diff
+1339
File diff suppressed because it is too large
Load Diff
+26
@@ -121,3 +121,29 @@
|
|||||||
в 18052*/18053* или через трассировку вызовов от `processBlock` спектрального процессора.
|
в 18052*/18053* или через трассировку вызовов от `processBlock` спектрального процессора.
|
||||||
2. Окна/oversample детали — из декомпиляции (A.6) или требуется доп. замеры.
|
2. Окна/oversample детали — из декомпиляции (A.6) или требуется доп. замеры.
|
||||||
3. Стерео-верификация (M8) — приоритет mono-путь или сразу стерео-граф.
|
3. Стерео-верификация (M8) — приоритет mono-путь или сразу стерео-граф.
|
||||||
|
|
||||||
|
## Phase A progress update (recap)
|
||||||
|
|
||||||
|
### FFT transform (found)
|
||||||
|
- **Recursive FFT planners ("giants")**: 7 monolith funcs (~14.4K each) = type variants:
|
||||||
|
18001f260, 1800246e0, 18002f980, 180029ca0, 180035980, 18003b900, 18004ff80
|
||||||
|
Recurse on `log2 - factor` with `param_5+1` depth; build stage plan in `param_1+0x78` array.
|
||||||
|
- **Factor tables** (int, index=log2): `DAT_181c5e0fc` (small=4/8/9/13), `DAT_181c5e15c`,
|
||||||
|
`DAT_181c5e3fc` (nonzero => use giant path in FUN_18003b6c0).
|
||||||
|
- **FUN_18003b6c0** (bit-reverse+plan, N big): if `DAT_181c5e3fc[log2]!=0` call giant `FUN_18003b900`,
|
||||||
|
else small plan via DAT_181c5e4e0 XOR mask permute.
|
||||||
|
- **Base small FFT**: `FUN_18002e360` (radix2/3), `FUN_180023860` (float variant).
|
||||||
|
- **Twiddle**: copied from static base `DAT_182616800` into scratch by `FUN_180039b00`.
|
||||||
|
- **Spec init FUN_180008140** (from dispatch table `182615ef0`): builds plan; dispatch-only callers.
|
||||||
|
- Giants/planners = integer address gen (no float math) => executors are separate (dispatch kernels).
|
||||||
|
|
||||||
|
### Spectral layer located (named C++ classes via RTTI):
|
||||||
|
- `SpectralProcessor<float,7,1>` vtbl @180529610 (1154) + methods around 180529xxx/18052exxx.
|
||||||
|
- `Soothe2Module<float,1>`, `Soothe2ModuleBase`, `IIRFilterExtended<float,1>`, ModuleDecryptor.
|
||||||
|
- range 0x180500000-0x180530000 listed (1051 fns) -> funs_range.txt overwritten.
|
||||||
|
|
||||||
|
### Block processor chain (audio->out):
|
||||||
|
- `FUN_18052e260(param_1, n)` : reads det? calls **FUN_180536300(param_1+0x3d8, in, out, det, n)**
|
||||||
|
- `FUN_180536300` (475): normalize `DAT_1824c4248/(freq)`, FUN_18052da00/db50/d990/dbc0 (smoothing),
|
||||||
|
FUN_180535880, FUN_180536f90 (249, detector update via dispatch).
|
||||||
|
- Param setup fns: FUN_18052e9b0 (3167), FUN_180529fe0 (2051) — float math on params (DAT_18262b700 block-sizes etc.).
|
||||||
|
|||||||
@@ -1,17 +1,42 @@
|
|||||||
### TARGET 180008140
|
### TARGET 180008140
|
||||||
from 18267c6d8 type=DATA
|
from 18267c6d8 type=DATA
|
||||||
from 182615ef0 type=DATA
|
from 182615ef0 type=DATA
|
||||||
### TARGET 180039aa0
|
### TARGET 180039b00
|
||||||
from 18267d674 type=DATA
|
from 18267d680 type=DATA
|
||||||
from 1800081ac type=UNCONDITIONAL_CALL
|
from 18258be04 type=DATA
|
||||||
from 18001474c type=UNCONDITIONAL_CALL
|
from 18258be14 type=DATA
|
||||||
### TARGET 181c5cd10
|
from 18000832e type=UNCONDITIONAL_CALL
|
||||||
from 1800081ed type=READ
|
### TARGET 18003a2a0
|
||||||
from 18000822c type=READ
|
from 18267d6a4 type=DATA
|
||||||
from 1800082a1 type=READ
|
from 180008363 type=UNCONDITIONAL_CALL
|
||||||
|
from 18003b730 type=UNCONDITIONAL_CALL
|
||||||
|
from 18003f165 type=UNCONDITIONAL_CALL
|
||||||
|
### TARGET 18003b6c0
|
||||||
|
from 18267d6d4 type=DATA
|
||||||
|
from 18000839b type=UNCONDITIONAL_CALL
|
||||||
|
### TARGET 180034280
|
||||||
|
from 18000804e type=UNCONDITIONAL_CALL
|
||||||
|
from 180035787 type=UNCONDITIONAL_CALL
|
||||||
|
from 18000834e type=UNCONDITIONAL_CALL
|
||||||
|
from 18003b707 type=UNCONDITIONAL_CALL
|
||||||
|
from 1800145f2 type=UNCONDITIONAL_CALL
|
||||||
|
from 1800682a7 type=UNCONDITIONAL_CALL
|
||||||
|
from 1800148f2 type=UNCONDITIONAL_CALL
|
||||||
|
from 18006ee67 type=UNCONDITIONAL_CALL
|
||||||
### TARGET 18003f1a0
|
### TARGET 18003f1a0
|
||||||
from 18267d6ec type=DATA
|
from 18267d6ec type=DATA
|
||||||
from 1800083b1 type=UNCONDITIONAL_CALL
|
from 1800083b1 type=UNCONDITIONAL_CALL
|
||||||
### TARGET 18003f600
|
### TARGET 18003f600
|
||||||
from 18267d6f8 type=DATA
|
from 18267d6f8 type=DATA
|
||||||
from 1800083c7 type=UNCONDITIONAL_CALL
|
from 1800083c7 type=UNCONDITIONAL_CALL
|
||||||
|
### TARGET 1800356f0
|
||||||
|
from 18267d62c type=DATA
|
||||||
|
from 18258bdc8 type=DATA
|
||||||
|
from 180034370 type=CONDITIONAL_JUMP
|
||||||
|
### TARGET 18052e130
|
||||||
|
from 18269df3c type=DATA
|
||||||
|
from 18052970d type=UNCONDITIONAL_CALL
|
||||||
|
from 180530828 type=UNCONDITIONAL_CALL
|
||||||
|
### TARGET 18052df60
|
||||||
|
from 18269df30 type=DATA
|
||||||
|
from 180529a01 type=UNCONDITIONAL_CALL
|
||||||
|
|||||||
Reference in New Issue
Block a user