Compare commits

...
23 Commits
Author SHA1 Message Date
Patryk GenschandClaude Opus 5.5 96c39d542a data: re-extract 34 engine builds with per-type fields and Piklib 6.1 ids (schema 7)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:29:24 +02:00
Patryk GenschandClaude Opus 5.5 b16c8ecf33 docs: generated emulator roadmap and schema 7 results
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:29:24 +02:00
Patryk GenschandClaude Opus 5.5 d6d6010f4e fix(extractor): keep every Piklib 6.1 name and read ids of unoptimised builds
getMethodId ids are now completed by run(CXString) names instead of
replacing them, so a partial parse never drops methods. Pinokio's
unoptimised build stores the id into a stack local, which the register-
only and no-reference filters rejected (225 -> 103 methods).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:03:10 +02:00
Patryk GenschandClaude Opus 5.5 95ad4edb5c feat: ams.roadmap renders the emulator's gaps per scope from an Atlas export
Methods without a registration (with the original signature), emulator
stubs, and events/properties the emulator never names, each with the
engine families whose DLLs have it so core API sorts before late ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:35:42 +02:00
Patryk GenschandClaude Opus 5.5 835cd4f729 feat: Piklib 6.1 method ids, name dispatch and signatures
Later 6.1 builds give every runner getMethodId(CXString); its
equalsIgnoreCase chain now yields name -> id, so their run(int) switch
rows join to names. Runners without a switch (earliest 6.1) get rows
from run(CXString) by name, joined by name in the tracker. Method facts
run for 6.1 too, with its ABI: run(int, CXVector*), methods as runner
members taking only the params, and new CMC_<T> as the result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:34:33 +02:00
Patryk GenschandClaude Opus 5.5 aee8f17417 feat: type_fields in diff and tracker, joined with emulator property reads
The tracker lists each scope's original properties (constructor chain,
or class fields up the chain for Piklib 6.1 and singletons such as
SCENE) and where the emulator reads them: a CNVParser.createVariable
case arm, an attribute read in the type's class or Variable.java, or
other code. The switch-arm parser is shared with the @ statements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:30:36 +02:00
Patryk GenschandClaude Opus 5.5 9d5a600d6b feat(extractor): properties per script type along the constructor chain
type_fields walks each type's factory constructor through its base
constructors, base first, so unnamed classes get their properties
(VECTOR VALUE/SIZE, FILTER ACTION, PATH NODES, MOVIE FILENAME/POSITION)
and INTEGER/STRING inherit CMC_Variable's TOINI/NETNOTIFY. Property
names come only from pushed or register-loaded literals: a vftable store
whose bytes look printable produced BlooMoo's X5/Gs field names. Schema 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:30:36 +02:00
Patryk GenschandClaude Opus 5.5 6217fde83c data: re-extract 34 engine builds with per-type events (schema 6)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:14:57 +02:00
Patryk GenschandClaude Opus 5.5 597733d8d7 feat: type_events in diff and tracker, joined with emulator signal literals
Diff gains a type_events axis keyed by (script type, event). The tracker
lists each type's original events (vftable list, or the nearest class
list up the constructor chain for Piklib 6.1) and where the emulator names
them: the type's class, Variable.java or other engine code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:49:26 +02:00
Patryk GenschandClaude Opus 5.5 cb03de47ac feat(extractor): events per script type through the type's vftable
type_events reads getBehavioursList from each type's own vftable, so
unnamed classes (FILTER, FIFO/LIFO, MOVIE) get their events and
INTEGER/STRING/... resolve to CMC_Variable's list without guessing. The
slot is voted by same-class overrides because the folded base body
carries unrelated labels. Type vftables are recorded for every engine.
Schema 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:49:26 +02:00
Patryk GenschandClaude Opus 5.5 f85e2a14ef data: re-extract 34 engine builds with runner_map and method facts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:30:42 +02:00
Patryk GenschandClaude Opus 5.5 a3a572c9db fix(tracker): sanitize the Behaviour factory misparse before 6.1 mapping
Pinokio's 6.1 factory parse attributes every type to CMC_Behaviour; the
constructor-runner walk ran before that known failure was discarded and
gave INTEGER the BEHAVIOUR runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:30:42 +02:00
Patryk GenschandClaude Opus 5.5 f8178a08f3 docs: runner_map and method facts; tools/ghidra_probe.py for fast iteration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:01:41 +02:00
Patryk GenschandClaude Opus 5.5 11f4b6fc37 feat: map Piklib 6.1 types through constructor-created runners
Piklib 6.1 predates CMC_RunnerFactory; each class constructor creates its
own runner. The extractor records class -> runner from those call sites
(runner_map.by_class) and the tracker walks the snapshot's constructor
chain from a type's class to the nearest one creating a runner, so 6.1
variable and condition types no longer fall into pseudo-types either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:59:58 +02:00
Patryk GenschandClaude Opus 5.5 edae0929d7 feat(tracker): signatures and per-type validity from method facts
Original entries carry the signature read from the method body and the
per-type verdict of shared runners: a method the original skips for a
type via obj.getType() is no longer attributed to it, and a trivial
virtual is flagged as a no-op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:56:20 +02:00
Patryk GenschandClaude Opus 5.5 5f3006cdf0 feat(extractor): method signatures and per-type validity from P-code
Each dispatch row now records the argument types a method reads through
CMC_Runner::getParameter*, the CMC_VariableFactory allocator its result
comes from, the virtuals it calls on the object and the type ids it
branches on. Runner helpers are followed with roles bound by storage,
since MSVC8 bodies without a signature drop an unused this.

For runners several script types share, per_type says whether a method
applies to each type: only an explicit obj.getType() branch excludes one,
and trivial vftable entries mark a no-op. Types record their vftable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:55:12 +02:00
Patryk GenschandClaude Opus 5.5 87fcefa877 feat(tracker): map script types through runner_map
Types follow CMC_RunnerFactory when the snapshot has it, so the shared
variable runner no longer forms a VARIABLE pseudo-type. Base CMC_Runner
verbs are listed once under * and referenced via inherits; type 0 becomes
the @ scope, matched against CodeParser.dispatchSpecialCall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:37:17 +02:00
Patryk GenschandClaude Opus 5.5 5c597a3a52 feat(extractor): runner_map axis from CMC_RunnerFactory
Script dispatch is getRunner(obj.getType())->run(id), so map type ids to
runners instead of guessing runner names from C++ classes. Type ids come
from the base-constructor argument, the map from emulating getRunner, and
runner vtables from RunnerFactory::initialize; vtable slots are read off
the labelled CMC_Runner vftable because they move between releases.

This recovers runners without symbols (VECTOR, FILTER, STATICFILTER,
PATH, FIFO/LIFO, MOVIE and the @ built-ins of type 0) and lets several
script types share one runner (INTEGER/STRING/BOOL/DOUBLE/EXPRESSION).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:37:17 +02:00
Patryk GenschandClaude Opus 5.5 3132a5222a data: snapshots of 34 engine builds and WORLD/KOLOROWANKA evidence
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:24:15 +02:00
Patryk GenschandClaude Opus 5.5 0796924f6d feat(compat): keep game aliases and library names from batch snapshots
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:24:15 +02:00
Patryk GenschandClaude Opus 5.5 10c81c4390 feat(tracker): Atlas joining DLL snapshots with emulator registrations
Matches original script APIs against MethodSpec registrations in
Rex-EMoolator and keeps review evidence separate from registration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:24:15 +02:00
Patryk GenschandClaude Opus 5.5 b0013c5114 feat(acquire): resumable batch extraction queue and binary inventory
Inventory classifies the DLL repository by SHA; the batch queue runs each
engine build in a fresh PyGhidra process with a timeout, fingerprints the
extractor environment and keeps per-attempt state and logs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:24:15 +02:00
Patryk GenschandClaude Opus 5.5 bddb5949a6 fix(extractor): read registration literals from raw bytes first
Analyzer-typed string data can split short or overlapping literals; the
operand points at the literal start, so trust the bytes and require a
terminator within the bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:24:15 +02:00
324 changed files with 990260 additions and 73 deletions
+4
View File
@@ -12,6 +12,7 @@
__pycache__/ __pycache__/
*.pyc *.pyc
.venv/ .venv/
.venv-ghidra/
*.egg-info/ *.egg-info/
# macOS # macOS
@@ -19,3 +20,6 @@ __pycache__/
# Local SQLite catalog DB # Local SQLite catalog DB
*.db *.db
# Batch queue writer lock (runtime only)
.queue.lock
+22 -6
View File
@@ -1,5 +1,13 @@
# aidem_media_playground # aidem_media_playground
**[Atlas API — tracker implementacji emulatora i dowodów](docs/tracker.md)**,
dostępny pod `/ui/tracker.html`. [Kolejka ekstrakcji silników](docs/batch.md),
statyczne dowody pluginów: [WORLD](docs/world-analysis.md), [KOLOROWANKA](docs/kolorowanka-pilot.md).
```sh
.venv/bin/python -m ams.serve_tracker --emulator-root /Users/genszu/IdeaProjects/Rex-EMoolator
```
Narzędzie do **analizy różnicowej** silników gier Aidem Media (Piklib / BlooMoo). Narzędzie do **analizy różnicowej** silników gier Aidem Media (Piklib / BlooMoo).
Cel: katalog gier (z ISO/ZIP), wersje silnika z hashami, oraz ekstrakcja i porównywanie Cel: katalog gier (z ISO/ZIP), wersje silnika z hashami, oraz ekstrakcja i porównywanie
"powierzchni silnika" — typów, metod, eventów i pól klas `CMC_*` — między wersjami. "powierzchni silnika" — typów, metod, eventów i pól klas `CMC_*` — między wersjami.
@@ -96,17 +104,20 @@ potem zaimportuj go przez `python -m ams.api.importer …`.
## Zasada ekstrakcji ## Zasada ekstrakcji
Ekstrakcja stoi na **kotwicach semantycznych** (cele wywołań, referowane literały Ekstrakcja stoi na **kotwicach semantycznych** (cele wywołań, referowane literały
stringów, immediaty `PUSH`), a **nie** na tekście dekompilatu. Dzięki temu jeden skrypt stringów, immediaty `PUSH`, sloty vtable), a **nie** na tekście dekompilatu. Dzięki temu jeden
działa na MSVC6 (Piklib) i MSVC8 (BlooMoo) mimo różnego kodu wynikowego. skrypt działa na MSVC6 (Piklib) i MSVC8 (BlooMoo) mimo różnego kodu wynikowego. Nazwy funkcji
bywają aliasami (ICF skleja identyczne ciała), więc liczy się adres i każda etykieta pod nim.
| Co | Kotwica w Ghidrze | Status | | Co | Kotwica w Ghidrze | Status |
|----|-------------------|--------| |----|-------------------|--------|
| Typy | `CMC_ObjectsContainer::resolve` (8.x/BlooMoo) lub `CMC_Scene::resolve` (Piklib 6.1/7.1): `operator==("NAME")` → `operator_new(SIZE)` → ctor | ✅ (8.x inline; 6.1 tag-based = nazwy bez ctora) | | Typy | `CMC_ObjectsContainer::resolve` (8.x/BlooMoo) lub `CMC_Scene::resolve` (Piklib 6.1/7.1): `operator==("NAME")` → `operator_new(SIZE)` → ctor | ✅ (8.x inline; 6.1 tag-based = nazwy bez ctora) |
| Metody | `CMC_*_Runner::prepareMthHashSet`: `CInteger(id)` + `CStringHashCode("NAME")` + `CHashtable::put` | ✅ (+ `method_inheritance`) | | Metody | `CMC_*_Runner::prepareMthHashSet`: `CInteger(id)` + `CStringHashCode("NAME")` + `CHashtable::put`; Piklib 6.1: `getMethodId(CXString)` (nazwa → ID) uzupełnione nazwami porównywanymi w `run(CXString)` | ✅ (+ `method_inheritance`) |
| Eventy | `CMC_*::getBehavioursList`: lista literałów `CXString` | ✅ (lista per klasa, bez dziedziczenia) | | Eventy | `CMC_*::getBehavioursList`: lista literałów `CXString` | ✅ per klasa (`events`) i per typ (`type_events`: slot `getBehavioursList` z vtable typu, także klasy bez symboli) |
| Pola (skryptowe) | ctory `CMC_*`: literały czytane przez `CMElement::getProperty<T>Value` → nazwa + typ pola (FPS, PRELOAD, VISIBLE…) | ✅ (+ `field_inheritance`) | | Pola (skryptowe) | ctory `CMC_*`: literały czytane przez `CMElement::getProperty<T>Value` → nazwa + typ pola (FPS, PRELOAD, VISIBLE…) | ✅ per klasa (`fields` + `field_inheritance`) i per typ (`type_fields`: łańcuch konstruktorów od konstruktora z fabryki, także klasy bez symboli) |
| Layout C++ (bonus) | ctory `CMC_*`: store'y `this+offset` przez P-code (rozmyte, `is_vtable`) | ✅ pod `struct_layout` | | Layout C++ (bonus) | ctory `CMC_*`: store'y `this+offset` przez P-code (rozmyte, `is_vtable`) | ✅ pod `struct_layout` |
| Ciała metod | `CMC_*_Runner::run`: `switch(id)` (vtable slot 17) → per case kotwice CALL (`Klasa::metoda` / `vtbl+0xNN`), rozwinięcie wrapperów | ✅ pod `method_dispatch` (id→`impl_addr`+`calls`) | | Ciała metod | `CMC_*_Runner::run`: `switch(id)` → per case kotwice CALL (`Klasa::metoda` / `vtbl+0xNN`), rozwinięcie wrapperów; najstarszy 6.1 bez `switch`: dopasowania nazw w `run(CXString)` (`dispatch: name`) | ✅ pod `method_dispatch` (id→`impl_addr`+`calls`) |
| Typ → runner | 7.1+/BlooMoo: emulacja `CMC_RunnerFactory::getRunner(typeId)`, `typeId` z konstruktora typu, vtable runnerów z `RunnerFactory::initialize` (także runnery bez symboli: VECTOR, FILTER, PATH, FIFO/LIFO, MOVIE, instrukcje `@`). 6.1: konstruktor klasy tworzący runner | ✅ pod `runner_map` |
| Sygnatury, ważność per typ | P-code case'ów i pomocników: `CMC_Runner::getParameter*` (typy argumentów), `CMC_VariableFactory::alloc*` (wynik), wirtualne obiektu, gałęzie na `obj.getType()` | ✅ w `method_dispatch` (`params`/`returns`/`per_type`) |
## Uruchomienie ekstraktora ## Uruchomienie ekstraktora
@@ -114,6 +125,9 @@ działa na MSVC6 (Piklib) i MSVC8 (BlooMoo) mimo różnego kodu wynikowego.
do swojego katalogu skryptów (Script Manager → *Manage Script Directories*), otwórz program, do swojego katalogu skryptów (Script Manager → *Manage Script Directories*), otwórz program,
uruchom skrypt. Wynik trafi do `<NazwaProgramu>.snapshot.json` w katalogu roboczym Ghidry. uruchom skrypt. Wynik trafi do `<NazwaProgramu>.snapshot.json` w katalogu roboczym Ghidry.
**Szybka pętla** (projekt przeanalizowany raz, kolejne uruchomienia w sekundach):
`tools/ghidra_probe.py --project DIR DLL --extract out.json` albo `--snippet probe.py`.
**Headless** (tryb docelowy): **Headless** (tryb docelowy):
```bash ```bash
analyzeHeadless <projDir> <projName> -process PIKLIB8.dll \ analyzeHeadless <projDir> <projName> -process PIKLIB8.dll \
@@ -262,3 +276,5 @@ A/B i odpalający porównanie).
`schema_version`, `binary{name,sha256,engine,compiler,factory_addr}`, oraz listy `schema_version`, `binary{name,sha256,engine,compiler,factory_addr}`, oraz listy
`types` / `methods` / `events` / `fields`. Diff = operacje na zbiorach dwóch snapshotów. `types` / `methods` / `events` / `fields`. Diff = operacje na zbiorach dwóch snapshotów.
Od wersji 5: `runner_map` (`by_type_id` / `by_class`, sloty `CMC_Runner`), `types[].type_id`
i `vftable`, a w `method_dispatch` fakty z ciała metody. Od wersji 6: `type_events`, od 7: `type_fields`.
+253
View File
@@ -0,0 +1,253 @@
"""Resumable, SHA-addressed engine extraction queue (POSIX)."""
from __future__ import annotations
import argparse
from contextlib import contextmanager
from datetime import datetime, timezone
import fcntl
import hashlib
from importlib import metadata
import json
import os
from pathlib import Path
import re
import signal
import subprocess
import sys
import uuid
def digest(path):
h = hashlib.sha256()
with Path(path).open('rb') as stream:
for chunk in iter(lambda: stream.read(1024 * 1024), b''):
h.update(chunk)
return h.hexdigest()
def fingerprint(env=None):
from . import ghidra
env = os.environ if env is None else env
root = Path(__file__).resolve().parents[2]
scripts = Path(env.get('AMS_GHIDRA_SCRIPTS', root / 'ghidra_scripts'))
paths = [Path(__file__), Path(ghidra.__file__), *sorted(scripts.glob('*.py'))]
h = hashlib.sha256()
for path in paths:
h.update(path.name.encode())
h.update(path.read_bytes())
h.update(json.dumps(provider_profile(env), sort_keys=True).encode())
return h.hexdigest()
def provider_profile(env):
provider = 'pyghidra' if env.get('AMS_USE_PYGHIDRA') else 'headless'
home = env.get('GHIDRA_INSTALL_DIR') or env.get('GHIDRA_HOME')
launcher = env.get('GHIDRA_HEADLESS')
if provider == 'headless' and launcher:
home = str(Path(launcher).resolve().parent.parent)
elif provider == 'headless' and not home:
import shutil
launcher = shutil.which('analyzeHeadless', path=env.get('PATH'))
if launcher:
home = str(Path(launcher).resolve().parent.parent)
properties = Path(home) / 'Ghidra' / 'application.properties' if home else None
try:
pyghidra_version = metadata.version('pyghidra')
except metadata.PackageNotFoundError:
pyghidra_version = None
return {'provider': provider, 'ghidra_home': str(Path(home).resolve()) if home else None,
'launcher': launcher, 'pyghidra_version': pyghidra_version,
'application_properties': properties.read_text() if properties and properties.is_file() else None,
'python': sys.version, 'java_home': env.get('JAVA_HOME')}
def atomic_json(path, data):
temp = path.with_name(path.name + '.' + uuid.uuid4().hex + '.tmp')
try:
temp.write_text(json.dumps(data, ensure_ascii=False, indent=2) + '\n')
os.replace(temp, path)
finally:
temp.unlink(missing_ok=True)
def validate_snapshot(path, sha):
data = json.loads(path.read_text())
if not isinstance(data, dict) or not isinstance(data.get('binary'), dict):
raise ValueError('Snapshot has no binary identity')
snapshot_sha = data['binary'].get('sha256')
if not isinstance(snapshot_sha, str) or snapshot_sha.lower() != sha:
raise ValueError('Snapshot SHA does not match manifest')
if not isinstance(data.get('types'), list) or not data['types']:
raise ValueError('Snapshot has no extracted types')
if not isinstance(data.get('methods'), list) or not data['methods']:
raise ValueError('Snapshot has no extracted methods')
return data
@contextmanager
def queue_lock(directory):
with (directory / '.queue.lock').open('a') as stream:
try:
fcntl.flock(stream, fcntl.LOCK_EX | fcntl.LOCK_NB)
except BlockingIOError:
raise RuntimeError('Another extraction queue is using this output directory')
try:
yield
finally:
fcntl.flock(stream, fcntl.LOCK_UN)
def execute_worker(source, output, log, timeout, env):
with log.open('wb') as stream:
process = subprocess.Popen(
[sys.executable, '-m', 'ams.acquire.batch', '--worker', str(source), str(output)],
stdout=stream, stderr=subprocess.STDOUT, env=env, start_new_session=True)
try:
code = process.wait(timeout=timeout)
except BaseException:
try:
os.killpg(process.pid, signal.SIGKILL)
except ProcessLookupError:
pass
process.wait()
raise
if code:
raise RuntimeError('Extractor exited with code ' + str(code))
def run_queue(manifest, out_dir, *, ghidra_home=None, timeout=1800, limit=None,
retry_failed=False, worker=execute_worker):
if timeout <= 0 or (limit is not None and limit < 0):
raise ValueError('Timeout must be positive; limit must be nonnegative')
data = json.loads(Path(manifest).read_text())
if data.get('schema') != 'binary-inventory/1':
raise ValueError('Expected binary-inventory/1 manifest')
builds = data['builds']
seen = set()
for build in builds:
sha = build['sha256']
if not isinstance(sha, str) or not re.fullmatch('[0-9a-f]{64}', sha) or sha in seen:
raise ValueError('Invalid or duplicate manifest SHA: ' + str(sha))
seen.add(sha)
out_dir = Path(out_dir).resolve()
out_dir.mkdir(parents=True, exist_ok=True)
with queue_lock(out_dir):
return _run(builds, out_dir, ghidra_home, timeout, limit, retry_failed, worker)
def _run(builds, directory, ghidra_home, timeout, limit, retry_failed, worker):
for name in ('states', 'logs'):
(directory / name).mkdir(exist_ok=True)
env = dict(os.environ)
if ghidra_home:
env.update(GHIDRA_INSTALL_DIR=str(ghidra_home), GHIDRA_HOME=str(ghidra_home), AMS_USE_PYGHIDRA='1')
extractor = fingerprint(env)
profile = provider_profile(env)
report = {'schema': 'extraction-batch/1', 'attempted': 0, 'succeeded': 0,
'pending': 0, 'skipped_success': 0, 'skipped_failed': 0, 'skipped_scope': 0, 'failures': []}
for build in builds:
if build.get('scope') != 'engine':
report['skipped_scope'] += 1
continue
sha = build['sha256']
state_path = directory / 'states' / (sha + '.json')
output = directory / (sha + '.snapshot.json')
old = json.loads(state_path.read_text()) if state_path.exists() else {}
same = old.get('extractor_fingerprint') == extractor
# Validate source even when resuming: a manifest is not proof of current contents.
source = None
for candidate in build.get('paths', []):
try:
if digest(candidate) == sha:
source = Path(candidate).resolve()
break
except OSError:
continue
if same and old.get('status') == 'success' and source:
try:
validate_snapshot(output, sha)
if digest(output) != old.get('snapshot_sha256'):
raise ValueError('Snapshot content changed since successful extraction')
except (OSError, ValueError, TypeError, AttributeError):
pass
else:
report['skipped_success'] += 1
continue
if same and old.get('status') in ('failed', 'running') and not retry_failed:
report['skipped_failed'] += 1
report['failures'].append({'sha256': sha, 'error': old.get('error', 'Interrupted attempt; use --retry-failed')})
continue
if limit is not None and report['attempted'] >= limit:
report['pending'] += 1
continue
attempt = old.get('attempts', 0) + 1
log = directory / 'logs' / (sha + '.' + str(attempt) + '.log')
temp = directory / (sha + '.' + uuid.uuid4().hex + '.pending.json')
state = {'sha256': sha, 'family': build.get('family'), 'extractor_fingerprint': extractor,
'status': 'running', 'attempts': attempt, 'source': str(source) if source else None,
'input_name': source.name if source else None, 'provider_profile': profile,
'started_at': datetime.now(timezone.utc).isoformat(), 'log': str(log)}
atomic_json(state_path, state)
report['attempted'] += 1
try:
if not source:
raise ValueError('No source path matches manifest SHA')
worker(source, temp, log, timeout, env)
snapshot = validate_snapshot(temp, sha)
if digest(source) != sha:
raise ValueError('Source changed during extraction')
snapshot['binary'].update(
library=source.name.split('__')[-1],
sources=build.get('paths', []),
games=sorted({Path(p).name.split('__')[0] for p in build.get('paths', []) if '__' in Path(p).name}),
extraction={'fingerprint': extractor, 'provider': profile,
'started_at': state['started_at'], 'coverage': 'partial'})
snapshot.setdefault('limitations', []).append(
'Automated heuristic extraction; missing entries are unknown, not proof of absence.')
atomic_json(temp, snapshot)
os.replace(temp, output)
state['status'] = 'success'
state['snapshot'] = str(output)
state['snapshot_sha256'] = digest(output)
state['coverage'] = {'types': len(snapshot['types']), 'methods': len(snapshot['methods']),
'dispatch': len(snapshot.get('method_dispatch') or [])}
report['succeeded'] += 1
except Exception as exc:
state.update(status='failed', error=str(exc))
if not log.exists():
log.write_text(str(exc) + '\n')
report['failures'].append({'sha256': sha, 'error': str(exc)})
finally:
temp.unlink(missing_ok=True)
state['finished_at'] = datetime.now(timezone.utc).isoformat()
atomic_json(state_path, state)
print(json.dumps({'sha256': sha, 'status': state['status'], 'attempt': attempt}), flush=True)
atomic_json(directory / 'failure-report.json', report)
return report
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--worker', nargs=2, metavar=('DLL', 'OUTPUT'), help=argparse.SUPPRESS)
parser.add_argument('--manifest', type=Path)
parser.add_argument('--out-dir', type=Path)
parser.add_argument('--ghidra-home', type=Path)
parser.add_argument('--timeout', type=float, default=1800)
parser.add_argument('--limit', type=int)
parser.add_argument('--retry-failed', action='store_true')
args = parser.parse_args()
if args.worker:
from .ghidra import run_extractor
run_extractor(*args.worker)
return
if not args.manifest or not args.out_dir:
parser.error('--manifest and --out-dir are required')
result = run_queue(args.manifest, args.out_dir, ghidra_home=args.ghidra_home,
timeout=args.timeout, limit=args.limit, retry_failed=args.retry_failed)
print(json.dumps(result))
if result['failures']:
raise SystemExit(1)
if __name__ == '__main__':
main()
+19 -1
View File
@@ -20,6 +20,8 @@ then `analyzeHeadless` on PATH.
from __future__ import annotations from __future__ import annotations
import os import os
import json
import re
import shutil import shutil
import subprocess import subprocess
import tempfile import tempfile
@@ -44,7 +46,7 @@ def find_headless() -> str | None:
env = os.environ.get("GHIDRA_HEADLESS") env = os.environ.get("GHIDRA_HEADLESS")
if env and os.path.isfile(env): if env and os.path.isfile(env):
return env return env
home = os.environ.get("GHIDRA_HOME") home = os.environ.get("GHIDRA_INSTALL_DIR") or os.environ.get("GHIDRA_HOME")
if home: if home:
for name in ("analyzeHeadless", "analyzeHeadless.bat"): for name in ("analyzeHeadless", "analyzeHeadless.bat"):
cand = os.path.join(home, "support", name) cand = os.path.join(home, "support", name)
@@ -123,9 +125,20 @@ def run_extractor_pyghidra(dll_path: str, out_path: str, *, script_dir: str | No
proj_dir = tempfile.mkdtemp(prefix="ams_pyghidra_") proj_dir = tempfile.mkdtemp(prefix="ams_pyghidra_")
try: try:
# Keep headless preferences/caches separate from the user's GUI profile.
from pyghidra.launcher import PyGhidraLauncher, HeadlessPyGhidraLauncher
if not PyGhidraLauncher.has_launched():
launcher = HeadlessPyGhidraLauncher(verbose=False)
runtime_home = os.path.join(proj_dir, "runtime-home")
os.makedirs(runtime_home)
launcher.vm_args.extend(["-Duser.home=" + runtime_home, "-Xmx2G"])
launcher.start()
pyghidra.run_script( pyghidra.run_script(
dll_path, script_path, dll_path, script_path,
project_location=proj_dir, project_name="ams_" + uuid.uuid4().hex[:8], project_location=proj_dir, project_name="ams_" + uuid.uuid4().hex[:8],
# Ghidra domain-file names reject Unicode combining marks and some
# Polish letters. This changes only the internal project name.
program_name=re.sub(r"[^A-Za-z0-9_.-]", "_", Path(dll_path).name),
script_args=[out_path], analyze=True, verbose=False, script_args=[out_path], analyze=True, verbose=False,
) )
except Exception as e: # jpype/Ghidra errors aren't a tidy hierarchy except Exception as e: # jpype/Ghidra errors aren't a tidy hierarchy
@@ -135,4 +148,9 @@ def run_extractor_pyghidra(dll_path: str, out_path: str, *, script_dir: str | No
if not os.path.isfile(out_path): if not os.path.isfile(out_path):
raise GhidraRunError("extractor produced no snapshot at {0} (PyGhidra path)".format(out_path)) raise GhidraRunError("extractor produced no snapshot at {0} (PyGhidra path)".format(out_path))
with open(out_path, encoding="utf-8") as stream:
snapshot = json.load(stream)
snapshot.setdefault("binary", {})["name"] = Path(dll_path).name
with open(out_path, "w", encoding="utf-8") as stream:
json.dump(snapshot, stream, indent=2, ensure_ascii=False)
return out_path return out_path
+2 -1
View File
@@ -15,7 +15,7 @@ from fastapi.staticfiles import StaticFiles
from .. import __version__ from .. import __version__
from .db import configure, init_db from .db import configure, init_db
from .routes import compat, diff, games, jobs, snapshots from .routes import compat, diff, games, jobs, snapshots, tracker
_STATIC = Path(__file__).parent / "static" _STATIC = Path(__file__).parent / "static"
@@ -30,6 +30,7 @@ def create_app(database_url: str | None = None) -> FastAPI:
app.include_router(diff.router) app.include_router(diff.router)
app.include_router(jobs.router) app.include_router(jobs.router)
app.include_router(compat.router) app.include_router(compat.router)
app.include_router(tracker.router)
@app.get("/health", tags=["meta"]) @app.get("/health", tags=["meta"])
def health() -> dict[str, str]: def health() -> dict[str, str]:
+10 -4
View File
@@ -30,10 +30,16 @@ def get_compat(
format: str = Query("md", pattern="^(md|json)$", description="md = Markdown, json = structured"), format: str = Query("md", pattern="^(md|json)$", description="md = Markdown, json = structured"),
db: Session = Depends(get_db), db: Session = Depends(get_db),
) -> Response: ) -> Response:
entries = [ entries = []
Entry(game=snap.game.name if snap.game else _NO_GAME, snapshot=Surface(snap.data)) for snap in db.scalars(select(models.Snapshot).order_by(models.Snapshot.id)):
for snap in db.scalars(select(models.Snapshot).order_by(models.Snapshot.id)) surface = Surface(snap.data)
] # Content-identical builds can ship with several games. Keep those aliases
# even though the legacy ORM links a snapshot to only one primary game.
games = {g for g in surface.binary.get("games", []) if isinstance(g, str) and g}
if snap.game:
games.add(snap.game.name)
for game in sorted(games or {_NO_GAME}):
entries.append(Entry(game=game, snapshot=surface))
table = compatibility_table(entries) table = compatibility_table(entries)
if format == "json": if format == "json":
+84
View File
@@ -0,0 +1,84 @@
"""Read-only tracker. Filesystem paths come from server configuration, never requests."""
import os
import json
from pathlib import Path
from fastapi import APIRouter, Depends, HTTPException
from fastapi.responses import JSONResponse
from sqlalchemy import select
from sqlalchemy.orm import Session
from ...snapshot import Snapshot as Surface
from ...tracker import build_tracker, load_reviews, scan_emulator
from .. import models
from ..db import get_db
router = APIRouter(tags=["tracker"])
def order_snapshots(snapshots):
"""Prefer reproducible batch results, retaining explicit conflict diagnostics."""
ordered = sorted(snapshots, key=lambda s: bool(s.binary.get("extraction")), reverse=True)
seen, warnings, distinct = {}, [], []
for snap in ordered:
sha = str(snap.binary.get("sha256", "")).lower()
if not sha:
distinct.append(snap)
continue
if sha in seen and seen[sha].raw == snap.raw:
continue
distinct.append(snap)
if sha in seen and seen[sha].raw != snap.raw:
warnings.append(f"Różne snapshoty tej samej DLL ({sha}): wybrano pierwszy, z pierwszeństwem metadanych ekstrakcji; wyników nie scalono.")
seen.setdefault(sha, snap)
return distinct, list(dict.fromkeys(warnings))
def inventory_status(path, binaries):
manifest = json.loads(Path(path).read_text(encoding="utf-8"))
builds = manifest["builds"]
if not isinstance(builds, list):
raise ValueError("inventory builds must be a list")
loaded = {str(b.get("sha256", "")).lower() for b in binaries if b.get("sha256")}
scopes, rows, seen = {}, [], set()
for build in builds:
sha = str(build["sha256"]).lower()
if sha in seen:
raise ValueError("Duplicate inventory SHA-256: " + sha)
seen.add(sha)
scope = build.get("scope", "unknown")
present = sha in loaded
rows.append({**build, "snapshot_loaded": present})
counts = scopes.setdefault(scope, {"target": 0, "loaded": 0, "pending": 0})
counts["target"] += 1
counts["loaded" if present else "pending"] += 1
return {"builds": rows, "scopes": scopes, "loaded_snapshots": len(binaries),
"unlisted_snapshots": len(loaded - seen),
"note": "Wczytany snapshot nie oznacza kompletnej ekstrakcji ani zgodności funkcjonalnej."}
@router.get("/tracker")
def get_tracker(download: bool = False, db: Session = Depends(get_db)):
root = os.environ.get("AMS_EMULATOR_ROOT")
if not root:
raise HTTPException(503, "Ustaw AMS_EMULATOR_ROOT na katalog Rex-EMoolator i uruchom serwer ponownie.")
try:
snapshots = [Surface(s.data) for s in db.scalars(select(models.Snapshot).order_by(models.Snapshot.id))]
# Explicitly configured disk snapshots may supplement a DB; identities are deduplicated.
directory = os.environ.get("AMS_TRACKER_SNAPSHOTS")
if directory:
path = Path(directory)
if not path.is_dir():
raise ValueError("AMS_TRACKER_SNAPSHOTS is not a directory")
snapshots.extend(Surface.load(str(p)) for p in sorted(path.rglob("*.snapshot.json")))
snapshots, catalog_warnings = order_snapshots(snapshots)
reviews = os.environ.get("AMS_TRACKER_REVIEWS")
result = build_tracker(snapshots, scan_emulator(Path(root)), load_reviews(Path(reviews) if reviews else None))
result["warnings"].extend(catalog_warnings)
inventory = os.environ.get("AMS_TRACKER_INVENTORY")
if inventory:
result["inventory"] = inventory_status(inventory, result["binaries"])
except (OSError, ValueError, KeyError, TypeError) as exc:
raise HTTPException(503, "Konfiguracja lub dane trackera: " + str(exc)) from exc
headers = {"Content-Disposition": 'attachment; filename="tracker.json"'} if download else {}
return JSONResponse(result, headers=headers)
+1
View File
@@ -9,6 +9,7 @@
<body> <body>
<header class="topbar"> <header class="topbar">
<div class="brand">⌖ Aidem&nbsp;Media <span>Command Center</span></div> <div class="brand">⌖ Aidem&nbsp;Media <span>Command Center</span></div>
<a class="mini-btn" href="tracker.html">Atlas API ↗</a>
<div class="sub">Piklib / BlooMoo — analiza różnicowa powierzchni silnika</div> <div class="sub">Piklib / BlooMoo — analiza różnicowa powierzchni silnika</div>
</header> </header>
+5
View File
@@ -0,0 +1,5 @@
:root{color-scheme:dark;--bg:#0c131e;--panel:#131e2c;--line:#2a394a;--text:#e4edf5;--muted:#9aafc3;--teal:#54d6ba;--amber:#efbd69}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.55 system-ui,sans-serif}header,main{max-width:1550px;margin:auto;padding:30px 40px}header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:20px}h1{font-size:34px;letter-spacing:-1px;margin:14px 0 3px}h1 span{display:block;color:var(--teal);font-size:12px;letter-spacing:2px;text-transform:uppercase;margin-top:6px}p{margin:8px 0 16px}header p,.muted,.footnote{color:var(--muted)}a{color:var(--teal)}.back{text-decoration:none;font-size:12px}button,.button,input,select{font:inherit;color:inherit;background:#192738;border:1px solid var(--line);border-radius:7px;padding:9px 12px}button,.button{cursor:pointer}.button{text-decoration:none;white-space:nowrap}button:hover,.button:hover{border-color:var(--teal)}:focus-visible{outline:2px solid var(--teal);outline-offset:3px}.filters{display:flex;flex-wrap:wrap;align-items:end;gap:16px;margin:24px 0 10px}.filters label{display:grid;gap:6px;font-size:12px;color:var(--muted)}.filters label:first-child{flex:1;min-width:230px}.filters select{max-width:330px}.filters .check{display:flex;align-items:center;padding:10px 0}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:25px 0}.stat{border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:18px}.stat strong{display:block;font-size:30px;line-height:1.3}.stat span{color:var(--muted);font-size:12px}.layout{display:grid;grid-template-columns:290px minmax(0,1fr);gap:25px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}h2{font-size:16px;margin:0}.quiet{padding:5px 9px;font-size:12px}.types{display:grid;gap:8px;max-height:720px;overflow:auto;padding:3px}.type{display:block;width:100%;text-align:left;background:var(--panel);padding:13px}.type[aria-pressed=true]{border-color:var(--teal);background:#18332f}.type strong{display:block}.type small{color:var(--muted)}.bar{height:4px;background:#314052;border-radius:3px;margin:7px 0 3px;overflow:hidden}.bar i{display:block;height:100%;background:var(--teal)}.bar.review i{background:var(--amber)}.table-scroll{overflow:auto;border:1px solid var(--line);border-radius:10px}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{font-size:11px;text-transform:uppercase;color:var(--muted);background:var(--panel);padding:13px}td{padding:13px;border-top:1px solid var(--line);font-size:12px}td:first-child small{display:block;color:var(--muted)}td:first-child strong{font-family:ui-monospace,monospace}.badge{display:inline-block;border-radius:4px;padding:3px 7px;background:#233145;color:#c0d0e0}.badge.implemented,.badge.asm_reviewed,.badge.runtime_tested{color:var(--teal);background:#183a33}.badge.missing,.badge.stub_candidate,.badge.stale{color:var(--amber);background:#3b3020}.footnote{font-size:12px;margin-top:28px;max-width:1000px}.warning{white-space:pre-wrap;border-left:3px solid var(--amber);background:#30291e;padding:12px;margin-top:15px}#message{color:var(--muted);padding:25px 0}dialog{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;width:min(790px,94vw);max-height:90vh;padding:24px}dialog::backdrop{background:#030911bb}dialog h3{font-size:14px;color:var(--teal);margin-top:25px}dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bg);padding:13px;border-radius:7px;font-size:12px}dialog article{border-top:1px solid var(--line);padding:10px 0;overflow-wrap:anywhere}dialog dl{display:grid;grid-template-columns:130px 1fr;gap:7px}dialog dt{color:var(--muted)}dialog dd{margin:0;overflow-wrap:anywhere}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}@media(max-width:950px){header,main{padding:24px}.layout{grid-template-columns:1fr}.types{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));max-height:300px}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:550px){header{align-items:flex-start;flex-direction:column}header,main{padding:20px}.filters label,.filters select{width:100%;max-width:none}.stats{gap:8px}.stat{padding:12px}.stat strong{font-size:25px}dialog dl{grid-template-columns:1fr}}
.layout>section,.stat,.filters label{min-width:0}#revision,.warning{overflow-wrap:anywhere}.table-scroll{max-width:100%}@media(max-width:950px){.layout{grid-template-columns:minmax(0,1fr)}}
.table-scroll{position:relative}
+21
View File
@@ -0,0 +1,21 @@
<!doctype html>
<html lang="pl">
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Atlas API · Aidem Media</title><link rel="stylesheet" href="tracker.css"></head>
<body>
<header><div><a href="index.html" class="back">← Command Center</a><h1>Atlas API<span>Piklib · BlooMoo · biblioteki</span></h1><p>Mapa implementacji i dowodów zgodności z oryginałem.</p></div><a class="button" href="/tracker?download=1" download="tracker.json">Eksport JSON ↗</a></header>
<main>
<div id="message" role="status" aria-live="polite">Wczytywanie katalogu i implementacji emulatora…</div>
<section id="workspace" hidden>
<div id="revision" class="muted"></div>
<p id="inventory" class="muted" hidden></p>
<details id="warnings" class="warning" hidden><summary id="warnings-summary">Uwagi do katalogu</summary><div id="warnings-body"></div></details>
<div class="filters"><label>Szukaj typu lub metody<input id="search" type="search" placeholder="np. ANIMO, SETPOSITION" autocomplete="off"></label><label>Rodzina<select id="family"><option value="">Wszystkie rodziny</option></select></label><label>Wariant oryginału<select id="binary"><option value="">Wszystkie warianty</option></select></label><label>Implementacja<select id="status"><option value="">Wszystkie stany</option><option value="missing">Brak rejestracji</option><option value="registered">Zarejestrowana</option><option value="stub_candidate">Podejrzenie stubu</option><option value="partial">Częściowa</option><option value="implemented">Zaimplementowana</option></select></label><label class="check"><input id="gaps" type="checkbox"> Tylko braki i podejrzenia stubów</label></div>
<p class="muted" id="scope-note">Widok jest sumą API wariantów. Rejestracja metody nie potwierdza jej poprawności.</p>
<div id="stats" class="stats"></div>
<div class="layout"><section aria-labelledby="types-heading"><div class="section-heading"><h2 id="types-heading">Typy</h2><button id="all-types" class="quiet">Wszystkie</button></div><div id="types" class="types"></div></section><section class="methods" aria-labelledby="methods-heading"><div class="section-heading"><h2 id="methods-heading">Metody</h2><span id="count" class="muted"></span></div><div id="type-notes" class="warning" hidden></div><div class="table-scroll"><table><thead><tr><th>Typ / metoda</th><th>Implementacja</th><th>Weryfikacja</th><th>Oryginał</th><th><span class="sr-only">Szczegóły</span></th></tr></thead><tbody id="rows"></tbody></table></div><p id="empty" hidden>Brak metod dla wybranych filtrów.</p></section></div>
<p class="footnote">„Nieustalone” oznacza brak dowodu w wynikach ekstrakcji, a nie nieobecność metody w bibliotece. Stan „zarejestrowana” wynika z kodu; stub jest kandydatem do przeglądu. Potwierdzenia ASM i testy są osobnym wymiarem.</p>
</section>
</main>
<dialog id="details"><div class="section-heading"><h2 id="detail-title"></h2><button id="close" aria-label="Zamknij szczegóły">Zamknij ×</button></div><div id="detail-body"></div></dialog>
<script src="tracker.js"></script>
</body></html>
+44
View File
@@ -0,0 +1,44 @@
'use strict';
const EVENT_STATUS={emitted:'emitowany w klasie typu',emitted_base:'emitowany w Variable',engine_literal:'literał w kodzie silnika',not_found:'brak literału w emulatorze'};
const FIELD_STATUS={read:'czytane w obsłudze typu',read_base:'czytane w Variable',engine_literal:'literał w innym kodzie',not_found:'brak literału w emulatorze'};
const MAPPING={explicit:'Jawne (klasa C++ z fabryki)',runner_factory:'CMC_RunnerFactory (typ → runner)',class_constructor:'Runner tworzony w konstruktorze klasy',inferred:'Wywnioskowane z nazwy'};
const $ = id => document.getElementById(id);
const labels = {missing:'Brak rejestracji',registered:'Zarejestrowana',stub_candidate:'Podejrzenie stubu',partial:'Częściowa',implemented:'Zaimplementowana',unverified:'Niezweryfikowana',asm_reviewed:'Przegląd ASM',runtime_tested:'Test zachowania',stale:'Dowód wymaga aktualizacji'};
let data, selected = null;
const el = (tag, text, cls) => {const n = document.createElement(tag); if(text !== undefined) n.textContent = text; if(cls) n.className = cls; return n;};
const family = b => String(b.family || (typeof b.engine === 'object' ? b.engine?.family || b.engine?.name : b.engine) || b.library || 'Nieustalona');
const binaryName = b => String(b.library || b.name || '?').split(/[\\/]/).pop().replace(/^.*__[0-9a-f]+__/i,'');
const inFamily = b => !$('family').value || family(b) === $('family').value;
function variants(){const previous=$('binary').value;$('binary').replaceChildren(new Option('Wszystkie warianty',''));for(const b of data.binaries.filter(inFamily)){const games=(b.games||[]).join(', ');const opt=el('option',`${binaryName(b)}${games ? ' · '+games : ''} · ${String(b.sha256||b.id).slice(0,10)}`);opt.value=b.id;$('binary').append(opt);}if([...$('binary').options].some(o=>o.value===previous))$('binary').value=previous;}
const original = m => (m.original || []).filter(o => (!$('binary').value || o.binary_id === $('binary').value) && data.binaries.some(b=>b.id===o.binary_id && inFamily(b)));
const registered = m => m.status !== 'missing';
const reviewed = m => ['asm_reviewed','runtime_tested'].includes(m.verification);
const typeName = name => name === '*' ? 'Zakres globalny (*)' : name;
function matches(t,m){const q=$('search').value.trim().toUpperCase();return (!q || `${t.name} ${m.name}`.toUpperCase().includes(q)) && (!$('status').value || m.status === $('status').value) && (!$('gaps').checked || ['missing','stub_candidate'].includes(m.status));}
function stat(number,label){const n=el('div',undefined,'stat');n.append(el('strong',number),el('span',label));return n;}
function badge(value){return el('span',labels[value] || value,'badge '+value);}
function render(){
const query=$('search').value.trim().toUpperCase();
const groups=data.types.map(t=>({...t,unresolved:t.methods.length===0,methods:t.methods.filter(m=>matches(t,m))})).filter(t=>t.methods.length || (t.unresolved && (!query || t.name.toUpperCase().includes(query)) && !$('status').value && !$('gaps').checked));
const active=groups.filter(t=>!selected || t.name===selected), methods=active.flatMap(t=>t.methods);
$('scope-note').textContent=($('binary').value || $('family').value) ? 'Wybrany wariant lub rodzina ogranicza dowody oryginału. Metody bez dopasowania pozostają widoczne jako „nieustalone”; liczniki obejmują widoczne pary typ / metoda. Weryfikacja jest zbiorcza i nie zmienia się po wyborze wariantu.' : 'Widok jest sumą API wariantów. Rejestracja metody nie potwierdza jej poprawności. Liczniki obejmują widoczne pary typ / metoda, w tym dziedziczone.';
$('stats').replaceChildren(stat(methods.length,'par typ / metoda (także dziedziczone)'),stat(methods.filter(registered).length,'zarejestrowanych w emulatorze'),stat(methods.filter(m=>m.status==='implemented').length,'oznaczonych jako zaimplementowane'),stat(methods.filter(reviewed).length,'z aktualnym dowodem ASM / testu'));
$('types').replaceChildren();
for(const t of groups){const b=el('button',undefined,'type');b.type='button';b.setAttribute('aria-pressed',String(selected===t.name));const n=t.methods.length,r=t.methods.filter(registered).length,v=t.methods.filter(reviewed).length;b.append(el('strong',typeName(t.name)),el('small',n ? `${n} metod · ${r} rejestracji · ${v} dowodów` : 'Metody nierozpoznane — typ wykryty'));for(const [amount,cls,title] of [[r,'','Rejestracja'],[v,'review','Weryfikacja']]){const bar=el('div',undefined,'bar '+cls);bar.title=`${title}: ${amount} / ${n}`;const fill=el('i');fill.style.width=`${n ? 100*amount/n : 0}%`;bar.append(fill);b.append(bar);}b.onclick=()=>{selected=selected===t.name?null:t.name;render();};$('types').append(b);}
const chosen=data.types.find(t=>t.name===selected);const typeNotes=[...(chosen?.inherits||[]).map(base=>`Dziedziczy metody bazowe zakresu ${base}.`),...(chosen?.events?.length?['Eventy w oryginale: '+chosen.events.map(e=>`${e.name} (${EVENT_STATUS[e.status]||e.status})`).join(', ')]:[]),...(chosen?.fields?.length?['Pola w oryginale: '+chosen.fields.map(f=>`${f.name}:${f.value_types.join('/')} (${FIELD_STATUS[f.status]||f.status})`).join(', ')]:[]),...(chosen?.mapping_notes||[])];$('type-notes').hidden=!typeNotes.length;$('type-notes').textContent=typeNotes.map(note=>typeof note==='string'?note:JSON.stringify(note)).join('\n');$('methods-heading').textContent=selected?typeName(selected):'Wszystkie metody';$('count').textContent=`${methods.length} pozycji`;$('rows').replaceChildren();
for(const t of active)for(const m of t.methods){const tr=el('tr'),name=el('td');name.append(el('small',typeName(t.name)),el('strong',m.name));const s=el('td'),v=el('td');s.append(badge(m.status));v.append(badge(m.verification));const found=original(m);const availability=el('td',found.length?`Wykryta · ${new Set(found.map(o=>o.binary_id)).size} wariantów`:'Nieustalone');const action=el('td'),b=el('button','Dowody ↗','quiet');b.setAttribute('aria-label',`Dowody ${t.name}.${m.name}`);b.onclick=()=>detail(t,m);action.append(b);tr.append(name,s,v,availability,action);$('rows').append(tr);}
$('empty').hidden=methods.length>0;$('empty').textContent=chosen && !chosen.methods.length ? 'Typ został wykryty, ale metody nie zostały jeszcze rozpoznane. Brak wpisów nie oznacza braku API.' : 'Brak metod dla wybranych filtrów.';
}
function detail(t,m){$('detail-title').textContent=`${typeName(t.name)} · ${m.name}`;const body=$('detail-body');body.replaceChildren();const statuses=el('p');statuses.append(badge(m.status),document.createTextNode(' '),badge(m.verification));body.append(statuses);
const section=(title,text)=>{body.append(el('h3',title));if(text !== undefined)body.append(el('pre',text));};
section('Implementacja emulatora',m.source?`${m.source.path}:${m.source.line}\nWłaściciel: ${m.source.owner || '—'}\nHash treści: ${m.source.body_sha256 || '—'}`:'Nie znaleziono rejestracji w emulatorze.');
section('Dowody z oryginału');const entries=original(m);if(!entries.length)body.append(el('p','Nieustalone — ekstrakcja nie dostarcza dopasowania w wybranym zakresie.'));
for(const o of entries){const b=data.binaries.find(b=>b.id===o.binary_id);const a=el('article');a.append(el('strong',b?binaryName(b):o.binary_id));const dl=el('dl');for(const [key,value] of [['SHA-256',b?.sha256],['Silnik',typeof b?.engine==='object'?JSON.stringify(b.engine):b?.engine],['Właściciel',o.owner],['Id metody',o.method_id],['Sygnatura',o.signature],['Dla tego typu',o.per_type],['Implementacja',o.impl_addr],['Gałąź dispatchera',o.case_addr],['Funkcja rejestrująca',o.registration_addr],['Wywołanie rejestracji',o.registration_call_addr],['Przekazanie ID',o.id_push_addr],['Napis',o.string_addr],['Id dowodów',(o.evidence_ids||[]).join(', ')||'—'],['Dopasowanie',MAPPING[o.mapping]||o.mapping],['Dziedziczenie',o.inherited?'Tak':'Nie']]){dl.append(el('dt',key),el('dd',value===null || value===undefined?'—':String(value)));}a.append(dl);if(o.registration_addr || o.evidence_ids?.length)a.append(el('p','Dowód rejestracji ASM potwierdza rozpoznanie API; nie stanowi weryfikacji zachowania implementacji.','muted'));if(b?.limitations?.length){a.append(el('strong','Ograniczenia ekstrakcji'));a.append(el('pre',b.limitations.map(item=>typeof item==='string'?item:JSON.stringify(item,null,2)).join('\n')));}if(b?.coverage !== undefined)a.append(el('pre','Zakres ekstrakcji: '+(typeof b.coverage==='string'?b.coverage:JSON.stringify(b.coverage,null,2))));body.append(a);}
section('Przeglądy i testy');body.append(el('p','Poniżej wszystkie zapisane przeglądy metody. Zbiorczy status weryfikacji nie oznacza potwierdzenia każdego wariantu; zakres dowodu określają jego dane.'));if(!(m.reviews||[]).length)body.append(el('p','Brak zapisanych dowodów weryfikacji zachowania.'));for(const review of m.reviews||[])body.append(el('pre',typeof review==='string'?review:JSON.stringify(review,null,2)));
if(m.signatures?.length)section('Sygnatura w oryginale',m.signatures.join('\n'));const notes=[...(t.mapping_notes||[]),...(m.notes||[])];if(notes.length)section('Uwagi',notes.map(n=>typeof n==='string'?n:JSON.stringify(n,null,2)).join('\n'));
$('details').showModal();
}
$('close').onclick=()=>$('details').close();$('all-types').onclick=()=>{selected=null;render();};for(const id of ['search','family','binary','status','gaps'])$(id).addEventListener(id==='search'?'input':'change',()=>{if(data){if(id==='family')variants();render();}});
async function load(){try{const res=await fetch('/tracker');if(!res.ok){const text=await res.text();let reason=text;try{const parsed=JSON.parse(text);reason=typeof parsed.detail==='string'?parsed.detail:JSON.stringify(parsed.detail||parsed);}catch{}throw new Error(res.status===503?`Katalog nie jest jeszcze skonfigurowany. ${reason}`:`Błąd API (${res.status}): ${reason}`);}data=await res.json();if(!Array.isArray(data.types)||!Array.isArray(data.binaries))throw new Error('Odpowiedź nie zawiera katalogu typów i wariantów.');for(const name of [...new Set(data.binaries.map(family))].sort())$('family').append(new Option(name,name));variants();$('revision').textContent=`Emulator: ${data.emulator?.commit || 'rewizja nieznana'}${data.emulator?.dirty?' · lokalne zmiany':''} · ${data.binaries.length} wariantów · ${data.types.length} typów`;
if(data.warnings?.length){$('warnings').hidden=false;$('warnings-summary').textContent=`Uwagi do katalogu (${data.warnings.length})`;$('warnings-body').textContent=[...new Set(data.warnings.map(w=>typeof w==='string'?w:JSON.stringify(w)))].join('\n');}if(data.inventory){const names={engine:'Silniki',plugin:'Biblioteki skryptowe',native_dependency:'Biblioteki natywne',native:'Biblioteki natywne',excluded_early_engine:'Wcześniejsze silniki (poza zakresem)'};$('inventory').hidden=false;$('inventory').textContent=Object.entries(data.inventory.scopes).map(([scope,c])=>scope.startsWith('excluded') ? `${names[scope]||scope}: ${c.target}` : `${names[scope]||scope}: ${c.loaded} / ${c.target} snapshotów, ${c.pending} oczekuje`).join(' · ')+'. Snapshot nie oznacza kompletnej ekstrakcji ani zgodności zachowania.';}$('message').hidden=true;$('workspace').hidden=false;render();}catch(error){$('message').replaceChildren(el('p',error.message));const retry=el('button','Spróbuj ponownie');retry.onclick=()=>{data=null;$('binary').replaceChildren(new Option('Wszystkie warianty',''));$('family').replaceChildren(new Option('Wszystkie rodziny',''));$('message').textContent='Wczytywanie…';load();};$('message').append(retry);}}
load();
+1 -1
View File
@@ -160,7 +160,7 @@ def library_name(raw: str) -> str:
def _library_name(snap: Snapshot) -> str: def _library_name(snap: Snapshot) -> str:
return library_name(snap.binary.get("name") or "?") return library_name(snap.binary.get("library") or snap.binary.get("name") or "?")
def _variant_id(index: int) -> str: def _variant_id(index: int) -> str:
+6
View File
@@ -118,7 +118,11 @@ def compute_diff(old: Snapshot, new: Snapshot) -> dict[str, Any]:
"types": keyed_diff(old.types, new.types, _type_key, ["cpp_class", "object_size"]), "types": keyed_diff(old.types, new.types, _type_key, ["cpp_class", "object_size"]),
"methods": keyed_diff(old.methods, new.methods, _owner_name_key, ["id"]), "methods": keyed_diff(old.methods, new.methods, _owner_name_key, ["id"]),
"events": keyed_diff(old.events, new.events, _owner_name_key, ["order"]), "events": keyed_diff(old.events, new.events, _owner_name_key, ["order"]),
"type_events": keyed_diff(old.type_events, new.type_events,
lambda x: (x["type"], x["name"]), ["order"]),
"fields": keyed_diff(old.fields, new.fields, _owner_name_key, ["type"]), "fields": keyed_diff(old.fields, new.fields, _owner_name_key, ["type"]),
"type_fields": keyed_diff(old.type_fields, new.type_fields,
lambda x: (x["type"], x["name"]), ["value_types"]),
"struct_layout": keyed_diff(old.struct_layout, new.struct_layout, _layout_key, "struct_layout": keyed_diff(old.struct_layout, new.struct_layout, _layout_key,
["size", "is_vtable"]), ["size", "is_vtable"]),
"method_dispatch": _dispatch_diff(old, new), "method_dispatch": _dispatch_diff(old, new),
@@ -136,6 +140,8 @@ def _item_owner(axis: str, item: Item) -> str | None:
return item.get("cpp_class") return item.get("cpp_class")
if axis in ("methods", "events", "fields", "struct_layout", "method_dispatch"): if axis in ("methods", "events", "fields", "struct_layout", "method_dispatch"):
return item.get("owner") return item.get("owner")
if axis in ("type_events", "type_fields"):
return item.get("type") # script type name, e.g. --owner ANIMO
if axis == "method_inheritance": if axis == "method_inheritance":
return item.get("runner") return item.get("runner")
if axis == "field_inheritance": if axis == "field_inheritance":
+66
View File
@@ -0,0 +1,66 @@
"""Inventory all DLL builds by content before scheduling expensive native analysis."""
import argparse
from collections import Counter
import hashlib
import json
from pathlib import Path
import re
def inventory(roots: list[Path], snapshot_dir: Path | None = None) -> dict:
extracted = set()
if snapshot_dir:
for path in snapshot_dir.glob("*.snapshot.json"):
sha = json.loads(path.read_text()).get("binary", {}).get("sha256")
if sha:
extracted.add(sha.lower())
builds = {}
for root in roots:
if not root.exists():
raise ValueError("Source does not exist: " + str(root))
paths = [root] if root.is_file() else sorted(root.rglob("*"))
for path in paths:
if path.suffix.lower() != ".dll" or not path.is_file():
continue
blob = path.read_bytes()
sha = hashlib.sha256(blob).hexdigest()
name = path.name.split("__")[-1].upper()
if re.fullmatch(r"PIKLIB(?:61|71|72|8)\.DLL", name):
family, scope = name.removesuffix(".DLL"), "engine"
elif name.startswith("BLOOMOO"):
family, scope = "BLOOMOO", "engine"
elif name in ("WORLD.DLL", "KOLOROWANKA.DLL"):
family, scope = name.removesuffix(".DLL"), "plugin"
elif name == "SEKAI.DLL":
family, scope = "SEKAI", "native_dependency"
elif "PIKLIB" in name:
family, scope = name.removesuffix(".DLL"), "excluded_early_engine"
else:
family, scope = name, "unclassified"
build = builds.setdefault(sha, {"sha256": sha, "size": len(blob), "family": family,
"scope": scope, "paths": [], "analysis": "snapshot_available" if sha in extracted else "pending",
"suggested_snapshot": sha + ".snapshot.json"})
absolute = str(path.resolve())
if absolute not in build["paths"]:
build["paths"].append(absolute)
result = sorted(builds.values(), key=lambda b: (b["family"], b["sha256"]))
return {"schema": "binary-inventory/1", "builds": result,
"summary": {"files": sum(len(b["paths"]) for b in result), "unique": len(result),
"by_scope": dict(Counter(b["scope"] for b in result))},
"limitations": ["Scope is inferred from filenames; validate renamed or unclassified DLLs.",
"snapshot_available means identity matches; it does not establish complete API extraction."]}
def main():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument("roots", nargs="+", type=Path)
p.add_argument("--snapshots", type=Path)
p.add_argument("--out", type=Path, required=True)
a = p.parse_args()
result = inventory(a.roots, a.snapshots)
a.out.write_text(json.dumps(result, ensure_ascii=False, indent=2) + "\n")
print(json.dumps(result["summary"]))
if __name__ == "__main__":
main()
+7
View File
@@ -151,9 +151,16 @@ def render_text(diff: dict[str, Any], only: set[str] | None = None) -> str:
if want("events") and not _is_empty(diff["events"]): if want("events") and not _is_empty(diff["events"]):
_section_owned(out, "EVENTS", diff["events"], _fmt_event, _section_owned(out, "EVENTS", diff["events"], _fmt_event,
lambda e: e["owner"], lambda e: e["name"]) lambda e: e["owner"], lambda e: e["name"])
if want("events") and not _is_empty(diff.get("type_events", _EMPTY)):
_section_owned(out, "TYPE EVENTS", diff["type_events"], _fmt_event,
lambda e: e["type"], lambda e: e["name"])
if want("fields") and not _is_empty(diff["fields"]): if want("fields") and not _is_empty(diff["fields"]):
_section_owned(out, "FIELDS", diff["fields"], _fmt_field, _section_owned(out, "FIELDS", diff["fields"], _fmt_field,
lambda f: f["owner"], lambda f: f["name"]) lambda f: f["owner"], lambda f: f["name"])
if want("fields") and not _is_empty(diff.get("type_fields", _EMPTY)):
_section_owned(out, "TYPE FIELDS", diff["type_fields"],
lambda f: "{0}: {1}".format(f["name"], "/".join(f.get("value_types", []))),
lambda f: f["type"], lambda f: f["name"])
if want("layout") and not _is_empty(diff["struct_layout"]): if want("layout") and not _is_empty(diff["struct_layout"]):
_section_owned(out, "STRUCT LAYOUT", diff["struct_layout"], _fmt_layout, _section_owned(out, "STRUCT LAYOUT", diff["struct_layout"], _fmt_layout,
lambda x: x["owner"], lambda x: "@{0:#x}".format(x["offset"])) lambda x: x["owner"], lambda x: "@{0:#x}".format(x["offset"]))
+91
View File
@@ -0,0 +1,91 @@
"""Emulator roadmap from an Atlas export: what each script scope still lacks.
python -m ams.roadmap tracker.json -o docs/roadmap.md
Per scope: methods without a registration (with the signature read from the original),
emulator stubs, events and properties the emulator never names. Every item lists the engine
families whose DLLs have it - an item present in every family is core API, one present only
in BlooMoo is late. The report restates the tracker's limits: registration is not
correctness, and "never named" means no literal was found.
"""
from __future__ import annotations
import argparse
import json
from collections import Counter
from pathlib import Path
FAMILY_ORDER = ["Piklib 6.1", "Piklib 7.1", "Piklib 7.2", "Piklib 8", "BlooMoo"]
SHORT = {"Piklib 6.1": "6.1", "Piklib 7.1": "7.1", "Piklib 7.2": "7.2", "Piklib 8": "8", "BlooMoo": "BM"}
HIDDEN = {"INSTANCE"} # emulator helper, not an original type
def families(binary_ids, family_of) -> list[str]:
found = {family_of.get(b) for b in binary_ids} - {None}
return sorted(found, key=lambda f: (FAMILY_ORDER.index(f) if f in FAMILY_ORDER else len(FAMILY_ORDER), f))
def label(fams) -> str:
return ", ".join(SHORT.get(f, f) for f in fams) or "—"
def scope_gaps(scope: dict, family_of: dict) -> dict:
methods = scope["methods"]
original = [m for m in methods if m["original"]]
def item(name, binary_ids, detail=""):
return {"name": name, "families": families(binary_ids, family_of), "detail": detail}
missing = [item(m["name"], [o["binary_id"] for o in m["original"]], " / ".join(m.get("signatures") or []))
for m in original if m["status"] == "missing"]
stubs = [item(m["name"], [o["binary_id"] for o in m["original"]]) for m in methods if m["status"] == "stub_candidate"]
events = [item(e["name"], e["original"]) for e in scope.get("events", []) if e["status"] == "not_found"]
fields = [item(f["name"], f["original"], "/".join(f.get("value_types", [])))
for f in scope.get("fields", []) if f["status"] == "not_found"]
for items in (missing, events, fields): # widest presence first: core API before late additions
items.sort(key=lambda i: (-len(i["families"]), i["name"]))
return {"name": scope["name"], "methods_total": len(original),
"methods_registered": sum(m["status"] not in ("missing", "stub_candidate") for m in original),
"events_total": len(scope.get("events", [])), "fields_total": len(scope.get("fields", [])),
"missing": missing, "stubs": stubs, "events": events, "fields": fields}
def render(tracker: dict) -> str:
family_of = {b["id"]: b.get("family") for b in tracker["binaries"]}
scopes = [scope_gaps(t, family_of) for t in tracker["types"] if t["name"] not in HIDDEN]
scopes = [s for s in scopes if s["missing"] or s["stubs"] or s["events"] or s["fields"]]
scopes.sort(key=lambda s: (-(len(s["missing"]) + len(s["stubs"]) + len(s["events"]) + len(s["fields"])), s["name"]))
emulator = tracker.get("emulator", {})
counts = Counter(f for b in tracker["binaries"] for f in [b.get("family")] if f)
out = ["# Roadmapa emulatora", "",
"Wygenerowane przez `python -m ams.roadmap` z eksportu Atlasu "
f"(rewizja emulatora `{emulator.get('commit') or '?'}`"
f"{', niezacommitowane zmiany' if emulator.get('dirty') else ''}). Nie edytuj ręcznie.", "",
"Binarki: " + ", ".join(f"{SHORT.get(f, f)} × {n}" for f, n in sorted(counts.items(),
key=lambda kv: FAMILY_ORDER.index(kv[0]) if kv[0] in FAMILY_ORDER else 99)) + ".",
"Rejestracja nie oznacza poprawności; „brak literału” znaczy tylko, że nazwy nie ma w kodzie emulatora.",
"W nawiasie: rodziny silnika, w których DLL pozycja występuje.", "",
"| Zakres | Metody (zarejestrowane / w oryginale) | Bez rejestracji | Stuby | Eventy bez literału | Pola bez literału |",
"|---|---:|---:|---:|---:|---:|"]
for s in scopes:
out.append(f"| {s['name']} | {s['methods_registered']} / {s['methods_total']} | {len(s['missing'])} | "
f"{len(s['stubs'])} | {len(s['events'])} / {s['events_total']} | {len(s['fields'])} / {s['fields_total']} |")
for s in scopes:
out += ["", f"## {s['name']}"]
for title, items in (("Metody bez rejestracji", s["missing"]), ("Stuby w emulatorze", s["stubs"]),
("Eventy bez literału", s["events"]), ("Pola bez literału", s["fields"])):
if items:
out.append(f"- **{title}:** " + "; ".join(
f"`{i['name']}`" + (f" {i['detail']}" if i["detail"] else "") + f" ({label(i['families'])})"
for i in items))
return "\n".join(out) + "\n"
def main(argv=None):
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("tracker", type=Path, help="Atlas export (python -m ams.tracker ... --out)")
parser.add_argument("-o", "--out", type=Path, required=True)
args = parser.parse_args(argv)
args.out.write_text(render(json.loads(args.tracker.read_text(encoding="utf-8"))), encoding="utf-8")
if __name__ == "__main__":
main()
+27
View File
@@ -0,0 +1,27 @@
"""Start the local Atlas with this repository's snapshots and review registry."""
import argparse
import os
from pathlib import Path
def main():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument('--emulator-root', required=True, type=Path)
p.add_argument('--inventory', type=Path)
p.add_argument('--port', type=int, default=8766)
a = p.parse_args()
root = Path(__file__).resolve().parents[1]
if not (a.emulator_root / 'core/src').is_dir():
p.error('--emulator-root must point to Rex-EMoolator')
os.environ['AMS_EMULATOR_ROOT'] = str(a.emulator_root.resolve())
os.environ['AMS_TRACKER_SNAPSHOTS'] = str(root / 'snapshots')
os.environ['AMS_TRACKER_REVIEWS'] = str(root / 'tracker-reviews.json')
inventory = a.inventory or root / 'data/binary-inventory.json'
if inventory.is_file():
os.environ['AMS_TRACKER_INVENTORY'] = str(inventory.resolve())
import uvicorn
uvicorn.run('ams.api.app:create_app', factory=True, host='127.0.0.1', port=a.port)
if __name__ == '__main__':
main()
+10
View File
@@ -35,6 +35,16 @@ class Snapshot:
def events(self) -> list[dict]: def events(self) -> list[dict]:
return self.raw.get("events", []) return self.raw.get("events", [])
@property
def type_events(self) -> list[dict]:
"""Events per script type, read through each type's own vftable (schema 6)."""
return self.raw.get("type_events", [])
@property
def type_fields(self) -> list[dict]:
"""Properties per script type, read along its constructor chain (schema 7)."""
return self.raw.get("type_fields", [])
@property @property
def fields(self) -> list[dict]: def fields(self) -> list[dict]:
return self.raw.get("fields", []) return self.raw.get("fields", [])
+647
View File
@@ -0,0 +1,647 @@
"""Evidence-aware script API tracker. Never treats registration as correctness.
The Java adapter deliberately recognises the repository's MethodSpec registrations,
not arbitrary Java. Unknown dispatch and incomplete native extraction stay explicit.
"""
from __future__ import annotations
import argparse
from collections import Counter, defaultdict
import hashlib
import json
from pathlib import Path
import re
import subprocess
from .snapshot import Snapshot
ALIASES = {"BOOL": "BOOLEAN", "INT": "INTEGER"}
# Established factory mappings in the PIKLIB8/BlooMoo reference snapshots. When
# used to fill an unresolved mapping in another build, provenance stays inferred.
CLASS_ALIASES = {"CMC_CanvasObserver": "CANVAS_OBSERVER", "CMC_Groupped": "GROUP"}
ENTRY = re.compile(r'Map\s*\.\s*entry\s*\(\s*"([A-Za-z0-9_]+)"\s*,\s*MethodSpec\s*\.\s*of\s*\(')
JAVA_TOKENS = re.compile(r'"""[\s\S]*?"""|"(?:\\.|[^"\\])*"|\'(?:\\.|[^\'\\])*\'|//[^\n]*|/\*[\s\S]*?\*/')
SHA = re.compile(r"[0-9a-f]{64}")
def canonical(name: str) -> str:
name = name.upper()
return ALIASES.get(name, name)
def digest(data: bytes) -> str:
return hashlib.sha256(data).hexdigest()
def binary_family(binary: dict) -> str:
library = binary.get("library", binary.get("name", "?").split("__")[-1]).upper()
if library.startswith("BLOOMOO"):
return "BlooMoo"
return {"PIKLIB61.DLL": "Piklib 6.1", "PIKLIB71.DLL": "Piklib 7.1",
"PIKLIB72.DLL": "Piklib 7.2", "PIKLIB8.DLL": "Piklib 8"}.get(library, library.removesuffix(".DLL"))
def code_mask(text: str) -> str:
"""Mask literals/comments without shifting source positions or line numbers."""
return JAVA_TOKENS.sub(lambda m: re.sub(r"[^\n]", " ", m.group()), text)
def closing(code: str, start: int, pair: str = "()") -> int:
depth = 0
for i in range(start, len(code)):
if code[i] == pair[0]:
depth += 1
elif code[i] == pair[1]:
depth -= 1
if depth == 0:
return i + 1
raise ValueError("Unbalanced " + pair)
BUILTINS_SOURCE = "pl/genschu/bloomooemulator/interpreter/parser/CodeParser.java"
BUILTINS_DISPATCH = re.compile(r"\bdispatchSpecialCall\s*\([^)]*\)\s*\{")
CASE_ARM = re.compile(r"\bcase\b([^;{}]*?)->|\bdefault\b\s*->")
SIGNAL_LITERAL = re.compile(r'"(ON[A-Z][A-Z_]*)"')
NOT_SIGNALS = {"ONEBREAK"} # the @ONEBREAK statement, not an event
def scan_signals(root: Path, source_root: Path, variable_root: Path) -> dict:
"""Where the emulator names each event: {scope: {event: [source]}}. A `<Type>Variable.java`
file is that type's scope, Variable.java is `*`, any other file is `engine`. Only string
literals count (comments ignored); names built at runtime are invisible, so absence is
"no literal found", never proof that an event is missing."""
scopes = {}
for path, text in sorted((p, p.read_text(encoding="utf-8")) for p in source_root.rglob("*.java")):
scope = "engine"
if path.parent == variable_root and path.name.endswith("Variable.java"):
if path.name == "Variable.java":
scope = "*"
else:
match = re.search(r"return\s+VariableType\.([A-Z_]+)\s*;", code_mask(text))
scope = canonical(match[1]) if match else "engine"
for token in JAVA_TOKENS.finditer(text):
literal = SIGNAL_LITERAL.fullmatch(token.group())
if literal and literal[1] not in NOT_SIGNALS:
scopes.setdefault(scope, {}).setdefault(literal[1], []).append(
{"path": str(path.relative_to(root)), "line": text.count("\n", 0, token.start()) + 1})
return scopes
def switch_arms(text: str, code: str, head: re.Pattern) -> list[tuple[list[str], int, int]]:
"""[(case labels, start, end)] of the first `switch` inside the method `head` matches.
Positions index `text`; `code` is its literal/comment mask. Default arms are skipped."""
found = head.search(code)
if found is None:
return []
switch = code.index("switch", found.end())
body_start = code.index("{", switch)
body_end = closing(code, body_start, "{}")
arms = list(CASE_ARM.finditer(code, body_start, body_end))
out = []
for arm, following in zip(arms, arms[1:] + [None]):
if arm.group(1) is not None:
labels = re.findall(r'"([A-Za-z_]+)"', text[arm.start(1):arm.end(1)])
out.append((labels, arm.start(), following.start() if following else body_end))
return out
CNV_SOURCE = "pl/genschu/bloomooemulator/loader/CNVParser.java"
CNV_CREATE = re.compile(r"\bcreateVariable\s*\([^)]*\)\s*\{")
PROPERTY_KEY = re.compile(r'":([A-Z][A-Z0-9_]*)"')
ATTRIBUTE_NAME = re.compile(r'"([A-Z][A-Z0-9_]*)"')
# context.getAttribute(name, "X"), getAttributeInHierarchy(name(), "X"), attributes().get(name, "X")
ATTRIBUTE_CALL = re.compile(r"(?:\bgetAttribute\w*|\battributes\(\)\s*\.\s*get\w*)\s*\([^;]*$")
def scan_properties(root: Path, source_root: Path, variable_root: Path) -> dict:
"""Where the emulator reads each CNV property: {scope: {property: [source]}}. A `":NAME"`
key inside a `case "TYPE"` arm of CNVParser.createVariable belongs to those types, and
an attribute read (`getAttribute`, `getAttributeInHierarchy`, `attributes().get`) in
`<Type>Variable.java` to that type, in Variable.java to `*`; anything else is `engine`.
Like signals, absence means only that no literal was found."""
scopes = {}
for path in sorted(source_root.rglob("*.java")):
text = path.read_text(encoding="utf-8")
code = code_mask(text)
scope = "engine"
if path.parent == variable_root and path.name == "Variable.java":
scope = "*"
elif path.parent == variable_root and path.name.endswith("Variable.java"):
match = re.search(r"return\s+VariableType\.([A-Z_]+)\s*;", code)
scope = canonical(match[1]) if match else "engine"
arms = switch_arms(text, code, CNV_CREATE) if path == source_root / CNV_SOURCE else []
for token in JAVA_TOKENS.finditer(text):
literal = PROPERTY_KEY.fullmatch(token.group())
if literal is None:
literal = ATTRIBUTE_NAME.fullmatch(token.group())
if literal is None or not ATTRIBUTE_CALL.search(code[max(0, token.start() - 160):token.start()]):
continue
owners = [canonical(label) for labels, start, end in arms if start <= token.start() < end
for label in labels] or [scope]
source = {"path": str(path.relative_to(root)), "line": text.count("\n", 0, token.start()) + 1}
for owner in owners:
scopes.setdefault(owner, {}).setdefault(literal[1], []).append(source)
return scopes
def scan_builtins(root: Path, source_root: Path) -> dict | None:
"""`@IF`, `@LOOP`, ... are parsed by CodeParser.dispatchSpecialCall, not registered as
MethodSpec: each `case "NAME", ... ->` arm of its switch is one built-in statement."""
path = source_root / BUILTINS_SOURCE
if not path.is_file():
return None
text = path.read_text(encoding="utf-8")
code = code_mask(text)
if BUILTINS_DISPATCH.search(code) is None:
return None
methods = {}
for labels, start, end in switch_arms(text, code, BUILTINS_DISPATCH):
body = text[start:end]
status = "registered"
notes = []
if re.search(r"not (?:yet )?implemented", body, re.I) or "UnsupportedOperationException" in body:
status = "stub_candidate"
notes.append("Heurystyka: wyjątek lub komunikat o braku implementacji; wymaga przeglądu.")
for name in labels:
methods[name.upper()] = {"status": status, "notes": list(notes), "source": {
"path": str(path.relative_to(root)), "line": text.count("\n", 0, start) + 1,
"owner": "@", "body_sha256": digest(body.encode()), "file_sha256": digest(text.encode())}}
return {"methods": methods, "mapping_notes": [
"Instrukcje @ są rozpoznawane w CodeParser.dispatchSpecialCall, nie przez MethodSpec."]}
def _git(root: Path, *args: str) -> str | None:
result = subprocess.run(["git", "-C", str(root), *args], capture_output=True, text=True)
return result.stdout.strip() if result.returncode == 0 else None
def scan_emulator(root: Path) -> dict:
root = root.resolve()
source_root = root / "core/src"
variable_root = source_root / "pl/genschu/bloomooemulator/interpreter/variable"
if not (variable_root / "Variable.java").is_file():
raise ValueError("AMS_EMULATOR_ROOT must point to the Rex-EMoolator repository")
tree = hashlib.sha256()
for path in sorted(source_root.rglob("*.java")):
tree.update(str(path.relative_to(root)).encode() + b"\0" + path.read_bytes() + b"\0")
types = {}
warnings = []
for path in sorted(variable_root.glob("*Variable.java")):
text = path.read_text(encoding="utf-8")
code = code_mask(text)
match = re.search(r"return\s+VariableType\.([A-Z_]+)\s*;", code)
if path.name == "Variable.java":
name = "*"
elif match:
name = canonical(match[1])
else:
warnings.append("Nie rozpoznano typu Java: " + path.name)
continue
notes = []
if name != "*" and re.search(r"\bMethodResult\s+callMethod\s*\(", code):
notes.append("Własny dispatcher: lista rejestracji nie opisuje wszystkich wywołań dynamicznych.")
methods = {}
for entry in ENTRY.finditer(text):
if not code[entry.start():entry.start() + 3].strip():
continue
end = closing(code, code.index("(", entry.start()))
body = text[entry.start():end]
body_code = code[entry.start():end]
status = "registered"
method_notes = []
if "UnsupportedOperationException" in body_code or re.search(r"not (?:yet )?implemented", body, re.I):
status = "stub_candidate"
method_notes.append("Heurystyka: wyjątek lub komunikat o braku implementacji; wymaga przeglądu.")
if re.search(r"->\s*MethodResult\.noReturn\(\)", body_code):
method_notes.append("Pusta operacja; może odpowiadać oryginałowi. Nie oznaczono automatycznie jako stub.")
method = entry[1].upper()
if method in methods:
raise ValueError(f"Duplicate registration: {name}.{method}")
methods[method] = {"status": status, "notes": method_notes, "source": {
"path": str(path.relative_to(root)), "line": text.count("\n", 0, entry.start()) + 1,
"owner": name, "body_sha256": digest(body.encode()), "file_sha256": digest(text.encode()),
}}
types[name] = {"methods": methods, "mapping_notes": notes}
builtins = scan_builtins(root, source_root)
if builtins is not None:
types["@"] = builtins
return {"root": str(root), "signals": scan_signals(root, source_root, variable_root),
"properties": scan_properties(root, source_root, variable_root), "commit": _git(root, "rev-parse", "HEAD"),
"dirty": bool(_git(root, "status", "--porcelain")),
"source_tree_sha256": tree.hexdigest(), "types": types, "warnings": warnings}
def owner_name(owner: str) -> str:
if owner in ("CMC", "CMC_Object"):
return "*"
if owner in CLASS_ALIASES:
return CLASS_ALIASES[owner]
return canonical(owner.removeprefix("CMC_"))
def signature(dispatch_row: dict) -> str | None:
"""`(int, string/int, …) → double` from the argument getters and result allocator the
extractor saw in the method body; None when the body was not analysed."""
if "params" not in dispatch_row:
return None
args = ["/".join(p["types"]) for p in dispatch_row["params"]]
if dispatch_row.get("variadic"):
args.append("…")
returns = "/".join(dispatch_row["returns"]) or "—"
return f"({', '.join(args)}) → {returns}"
BASE_SCOPE = "*"
# getRunner(0) is the runner behind `@IF`, `@LOOP`, ... statements, not an object type.
BUILTIN_SCOPE, BUILTIN_TYPE_ID = "@", 0
def _constructor_runner(name, cpp_class, class_runner, bases, known_classes):
"""Runner owner for engines whose class constructors create their runner (Piklib 6.1):
the nearest class up this snapshot's constructor chain that creates one."""
if not class_runner:
return None
if not cpp_class:
candidates = [c for c in known_classes if owner_name(c) == name]
cpp_class = candidates[0] if len(candidates) == 1 else None
seen = set()
while cpp_class and cpp_class not in seen:
if cpp_class in class_runner:
return class_runner[cpp_class]
seen.add(cpp_class)
cpp_class = bases.get(cpp_class)
return None
def script_events(snap: Snapshot, scopes: dict | None = None) -> dict[str, list[str]]:
"""Script type -> ordered event names for one binary. `type_events` (each type's own
vftable, schema 6) wins; otherwise the class list of the nearest class up this snapshot's
constructor chain that has one (INTEGER -> CMC_Variable). `scopes` (script_owners) adds
singletons such as SCENE, whose class is their runner's owner."""
out = {}
for e in sorted(snap.type_events, key=lambda e: e["order"]):
out.setdefault(canonical(e["type"]), []).append(e["name"].upper())
by_class = {}
for e in sorted(snap.events, key=lambda e: e.get("order") or 0):
by_class.setdefault(e["owner"], []).append(e["name"].upper())
bases = {e["class"]: e["base_class"] for e in snap.field_inheritance}
known = set(by_class) | set(bases) | set(bases.values())
for t in snap.types:
name = canonical(t["script_name"])
if name in out:
continue
cls = t.get("cpp_class") if t.get("cpp_class") != "CMC_Behaviour" or name == "BEHAVIOUR" else None
if not cls:
candidates = [c for c in known if owner_name(c) == name]
cls = candidates[0] if len(candidates) == 1 else None
seen = set()
while cls and cls not in seen and cls not in by_class:
seen.add(cls)
cls = bases.get(cls)
if cls in by_class:
out[name] = by_class[cls]
for name, (owner, _) in (scopes or {}).items():
if name not in out and owner in by_class:
out[name] = by_class[owner]
return out
def script_fields(snap: Snapshot, scopes: dict | None = None) -> dict[str, list[tuple[str, list[str]]]]:
"""Script type -> [(property, value types)] for one binary. `type_fields` (constructor
chain, schema 7) wins; otherwise the class fields of the type's class and every base up
this snapshot's constructor chain, base first - properties accumulate, unlike events.
`scopes` (script_owners) adds singletons such as SCENE."""
out = {}
for f in sorted(snap.type_fields, key=lambda f: f["order"]):
out.setdefault(canonical(f["type"]), []).append((f["name"].upper(), f.get("value_types", [])))
by_class = {}
for f in sorted(snap.fields, key=lambda f: f.get("order") or 0):
by_class.setdefault(f["owner"], []).append((f["name"].upper(), [f.get("type")]))
bases = {e["class"]: e["base_class"] for e in snap.field_inheritance}
known = set(by_class) | set(bases) | set(bases.values())
for t in snap.types:
name = canonical(t["script_name"])
if name in out:
continue
cls = t.get("cpp_class") if t.get("cpp_class") != "CMC_Behaviour" or name == "BEHAVIOUR" else None
if not cls:
candidates = [c for c in known if owner_name(c) == name]
cls = candidates[0] if len(candidates) == 1 else None
chain = []
while cls and cls not in chain:
chain.append(cls)
cls = bases.get(cls)
fields = [f for c in reversed(chain) for f in by_class.get(c, [])]
if fields:
out[name] = fields
for name, (owner, _) in (scopes or {}).items():
if name not in out and owner in by_class:
out[name] = by_class[owner]
return out
def script_owners(snap: Snapshot, owners) -> dict[str, tuple[str, str]]:
"""Script scope -> (method owner, provenance) for one binary.
`runner_map` (CMC_RunnerFactory, Piklib 7.1+/BlooMoo) is the engine's own dispatch table and
wins: several types can share a runner (INTEGER/STRING/... -> Variable). Without it (Piklib
6.1, plugins, older extractions) the C++ class or its name is the best available guess."""
runner_map = snap.raw.get("runner_map") or {}
by_type_id = {e["type_id"]: e["runner"].removesuffix("_Runner") for e in runner_map.get("by_type_id", [])}
class_runner = {e["class"]: e["runner"].removesuffix("_Runner") for e in runner_map.get("by_class", [])}
bases = {e["class"]: e["base_class"] for e in snap.field_inheritance}
known_classes = set(class_runner) | set(bases) | set(bases.values())
mappings = {}
if BUILTIN_TYPE_ID in by_type_id:
mappings[BUILTIN_SCOPE] = (by_type_id[BUILTIN_TYPE_ID], "runner_factory")
for t in snap.types:
name = canonical(t["script_name"])
if t.get("type_id") in by_type_id:
mappings[name] = (by_type_id[t["type_id"]], "runner_factory")
continue
owner, mapping = t.get("cpp_class"), "explicit"
# Known extractor failure: unrelated factory entries all mapped to Behaviour.
if owner == "CMC_Behaviour" and name != "BEHAVIOUR":
owner = None
runner_owner = _constructor_runner(name, owner, class_runner, bases, known_classes)
if runner_owner:
mappings[name] = (runner_owner, "class_constructor")
continue
if not owner:
candidate = [o for o in owners if owner_name(o) == name]
owner, mapping = (candidate[0] if len(candidate) == 1 else None), "inferred"
if owner:
mappings[name] = (owner, mapping)
used = {owner for owner, _ in mappings.values()}
for owner in owners:
# Singletons (SYSTEM, SCENE, ...) and the base scope run without a factory type.
if owner not in used and owner_name(owner) not in mappings:
mappings[owner_name(owner)] = (owner, "inferred")
return mappings
def build_tracker(snapshots: list[Snapshot], emulator: dict, reviews: list[dict] | None = None) -> dict:
"""Join script APIs, keeping every binary and inherited declaration as evidence."""
warnings = list(emulator.get("warnings", []))
rows = {}
binaries = []
def type_row(name):
return rows.setdefault(name, {"name": name, "mapping_notes": [], "methods": {}})
def method_row(name, method):
return type_row(name)["methods"].setdefault(method, {
"name": method, "status": "missing", "verification": "unverified",
"source": None, "original": [], "reviews": [], "notes": [],
})
excluded = defaultdict(set) # (type, method) -> binaries whose code skips it for that type
seen = set()
for snap in snapshots:
sha = snap.binary.get("sha256")
if not isinstance(sha, str) or not SHA.fullmatch(sha.lower()):
sha = None
else:
sha = sha.lower()
# A content hash of the snapshot is NOT the identity of its DLL.
bid = sha or "snapshot:" + digest(json.dumps(snap.raw, sort_keys=True).encode())
if bid in seen:
warnings.append("Powtórzony snapshot pominięty: " + snap.binary.get("name", bid))
continue
seen.add(bid)
binaries.append({"id": bid, "sha256": sha, "name": snap.binary.get("name", "?"),
"engine": snap.binary.get("engine"), "identity": "binary" if sha else "snapshot_only",
"library": snap.binary.get("library", snap.binary.get("name", "?").split("__")[-1]),
"family": binary_family(snap.binary),
"sources": snap.binary.get("sources", []), "games": snap.binary.get("games", []),
"coverage": snap.raw.get("coverage", snap.raw.get("extraction", {}).get("scope",
snap.binary.get("extraction", {}).get("coverage"))),
"limitations": snap.raw.get("limitations", []) + snap.raw.get("extraction", {}).get("limitations", [])})
if not sha:
warnings.append(snap.binary.get("name", "?") + ": brak SHA-256 DLL; dowodów nie można przypisać do binarki.")
owners = defaultdict(list)
for m in snap.methods:
owners[m["owner"]].append(m)
id_names = defaultdict(set)
name_ids = defaultdict(set)
for m in snap.methods:
if m.get("id") is not None:
id_names[(m["owner"], m["id"])].add(m["name"].upper())
name_ids[(m["owner"], m["name"].upper())].add(m["id"])
dispatch = {(d["owner"], d.get("id")): d for d in snap.method_dispatch if d.get("id") is not None}
# Earliest Piklib 6.1 dispatches by name and has no method ids.
dispatch_by_name = {(d["owner"], d["name"]): d for d in snap.method_dispatch
if d.get("id") is None and d.get("name")}
parents = defaultdict(list)
for edge in snap.method_inheritance:
parents[edge["runner"].removesuffix("_Runner")].append(edge["base_runner"].removesuffix("_Runner"))
mappings = script_owners(snap, owners)
for name, names in script_events(snap, mappings).items():
events = type_row(name).setdefault("events", {})
for order, event in enumerate(names):
events.setdefault(event, {"name": event, "order": order, "original": [], "emulator": [],
"status": "not_found"})["original"].append(bid)
for name, props in script_fields(snap, mappings).items():
fields = type_row(name).setdefault("fields", {})
for order, (prop, value_types) in enumerate(props):
row = fields.setdefault(prop, {"name": prop, "order": order, "value_types": [],
"original": [], "emulator": [], "status": "not_found"})
if bid not in row["original"]:
row["original"].append(bid)
row["value_types"] = sorted(set(row["value_types"]) | {v for v in value_types if v})
for t in snap.types:
row = type_row(canonical(t["script_name"]))
if t.get("cpp_class_provenance"):
row["mapping_notes"].append(t["cpp_class_provenance"])
if canonical(t["script_name"]) not in mappings:
row["mapping_notes"].append(f"{snap.binary.get('name', '?')}: typ wykryty, klasa/metody nieustalone.")
sharing = defaultdict(set)
for name, (owner, _) in mappings.items():
sharing[owner].add(name)
for name, (owner, mapping) in mappings.items():
if len(sharing[owner]) > 1:
type_row(name)["mapping_notes"].append(
f"Wspólny runner {owner}_Runner z: {', '.join(sorted(sharing[owner] - {name}))}. "
"Rejestracja nie mówi, które metody działają dla tego typu.")
visited = set()
def add(current, inherited=False):
if current in visited:
return
visited.add(current)
if inherited and owner_name(current) == BASE_SCOPE and name != BASE_SCOPE:
# Base verbs (SEND, CLONE, ...) belong to every runner; they are listed once.
type_row(name).setdefault("inherits", []).append(BASE_SCOPE)
return
for m in owners[current]:
d = (dispatch.get((current, m.get("id")), {}) if m.get("id") is not None
else dispatch_by_name.get((current, m["name"].upper()), {}))
verdict = {canonical(k): v for k, v in (d.get("per_type") or {}).items()}.get(name)
if verdict == "excluded_by_type_check":
excluded[(name, m["name"].upper())].add(bid)
continue
row = method_row(name, m["name"].upper())
if len(name_ids[(current, m["name"].upper())]) > 1:
note = "Oryginał rejestruje tę nazwę z różnymi ID; skuteczny wybór wymaga sprawdzenia hashtable/dispatchera."
if note not in row["notes"]:
row["notes"].append(note)
if len(id_names[(current, m.get("id"))]) > 1:
note = "ID współdzielone przez nazwy: " + ", ".join(sorted(id_names[(current, m.get("id"))]))
if note not in row["notes"]:
row["notes"].append(note)
# Child declarations override names from ancestors for this binary.
if any(o["binary_id"] == bid and o["owner"] != current for o in row["original"]):
continue
if verdict == "trivial_virtual":
note = "W oryginale bez efektu dla tego typu: jego vftable zostawia wywoływane metody wirtualne puste."
if note not in row["notes"]:
row["notes"].append(note)
row["original"].append({"binary_id": bid, "owner": current, "method_id": m.get("id"),
"impl_addr": d.get("impl_addr"), "case_addr": d.get("case_addr"),
"signature": signature(d), "per_type": verdict,
"mapping": mapping, "inherited": inherited,
"registration_addr": m.get("registration_addr"), "string_addr": m.get("string_addr"),
"registration_call_addr": m.get("registration_call_addr"),
"id_push_addr": m.get("id_push_addr"),
"evidence_ids": m.get("evidence_ids", [])})
for parent in parents[current]:
add(parent, True)
add(owner)
for name, t in emulator["types"].items():
type_row(name)["mapping_notes"].extend(t["mapping_notes"])
for method, binding in t["methods"].items():
row = method_row(name, method)
notes = row["notes"] + binding.get("notes", [])
row.update(binding)
row["notes"] = notes
# Global fallback exists on concrete Variable implementations, not native-only types.
globals_ = emulator["types"].get("*", {}).get("methods", {})
for name, t in rows.items():
if name not in emulator["types"] or name == "*":
continue
for method, row in t["methods"].items():
if row["source"] is None and method in globals_:
row.update(globals_[method])
row["notes"] = row["notes"] + ["Obsługa przez globalny fallback Variable."]
for (name, method), binaries_ in excluded.items():
row = rows.get(name, {}).get("methods", {}).get(method)
if row is not None:
row["notes"].append(f"Oryginał ({len(binaries_)} binarek) pomija tę metodę dla tego typu: "
"warunek obj.getType() we wspólnym runnerze.")
signals = emulator.get("signals", {})
for name, t in rows.items():
for event, row in t.get("events", {}).items():
own, base, engine = (signals.get(scope, {}).get(event, []) for scope in (name, "*", "engine"))
row["emulator"] = own + base + engine
row["status"] = ("emitted" if own else "emitted_base" if base
else "engine_literal" if engine else "not_found")
properties = emulator.get("properties", {})
for name, t in rows.items():
for prop, row in t.get("fields", {}).items():
own, base, engine = (properties.get(scope, {}).get(prop, []) for scope in (name, "*", "engine"))
row["emulator"] = own + base + engine
row["status"] = ("read" if own else "read_base" if base
else "engine_literal" if engine else "not_found")
base_verbs = {m for m, row in rows.get(BASE_SCOPE, {}).get("methods", {}).items() if row["original"]}
for name, t in rows.items():
for method, row in t["methods"].items():
if name != BASE_SCOPE and method in base_verbs and row["source"] and not row["original"]:
row["notes"].append("W oryginale metoda bazowa (*) każdego runnera; emulator rejestruje ją lokalnie.")
# Reviews are declarative, version-controlled assertions; strict anchors prevent
# accidentally making an entire family green based on one stale binary/address.
for review in reviews or []:
validate_review(review)
row = rows.get(canonical(review["type"]), {}).get("methods", {}).get(review["method"].upper())
if row is None:
warnings.append("Przegląd nie pasuje do API: " + review["type"] + "." + review["method"])
continue
source = row["source"] or {}
current = (source.get("body_sha256") == review["body_sha256"]
and emulator["source_tree_sha256"] == review["source_tree_sha256"]
and emulator.get("commit") == review["emulator_commit"])
matches = any(o["binary_id"] == review["binary_sha256"] for o in row["original"])
row["reviews"].append({**review, "current": current and matches})
for t in rows.values():
for row in t["methods"].values():
current = [r for r in row["reviews"] if r["current"]]
targets = {o["binary_id"] for o in row["original"]}
verified = {r["binary_sha256"] for r in current if r["verdict"] == "matches"}
row["verified_variants"] = len(verified & targets)
if targets and targets <= verified:
row["verification"] = "runtime_tested" if all(any(r["binary_sha256"] == b and r["kind"] == "runtime" and r["verdict"] == "matches" for r in current) for b in targets) else "asm_reviewed"
row["status"] = "implemented"
elif any(r["verdict"] == "partial" for r in current):
row["status"] = "partial"
elif row["reviews"] and not current:
row["verification"] = "stale"
for row in t["methods"].values():
row["signatures"] = sorted({o["signature"] for o in row["original"] if o.get("signature")})
t["methods"] = sorted(t["methods"].values(), key=lambda m: m["name"])
t["mapping_notes"] = sorted(set(t["mapping_notes"]))
if "inherits" in t:
t["inherits"] = sorted(set(t["inherits"]))
t["events"] = sorted(t.get("events", {}).values(), key=lambda e: (e["order"], e["name"]))
t["fields"] = sorted(t.get("fields", {}).values(), key=lambda f: (f["order"], f["name"]))
all_rows = [m for t in rows.values() for m in t["methods"]]
all_events = [e for t in rows.values() for e in t["events"]]
all_fields = [f for t in rows.values() for f in t["fields"]]
return {"schema": "tracker/1", "emulator": {k: v for k, v in emulator.items() if k not in ("types", "warnings", "signals", "properties")},
"binaries": sorted(binaries, key=lambda b: (b["name"].lower(), b["id"])),
"types": sorted(rows.values(), key=lambda t: t["name"]),
"summary": {"types": len(rows), "methods": len(all_rows), "status": dict(Counter(m["status"] for m in all_rows)),
"verification": dict(Counter(m["verification"] for m in all_rows)),
"events": len(all_events), "event_status": dict(Counter(e["status"] for e in all_events)),
"fields": len(all_fields), "field_status": dict(Counter(f["status"] for f in all_fields))},
"warnings": warnings + ["Brak obserwacji w wariancie oznacza nieustalone, nie brak metody.",
"Rejestracja Java nie dowodzi poprawności. Liczniki obejmują pary typ/metoda, także odziedziczone.",
"Typ → runner pochodzi z CMC_RunnerFactory, gdy snapshot ma runner_map; inaczej z nazwy klasy (wnioskowane).",
"Zakres * to metody bazowe CMC_Runner, wspólne dla każdego typu (pole inherits); nie są powielane przy typach.",
"Zakres @ to wbudowane instrukcje @IF/@LOOP/... (runner typu 0).",
"Eventy: status emulatora to literał nazwy w kodzie (klasa typu / Variable / silnik); nazwy budowane dynamicznie nie są widoczne.",
"Pola: status emulatora to literał klucza (`:NAME` w gałęzi typu w CNVParser, odczyt atrybutu w klasie typu lub w Variable.java, albo w innym kodzie)."]}
def validate_review(review: dict) -> None:
required = ("type", "method", "binary_sha256", "rva", "emulator_commit", "body_sha256",
"source_tree_sha256", "reviewer", "date", "notes", "evidence", "kind", "verdict")
if any(not isinstance(review.get(k), str) or not review[k].strip() for k in required):
raise ValueError("Review requires nonempty fields: " + ", ".join(required))
for k in ("binary_sha256", "body_sha256", "source_tree_sha256"):
if not SHA.fullmatch(review[k]):
raise ValueError("Invalid review digest: " + k)
if not re.fullmatch(r"0x[0-9a-fA-F]+", review["rva"]):
raise ValueError("Review RVA must be hexadecimal (0x...)")
if review["kind"] not in ("asm", "runtime") or review["verdict"] not in ("matches", "partial", "differs"):
raise ValueError("Invalid review kind/verdict")
def load_reviews(path: Path | None) -> list[dict]:
if path is None:
return []
data = json.loads(path.read_text())
if data.get("schema") != "tracker-reviews/1" or not isinstance(data.get("reviews"), list):
raise ValueError("Expected tracker-reviews/1 with a reviews list")
for review in data["reviews"]:
validate_review(review)
# A single current assertion per binary/method/source; conflicting verdicts fail closed.
keys = [(r["type"], r["method"], r["binary_sha256"], r["source_tree_sha256"], r["emulator_commit"]) for r in data["reviews"]]
if len(keys) != len(set(keys)):
raise ValueError("Duplicate review for the same method, binary and source revision")
return data["reviews"]
def main(argv=None):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("snapshots", nargs="+")
parser.add_argument("--emulator-root", required=True, type=Path)
parser.add_argument("--reviews", type=Path)
parser.add_argument("--out", type=Path, required=True)
args = parser.parse_args(argv)
result = build_tracker([Snapshot.load(p) for p in args.snapshots], scan_emulator(args.emulator_root), load_reviews(args.reviews))
args.out.write_text(json.dumps(result, ensure_ascii=False, indent=2) + "\n")
print(json.dumps(result["summary"]))
if __name__ == "__main__":
main()
+593
View File
@@ -0,0 +1,593 @@
{
"schema": "binary-inventory/1",
"builds": [
{
"sha256": "1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf",
"size": 2498560,
"family": "BLOOMOO",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL",
"/Users/genszu/_dll_repository/Reksio i Kretes w akcji__fb9a2b81d685__BlooMooDLL.dll"
],
"analysis": "pending",
"suggested_snapshot": "1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.snapshot.json"
},
{
"sha256": "346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d",
"size": 2506752,
"family": "BLOOMOO",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Kapitan Nemo__3be911183e59__BLOOMOOD.DLL",
"/Users/genszu/_dll_repository/Reksio i Kapitan Nemo__3be911183e59__BlooMooDLL.dll"
],
"analysis": "pending",
"suggested_snapshot": "346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d.snapshot.json"
},
{
"sha256": "41249638fbb62c7a3cc2785ae7d6a4a736ad52c9cc7d9709a7067b52ede07b69",
"size": 1961984,
"family": "BLOOMOO",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Bolek i Lolek - Język niemiecki dla najmłodszych PL__f5b6842faf88__BLOOMOOW.DLL",
"/Users/genszu/_dll_repository/Bolek i Lolek - Język niemiecki dla najmłodszych PL__f5b6842faf88__BlooMooWEB.dll"
],
"analysis": "pending",
"suggested_snapshot": "41249638fbb62c7a3cc2785ae7d6a4a736ad52c9cc7d9709a7067b52ede07b69.snapshot.json"
},
{
"sha256": "848761c5e9fa2bd5345cfff33b96d3194dd3cbe5dfce297f722b143c50aa7a5f",
"size": 1712128,
"family": "BLOOMOO",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Bolek i Lolek - Alfabet i Nauka Czytania__788ab0406ab4__BLOOMOOD.DLL",
"/Users/genszu/_dll_repository/Bolek i Lolek - Alfabet i Nauka Czytania__788ab0406ab4__BlooMooDLL.dll"
],
"analysis": "pending",
"suggested_snapshot": "848761c5e9fa2bd5345cfff33b96d3194dd3cbe5dfce297f722b143c50aa7a5f.snapshot.json"
},
{
"sha256": "a0060b283fccd1ffbe5dc49a947eb856540aa3db155f96d44afb0e4f97e9de6e",
"size": 2588672,
"family": "BLOOMOO",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Roszpunka RU__d63a5fb575f9__BLOOMOOD.DLL",
"/Users/genszu/_dll_repository/Roszpunka RU__d63a5fb575f9__BlooMooDLL.dll"
],
"analysis": "pending",
"suggested_snapshot": "a0060b283fccd1ffbe5dc49a947eb856540aa3db155f96d44afb0e4f97e9de6e.snapshot.json"
},
{
"sha256": "be1e6c7c15b8bbac78a637fa992860d378ef922020ee78ac0e6102a0cacb100a",
"size": 1581056,
"family": "BLOOMOO",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Wehikuł Czasu__2679920b3735__BLOOMOOD.DLL",
"/Users/genszu/_dll_repository/Reksio i Wehikuł Czasu__2679920b3735__BlooMooDLL.dll"
],
"analysis": "pending",
"suggested_snapshot": "be1e6c7c15b8bbac78a637fa992860d378ef922020ee78ac0e6102a0cacb100a.snapshot.json"
},
{
"sha256": "d5ec62c16ee4ae84486e2076864a6b1e52aaaed311eb65b3a1847701a583b501",
"size": 2588672,
"family": "BLOOMOO",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Bolek i Lolek - Kraina Wyobraźni moje pierwsze studio plastyczne__9ac8ebbe0cc2__BLOOMOOD.DLL",
"/Users/genszu/_dll_repository/Bolek i Lolek - Kraina Wyobraźni moje pierwsze studio plastyczne__9ac8ebbe0cc2__BlooMooDLL.dll",
"/Users/genszu/_dll_repository/Bolek i Lolek. Moje pierwsze literki__9ac8ebbe0cc2__BLOOMOOD.DLL",
"/Users/genszu/_dll_repository/Bolek i Lolek. Moje pierwsze literki__9ac8ebbe0cc2__BlooMooDLL.dll"
],
"analysis": "pending",
"suggested_snapshot": "d5ec62c16ee4ae84486e2076864a6b1e52aaaed311eb65b3a1847701a583b501.snapshot.json"
},
{
"sha256": "91d5cb531723746a24c4be6182c609c0350336a83811b56012d917d375ea6fe0",
"size": 327680,
"family": "DPIKLIB",
"scope": "excluded_early_engine",
"paths": [
"/Users/genszu/_dll_repository/ABC z Reksiem__e07b7a6f7f91__DPIKLIB.DLL",
"/Users/genszu/_dll_repository/Bolek i Lolek Pamiątki z podróży__e07b7a6f7f91__DPIKLIB.DLL",
"/Users/genszu/_dll_repository/Reksio i przyjaciele__e07b7a6f7f91__DPIKLIB.DLL"
],
"analysis": "pending",
"suggested_snapshot": "91d5cb531723746a24c4be6182c609c0350336a83811b56012d917d375ea6fe0.snapshot.json"
},
{
"sha256": "7f26356f30f283f7697c9b430fadc68e3932b124dd099d4affd4dc3a21d8e06e",
"size": 126976,
"family": "KOLOROWANKA",
"scope": "plugin",
"paths": [
"/Users/genszu/Reksio/Herkules + Odyseusz/Odyseusz/Kolorowanka.dll"
],
"analysis": "snapshot_available",
"suggested_snapshot": "7f26356f30f283f7697c9b430fadc68e3932b124dd099d4affd4dc3a21d8e06e.snapshot.json"
},
{
"sha256": "fc6127e077d0dc8898b60373000847d82264fa30781de50365445bec286de349",
"size": 348160,
"family": "PIKLIB30",
"scope": "excluded_early_engine",
"paths": [
"/Users/genszu/_dll_repository/Bolek i Lolek - Na tropie zaginionej księgi ortografii__a96ea4f86178__PIKLIB30.DLL"
],
"analysis": "pending",
"suggested_snapshot": "fc6127e077d0dc8898b60373000847d82264fa30781de50365445bec286de349.snapshot.json"
},
{
"sha256": "5178f0fc7e02859d023e0d077daa1589870d81875661945728e1ae602153650d",
"size": 466944,
"family": "PIKLIB41",
"scope": "excluded_early_engine",
"paths": [
"/Users/genszu/_dll_repository/Alfabet Nauka czytania i pisania__002863beef82__PIKLIB41.DLL",
"/Users/genszu/_dll_repository/Matematyka Dodawanie i odejmowanie__002863beef82__PIKLIB41.DLL"
],
"analysis": "pending",
"suggested_snapshot": "5178f0fc7e02859d023e0d077daa1589870d81875661945728e1ae602153650d.snapshot.json"
},
{
"sha256": "99a51a28d70ac5dc1a91b7c67e85e6c69d0261c4b977e0ab660419caa4c521a4",
"size": 357072,
"family": "PIKLIB41",
"scope": "excluded_early_engine",
"paths": [
"/Users/genszu/_dll_repository/ABC z Reksiem [piklib41]__0cf39b192793__PIKLIB41.DLL"
],
"analysis": "pending",
"suggested_snapshot": "99a51a28d70ac5dc1a91b7c67e85e6c69d0261c4b977e0ab660419caa4c521a4.snapshot.json"
},
{
"sha256": "0cc29c00b415ac40dc71e9265be297ec12cd8b9a68f2e1a7ec97338710595c92",
"size": 466944,
"family": "PIKLIB50",
"scope": "excluded_early_engine",
"paths": [
"/Users/genszu/_dll_repository/Wielki Teleturniej Smoka Wawelskiego [piklib5]__414f63369464__PIKLIB50.DLL"
],
"analysis": "pending",
"suggested_snapshot": "0cc29c00b415ac40dc71e9265be297ec12cd8b9a68f2e1a7ec97338710595c92.snapshot.json"
},
{
"sha256": "e426581101136e80f11784cff63022361338eaaf43463c22ff31ac7dcf954b44",
"size": 573440,
"family": "PIKLIB60",
"scope": "excluded_early_engine",
"paths": [
"/Users/genszu/_dll_repository/Liczę z Reksiem__b8d13e830b9c__PIKLIB60.DLL"
],
"analysis": "pending",
"suggested_snapshot": "e426581101136e80f11784cff63022361338eaaf43463c22ff31ac7dcf954b44.snapshot.json"
},
{
"sha256": "39bb96560cd7e08dfb9aaaf0a31a390bfcc2311d1190e088b1b46e1a006dd33d",
"size": 925696,
"family": "PIKLIB61",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Pinokio__c0f83acd825b__PIKLIB61.DLL"
],
"analysis": "pending",
"suggested_snapshot": "39bb96560cd7e08dfb9aaaf0a31a390bfcc2311d1190e088b1b46e1a006dd33d.snapshot.json"
},
{
"sha256": "44913173dd58411c8e20aed51276989fc41a7aa63f7a20f03701f6275aab420e",
"size": 757760,
"family": "PIKLIB61",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Aladyn__91b0330a11ab__PIKLIB61.DLL"
],
"analysis": "pending",
"suggested_snapshot": "44913173dd58411c8e20aed51276989fc41a7aa63f7a20f03701f6275aab420e.snapshot.json"
},
{
"sha256": "694ce89d3030dc81b136cef2667fcd853e3f28ebe91d82ff0850e94a1935fbcb",
"size": 704512,
"family": "PIKLIB61",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Skarb Piratów [piklib61]__715272459e13__PIKLIB61.DLL"
],
"analysis": "snapshot_available",
"suggested_snapshot": "694ce89d3030dc81b136cef2667fcd853e3f28ebe91d82ff0850e94a1935fbcb.snapshot.json"
},
{
"sha256": "a02d2faa5b203e6c0008842f851d75a50a0f54a61b03c291feffe1b9a9051fe3",
"size": 704512,
"family": "PIKLIB61",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Skarb Piratów [piklib61]__3bb31de8b45f__PIKLIB61.DLL"
],
"analysis": "pending",
"suggested_snapshot": "a02d2faa5b203e6c0008842f851d75a50a0f54a61b03c291feffe1b9a9051fe3.snapshot.json"
},
{
"sha256": "e8a86390bcfabf29e8ca9d80e95df501988275aa0f170acb34081c19204dc58e",
"size": 774144,
"family": "PIKLIB61",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Piotruś Pan PL__9de20dceea68__PIKLIB61.DLL"
],
"analysis": "pending",
"suggested_snapshot": "e8a86390bcfabf29e8ca9d80e95df501988275aa0f170acb34081c19204dc58e.snapshot.json"
},
{
"sha256": "b213bb58e4ce2806d40786f79a62e658ca190dc4d997653fa2a6706493fa4bb8",
"size": 1064960,
"family": "PIKLIB71",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i UFO [piklib71]__128b235b6d94__PIKLIB71.DLL"
],
"analysis": "pending",
"suggested_snapshot": "b213bb58e4ce2806d40786f79a62e658ca190dc4d997653fa2a6706493fa4bb8.snapshot.json"
},
{
"sha256": "ff6b4fad38684cc44a672b0475d7d5ade34c8e91e76dd3d330d6121d3847a367",
"size": 1064960,
"family": "PIKLIB71",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Skarb Piratów [piklib71]__27c2b7699f01__PIKLIB71.DLL"
],
"analysis": "pending",
"suggested_snapshot": "ff6b4fad38684cc44a672b0475d7d5ade34c8e91e76dd3d330d6121d3847a367.snapshot.json"
},
{
"sha256": "7d64081b57fb645e3fb7fef823baed4ae193a5e0e1848e451bf069ccf28aa2c7",
"size": 1118208,
"family": "PIKLIB72",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Ortografia__923a103d5b05__PIKLIB72.DLL"
],
"analysis": "pending",
"suggested_snapshot": "7d64081b57fb645e3fb7fef823baed4ae193a5e0e1848e451bf069ccf28aa2c7.snapshot.json"
},
{
"sha256": "f83c0c553d3a16ed3dc14b8358e9a7ad5464dc46caecc032c371b9f5a0c90c73",
"size": 1118208,
"family": "PIKLIB72",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Szkoła Koziołka Matołka [piklib72]__549b6851b2c9__PIKLIB72.DLL"
],
"analysis": "pending",
"suggested_snapshot": "f83c0c553d3a16ed3dc14b8358e9a7ad5464dc46caecc032c371b9f5a0c90c73.snapshot.json"
},
{
"sha256": "06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57",
"size": 1380352,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Robin Hood PL__bd761ca745b1__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.snapshot.json"
},
{
"sha256": "0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87",
"size": 1855488,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Wesołe Przedszkole Koziołka Matołka PL__7b7ef02ea246__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.snapshot.json"
},
{
"sha256": "1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009",
"size": 1826816,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/doktor dolittle i sindbad__f01db0dd5a0d__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.snapshot.json"
},
{
"sha256": "2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e",
"size": 1523712,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Księga Dżungli PL__c32b439b7217__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.snapshot.json"
},
{
"sha256": "6da6954eddead85d1ea2862bab2aeca13bdc44997766157bc7be2569819239f6",
"size": 1896448,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Bolek i Lolek - Olimpiada Letnia__42d6a0c7fdf2__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "6da6954eddead85d1ea2862bab2aeca13bdc44997766157bc7be2569819239f6.snapshot.json"
},
{
"sha256": "90b61f1f8d10532fd8f7fc976aa56ffbf2d2e9b7c23006fb0770f951fc10f198",
"size": 1830560,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Bolek i Lolek Zwariowana olimpiada PL__d3819a92b84b__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "90b61f1f8d10532fd8f7fc976aa56ffbf2d2e9b7c23006fb0770f951fc10f198.snapshot.json"
},
{
"sha256": "94b4c2ed80953028a4cb6ead67a72ed3059bfe2c59809492d758791f51ac2f61",
"size": 1826816,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Przedszkole Reksia__33cfd6523c04__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "94b4c2ed80953028a4cb6ead67a72ed3059bfe2c59809492d758791f51ac2f61.snapshot.json"
},
{
"sha256": "987d69fad1021e02ce9637a873da87145b1db997f191f6aabfb8f66405dc77a1",
"size": 1826816,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Wesołe Przedszkole Bolka i Lolka PL__c0d85c50e3dc__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "987d69fad1021e02ce9637a873da87145b1db997f191f6aabfb8f66405dc77a1.snapshot.json"
},
{
"sha256": "a5dea135d4ce909abedd3b7623dc1e7390f578f5242799c66b266257a04de86b",
"size": 1831680,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Ufo__5f6cbb33576d__PIKLIB8.DLL"
],
"analysis": "snapshot_available",
"suggested_snapshot": "a5dea135d4ce909abedd3b7623dc1e7390f578f5242799c66b266257a04de86b.snapshot.json"
},
{
"sha256": "a6fae72f648895829e115a7a49c31165f57264705074fec5742c34c651cf5882",
"size": 1892352,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Tezeusz i Nić Ariadny__0967908f2df1__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "a6fae72f648895829e115a7a49c31165f57264705074fec5742c34c651cf5882.snapshot.json"
},
{
"sha256": "a7fbfc4600c3f897fc58d8c8d1626ef43de5c9f0742dfcc89d5b865f5b163f91",
"size": 1826816,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Alibaba, Robinson Crusoe PL__e80093de9636__PIKLIB8.DLL",
"/Users/genszu/_dll_repository/Herkules, Odyseusz PL__e80093de9636__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "a7fbfc4600c3f897fc58d8c8d1626ef43de5c9f0742dfcc89d5b865f5b163f91.snapshot.json"
},
{
"sha256": "d55caf201190d20275db6c26e014664f3b8f65c5fb6bbd2cc81d03aaa3037977",
"size": 1826816,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Alibaba, Robinson Crusoe PL__d6509a132e2a__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "d55caf201190d20275db6c26e014664f3b8f65c5fb6bbd2cc81d03aaa3037977.snapshot.json"
},
{
"sha256": "d6968a236288270e90604f5d401244d57ca0882c1405fcf0867dcd3b3e0d64c9",
"size": 1826816,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/doktor dolittle i sindbad__2c1705410e7a__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "d6968a236288270e90604f5d401244d57ca0882c1405fcf0867dcd3b3e0d64c9.snapshot.json"
},
{
"sha256": "d9cf5a3896c9941348d1246e4830096b192f1f0e107b1d7b1e2d73840c0204a2",
"size": 1511424,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Wyprawa po Złote Runo__d1cc807bcbe5__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "d9cf5a3896c9941348d1246e4830096b192f1f0e107b1d7b1e2d73840c0204a2.snapshot.json"
},
{
"sha256": "ec833739ba267aa137d5f69144ee73711e57710af4ffdb8cd9403dc016f7cf40",
"size": 1515520,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Czarodzieje__a70f97e970c6__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "ec833739ba267aa137d5f69144ee73711e57710af4ffdb8cd9403dc016f7cf40.snapshot.json"
},
{
"sha256": "f21e0b6ff7c0110e4610c9cf93966a1d75b1b5155f7a2330cef1c742930da8ff",
"size": 1515520,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio_I_Czarodzieje1.0__92d602bbea05__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "f21e0b6ff7c0110e4610c9cf93966a1d75b1b5155f7a2330cef1c742930da8ff.snapshot.json"
},
{
"sha256": "f6bb9e5fcdd0fe5dfff3885ca4c713f1c99d0559d614a78cc0d7bbc22923c5d6",
"size": 1163264,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Bolek I Lolek Angielski Dla Dzieci__f95af58f4d8a__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "f6bb9e5fcdd0fe5dfff3885ca4c713f1c99d0559d614a78cc0d7bbc22923c5d6.snapshot.json"
},
{
"sha256": "fc77764002f4b2e883227a16e566fabf613df24871db8e6e6d1f71b7eedbd732",
"size": 1826816,
"family": "PIKLIB8",
"scope": "engine",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Skarb Piratów__87c5ca97f599__PIKLIB8.DLL"
],
"analysis": "pending",
"suggested_snapshot": "fc77764002f4b2e883227a16e566fabf613df24871db8e6e6d1f71b7eedbd732.snapshot.json"
},
{
"sha256": "0d195870b5ea316ef6ce0bcfc27424f0b5da7bc1210cbb5b44f7bb1ca3665a0f",
"size": 430080,
"family": "RPIKLIB",
"scope": "excluded_early_engine",
"paths": [
"/Users/genszu/_dll_repository/ABC z Reksiem__8ad3452eb8b7__RPIKLIB.DLL"
],
"analysis": "pending",
"suggested_snapshot": "0d195870b5ea316ef6ce0bcfc27424f0b5da7bc1210cbb5b44f7bb1ca3665a0f.snapshot.json"
},
{
"sha256": "5959dd4e105e2e8588dd3da4473afa8c683f646d9b12a513e7bb84a9fdd558b4",
"size": 73728,
"family": "SEKAI",
"scope": "native_dependency",
"paths": [
"/Users/genszu/_dll_repository/Alibaba, Robinson Crusoe PL__5baf3b1df15f__SEKAI.DLL"
],
"analysis": "pending",
"suggested_snapshot": "5959dd4e105e2e8588dd3da4473afa8c683f646d9b12a513e7bb84a9fdd558b4.snapshot.json"
},
{
"sha256": "63f8561000794d714a55c3ae9c8423f8593c4016524b60fc5da74dae2e1dbb21",
"size": 245760,
"family": "SEKAI",
"scope": "native_dependency",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Ortografia__8513603d192e__SEKAI.DLL"
],
"analysis": "pending",
"suggested_snapshot": "63f8561000794d714a55c3ae9c8423f8593c4016524b60fc5da74dae2e1dbb21.snapshot.json"
},
{
"sha256": "725f6da8a3aa1548ddbc6939319e1ea16035be94064cbe1e3ccceaf3acfd2b86",
"size": 278528,
"family": "SEKAI",
"scope": "native_dependency",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Czarodzieje__aca5c14da8db__SEKAI.DLL"
],
"analysis": "pending",
"suggested_snapshot": "725f6da8a3aa1548ddbc6939319e1ea16035be94064cbe1e3ccceaf3acfd2b86.snapshot.json"
},
{
"sha256": "9430c526782c69fc8d798e610e4e24eb8b73f44a309a431bbc43f3dfb3b3d32b",
"size": 278528,
"family": "SEKAI",
"scope": "native_dependency",
"paths": [
"/Users/genszu/_dll_repository/Reksio_I_Czarodzieje1.0__3363ec44e6d4__SEKAI.DLL"
],
"analysis": "pending",
"suggested_snapshot": "9430c526782c69fc8d798e610e4e24eb8b73f44a309a431bbc43f3dfb3b3d32b.snapshot.json"
},
{
"sha256": "b1c91c2ba709dfb482632a28f1ac53f1070b54000426093ee5ae3f7c0144d773",
"size": 245760,
"family": "SEKAI",
"scope": "native_dependency",
"paths": [
"/Users/genszu/_dll_repository/Szkoła Koziołka Matołka [piklib72]__8fb55fc3d1c6__SEKAI.DLL"
],
"analysis": "pending",
"suggested_snapshot": "b1c91c2ba709dfb482632a28f1ac53f1070b54000426093ee5ae3f7c0144d773.snapshot.json"
},
{
"sha256": "c8d8df6b4527f4e81655342c085a1b638563415c7811794afdd0cb05ad93852f",
"size": 278528,
"family": "SEKAI",
"scope": "native_dependency",
"paths": [
"/Users/genszu/_dll_repository/Reksio i Wehikuł Czasu__d0fe69735317__SEKAI.DLL"
],
"analysis": "pending",
"suggested_snapshot": "c8d8df6b4527f4e81655342c085a1b638563415c7811794afdd0cb05ad93852f.snapshot.json"
},
{
"sha256": "e7e00063606af2b8c8974c0f0aab80e12b7212d66a01096678913efdc7c877a9",
"size": 282272,
"family": "SEKAI",
"scope": "native_dependency",
"paths": [
"/Users/genszu/_dll_repository/Bolek i Lolek Zwariowana olimpiada PL__f90cfb00a154__SEKAI.DLL"
],
"analysis": "pending",
"suggested_snapshot": "e7e00063606af2b8c8974c0f0aab80e12b7212d66a01096678913efdc7c877a9.snapshot.json"
},
{
"sha256": "ef68c5f8240fbcd4eb7f9098ca2725515825ff6e1809bab244ae708eca9adfc2",
"size": 278528,
"family": "SEKAI",
"scope": "native_dependency",
"paths": [
"/Users/genszu/_dll_repository/doktor dolittle i sindbad__91e04c514af8__SEKAI.DLL"
],
"analysis": "pending",
"suggested_snapshot": "ef68c5f8240fbcd4eb7f9098ca2725515825ff6e1809bab244ae708eca9adfc2.snapshot.json"
},
{
"sha256": "1f6649e93ddbd12be1865a06f15fbae5c62685dab0efb9072bdd2af1ccaca78f",
"size": 131072,
"family": "WORLD",
"scope": "plugin",
"paths": [
"/Users/genszu/Reksio/Reksio i Czarodzieje/World.dll"
],
"analysis": "pending",
"suggested_snapshot": "1f6649e93ddbd12be1865a06f15fbae5c62685dab0efb9072bdd2af1ccaca78f.snapshot.json"
}
],
"summary": {
"files": 64,
"unique": 51,
"by_scope": {
"engine": 34,
"excluded_early_engine": 7,
"plugin": 2,
"native_dependency": 8
}
},
"limitations": [
"Scope is inferred from filenames; validate renamed or unclassified DLLs.",
"snapshot_available means identity matches; it does not establish complete API extraction."
]
}
+95
View File
@@ -0,0 +1,95 @@
# Batch silników — wynik analizy 2026-10-24 (schemat 5)
Ponowny przebieg 34 / 34 DLL z osią `runner_map` i faktami z ciał metod. Poprzedni wynik (2026-10-10, schemat 4) zostaje niżej jako historia.
| Rodzina | DLL | Unikalne typy / DLL | Pary właściciel + metoda / DLL | Runnery z fabryki | Metody z odczytaną sygnaturą |
|---|---:|---:|---:|---:|---:|
| BLOOMOO | 7 | 39–41 | 576–658 | 42–44 | 369–430 |
| PIKLIB61 | 5 | 23–23 | 186–229 | — (runner z konstruktora klasy) | — |
| PIKLIB71 | 2 | 26–26 | 351–351 | 32 | 194 |
| PIKLIB72 | 2 | 35–35 | 461–461 | 38 | 293 |
| PIKLIB8 | 18 | 36–39 | 496–574 | 39–42 | 320–384 |
Nowe pary pochodzą z runnerów bez symboli (VECTOR, FILTER, STATICFILTER, PATH, FIFO/LIFO, MOVIE) i z runnera typu 0, czyli instrukcji `@IF`/`@LOOP`/…. Wcześniej ekstraktor ich nie widział.
Schemat 6 (ten sam dzień) dodał `type_events`: eventy każdego typu z jego vtable. Tam, gdzie istniała lista klasowa, wynik jest identyczny; doszły listy typów bez własnej klasy z listą (INTEGER/STRING/… → CMC_Variable, FILTER, FIFO/LIFO, MOVIE). Tracker: 218 par typ/event w 40 typach; w emulatorze 30 emitowanych w klasie typu, 40 w `Variable.java`, 72 tylko jako literał w kodzie silnika, 76 bez literału (m.in. ONDONE we wszystkich typach, ANIMO ONPAUSED/ONRESUMED, FIFO/LIFO ONEMPTY, SCROLL ONTOP/ONBOTTOM/ONLEFT/ONRIGHT, wszystkie eventy CANVAS_OBSERVER).
Schemat 7 (ten sam dzień): `type_fields` (właściwości per typ z łańcucha konstruktorów, także klasy bez symboli: VECTOR VALUE/SIZE, FILTER ACTION, PATH NODES, MOVIE FILENAME/PRIORITY/POSITION) i Piklib 6.1 w pełniejszej postaci: ID metod z `getMethodId` (Aladyn 167, Pinokio 178, Piotruś Pan 184), sygnatury dla 101–111 metod na build; najstarszy 6.1 (Skarb Piratów) ma ciała metod wklejone w `run(CXString)`, więc nadal bez sygnatur. Przy okazji zniknęły błędne nazwy pól BlooMoo z bajtów vtable (`X5`, `Gs`). Tracker: 974 pary typ/metoda (439 / 37 / 498), 255 par typ/event, 187 par typ/pole (60 czytanych w obsłudze typu, 14 w `Variable.java`, 24 tylko jako literał w innym kodzie, 89 bez literału). Roadmapa: [roadmap.md](roadmap.md).
Tracker przy rewizji emulatora `42f4ffb35305e7582173d24c5f0ba4c4acc9d062` (snapshoty batcha + WORLD + KOLOROWANKA): 60 grup, 970 par typ/metoda; 439 rejestracji bez flagi stubu, 37 podejrzeń stubu, 494 bez rejestracji, 0 potwierdzeń zgodności. Liczby nie są porównywalne 1:1 z poprzednimi: metody bazowe `CMC_Runner` liczone są raz (zakres `*`), a pseudo-typy VARIABLE / BASICCONDITION zniknęły, bo typy zmiennych i warunków dostają metody wspólnego runnera zawężone warunkami `obj.getType()`.
## Historia: wynik analizy 2026-10-10 (schemat 4)
Przetworzono **34 / 34** unikalne DLL silników z manifestu. Wszystkie dały niepuste snapshoty typów i metod; to potwierdza wykonanie ekstrakcji, nie pełne rozpoznanie API ani zgodność emulatora. Osobno wczytano snapshoty rejestracji WORLD i KOLOROWANKA.
## Rodziny
| Rodzina | DLL | Unikalne nazwy typów / DLL (zakres) | Pary właściciel + metoda / DLL (zakres) |
|---|---:|---:|---:|
| BLOOMOO | 7 | 39–41 | 517–598 |
| PIKLIB61 | 5 | 23–23 | 186–229 |
| PIKLIB71 | 2 | 26–26 | 322–322 |
| PIKLIB72 | 2 | 35–35 | 416–416 |
| PIKLIB8 | 18 | 36–39 | 448–515 |
Nie sumujemy metod między DLL: te same nazwy powtarzają się w wielu wydaniach. Liczniki kolejki w `states/*.json` mierzą surowe rekordy; tabela powyżej usuwa powtórzenia nazwy typu / pary właściciel–metoda w obrębie jednej DLL.
## Tracker emulatora
Przy rewizji `39d7395f6e3569a10f57e5e7ae483449a3f7dccd` katalog łączy 38 snapshotów po deduplikacji, 61 typów i 1372 par typ/metoda, także dziedziczonych. Dodatkowe historyczne snapshoty nie zwiększają licznika 34 silników z manifestu.
- Zarejestrowane bez automatycznej flagi stubu: 578.
- Podejrzenia stubu wymagające przeglądu: 36.
- Brak rozpoznanej rejestracji: 758.
- Aktualne potwierdzenia zgodności ASM / testu zachowania: 0. Rejestr przeglądów pozostaje pusty.
To punkt startowy do roadmapy, a nie procent ukończenia emulatora. Metody przypisane heurystycznie, klasy bazowe, własne dispatchery i nierozpoznane dziedziczenie mogą zmieniać liczbę braków. UI pokazuje pochodzenie i uwagi; brak obserwacji w danej DLL to „nieustalone”.
## Co sprawdzać dalej
1. WORLD.SETPOSITION: rozstrzygnąć podwójną rejestrację ID 24 / 43 i współdzielenie ID 43 z RESUMELINK. Dowody rejestracji są zapisane lokalnie.
2. KOLOROWANKA.GETENDCOLOR: potwierdzona rejestracja w pluginie bez odpowiadającej rejestracji emulatora.
3. Uzupełnić mapowanie fabryka → klasa oraz dziedziczenie tam, gdzie ekstraktor zgaduje nazwę właściciela. Sprawdzić podejrzenia stubów przed traktowaniem ich jako zadań implementacyjnych.
4. Porównywać zachowanie metod dla konkretnych SHA DLL, zapisywać dowody w `tracker-reviews.json`, a dopiero potem oznaczać zgodność.
5. Osobno przeanalizować osiem wariantów natywnego Sekai; automatyczny batch skryptowych silników świadomie je pomija.
## Dokładne wyniki
| Rodzina | SHA-256 | Typy (rekordy) | Metody (rekordy) | Gałęzie dispatchera |
|---|---|---:|---:|---:|
| BLOOMOO | [1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf](../snapshots/batch/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.snapshot.json) | 42 | 583 | 564 |
| BLOOMOO | [346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d](../snapshots/batch/346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d.snapshot.json) | 42 | 580 | 561 |
| BLOOMOO | [41249638fbb62c7a3cc2785ae7d6a4a736ad52c9cc7d9709a7067b52ede07b69](../snapshots/batch/41249638fbb62c7a3cc2785ae7d6a4a736ad52c9cc7d9709a7067b52ede07b69.snapshot.json) | 42 | 575 | 556 |
| BLOOMOO | [848761c5e9fa2bd5345cfff33b96d3194dd3cbe5dfce297f722b143c50aa7a5f](../snapshots/batch/848761c5e9fa2bd5345cfff33b96d3194dd3cbe5dfce297f722b143c50aa7a5f.snapshot.json) | 42 | 572 | 553 |
| BLOOMOO | [a0060b283fccd1ffbe5dc49a947eb856540aa3db155f96d44afb0e4f97e9de6e](../snapshots/batch/a0060b283fccd1ffbe5dc49a947eb856540aa3db155f96d44afb0e4f97e9de6e.snapshot.json) | 42 | 600 | 582 |
| BLOOMOO | [be1e6c7c15b8bbac78a637fa992860d378ef922020ee78ac0e6102a0cacb100a](../snapshots/batch/be1e6c7c15b8bbac78a637fa992860d378ef922020ee78ac0e6102a0cacb100a.snapshot.json) | 40 | 517 | 502 |
| BLOOMOO | [d5ec62c16ee4ae84486e2076864a6b1e52aaaed311eb65b3a1847701a583b501](../snapshots/batch/d5ec62c16ee4ae84486e2076864a6b1e52aaaed311eb65b3a1847701a583b501.snapshot.json) | 42 | 600 | 582 |
| PIKLIB61 | [39bb96560cd7e08dfb9aaaf0a31a390bfcc2311d1190e088b1b46e1a006dd33d](../snapshots/batch/39bb96560cd7e08dfb9aaaf0a31a390bfcc2311d1190e088b1b46e1a006dd33d.snapshot.json) | 23 | 225 | 63 |
| PIKLIB61 | [44913173dd58411c8e20aed51276989fc41a7aa63f7a20f03701f6275aab420e](../snapshots/batch/44913173dd58411c8e20aed51276989fc41a7aa63f7a20f03701f6275aab420e.snapshot.json) | 23 | 207 | 158 |
| PIKLIB61 | [694ce89d3030dc81b136cef2667fcd853e3f28ebe91d82ff0850e94a1935fbcb](../snapshots/batch/694ce89d3030dc81b136cef2667fcd853e3f28ebe91d82ff0850e94a1935fbcb.snapshot.json) | 23 | 186 | 0 |
| PIKLIB61 | [a02d2faa5b203e6c0008842f851d75a50a0f54a61b03c291feffe1b9a9051fe3](../snapshots/batch/a02d2faa5b203e6c0008842f851d75a50a0f54a61b03c291feffe1b9a9051fe3.snapshot.json) | 23 | 186 | 0 |
| PIKLIB61 | [e8a86390bcfabf29e8ca9d80e95df501988275aa0f170acb34081c19204dc58e](../snapshots/batch/e8a86390bcfabf29e8ca9d80e95df501988275aa0f170acb34081c19204dc58e.snapshot.json) | 23 | 231 | 174 |
| PIKLIB71 | [b213bb58e4ce2806d40786f79a62e658ca190dc4d997653fa2a6706493fa4bb8](../snapshots/batch/b213bb58e4ce2806d40786f79a62e658ca190dc4d997653fa2a6706493fa4bb8.snapshot.json) | 26 | 322 | 288 |
| PIKLIB71 | [ff6b4fad38684cc44a672b0475d7d5ade34c8e91e76dd3d330d6121d3847a367](../snapshots/batch/ff6b4fad38684cc44a672b0475d7d5ade34c8e91e76dd3d330d6121d3847a367.snapshot.json) | 26 | 322 | 288 |
| PIKLIB72 | [7d64081b57fb645e3fb7fef823baed4ae193a5e0e1848e451bf069ccf28aa2c7](../snapshots/batch/7d64081b57fb645e3fb7fef823baed4ae193a5e0e1848e451bf069ccf28aa2c7.snapshot.json) | 35 | 416 | 402 |
| PIKLIB72 | [f83c0c553d3a16ed3dc14b8358e9a7ad5464dc46caecc032c371b9f5a0c90c73](../snapshots/batch/f83c0c553d3a16ed3dc14b8358e9a7ad5464dc46caecc032c371b9f5a0c90c73.snapshot.json) | 35 | 416 | 402 |
| PIKLIB8 | [06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57](../snapshots/batch/06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.snapshot.json) | 36 | 452 | 440 |
| PIKLIB8 | [0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87](../snapshots/batch/0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.snapshot.json) | 40 | 515 | 503 |
| PIKLIB8 | [1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009](../snapshots/batch/1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.snapshot.json) | 40 | 512 | 500 |
| PIKLIB8 | [2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e](../snapshots/batch/2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.snapshot.json) | 38 | 485 | 473 |
| PIKLIB8 | [6da6954eddead85d1ea2862bab2aeca13bdc44997766157bc7be2569819239f6](../snapshots/batch/6da6954eddead85d1ea2862bab2aeca13bdc44997766157bc7be2569819239f6.snapshot.json) | 40 | 509 | 497 |
| PIKLIB8 | [90b61f1f8d10532fd8f7fc976aa56ffbf2d2e9b7c23006fb0770f951fc10f198](../snapshots/batch/90b61f1f8d10532fd8f7fc976aa56ffbf2d2e9b7c23006fb0770f951fc10f198.snapshot.json) | 40 | 514 | 502 |
| PIKLIB8 | [94b4c2ed80953028a4cb6ead67a72ed3059bfe2c59809492d758791f51ac2f61](../snapshots/batch/94b4c2ed80953028a4cb6ead67a72ed3059bfe2c59809492d758791f51ac2f61.snapshot.json) | 40 | 513 | 501 |
| PIKLIB8 | [987d69fad1021e02ce9637a873da87145b1db997f191f6aabfb8f66405dc77a1](../snapshots/batch/987d69fad1021e02ce9637a873da87145b1db997f191f6aabfb8f66405dc77a1.snapshot.json) | 40 | 513 | 501 |
| PIKLIB8 | [a5dea135d4ce909abedd3b7623dc1e7390f578f5242799c66b266257a04de86b](../snapshots/batch/a5dea135d4ce909abedd3b7623dc1e7390f578f5242799c66b266257a04de86b.snapshot.json) | 40 | 512 | 500 |
| PIKLIB8 | [a6fae72f648895829e115a7a49c31165f57264705074fec5742c34c651cf5882](../snapshots/batch/a6fae72f648895829e115a7a49c31165f57264705074fec5742c34c651cf5882.snapshot.json) | 40 | 509 | 497 |
| PIKLIB8 | [a7fbfc4600c3f897fc58d8c8d1626ef43de5c9f0742dfcc89d5b865f5b163f91](../snapshots/batch/a7fbfc4600c3f897fc58d8c8d1626ef43de5c9f0742dfcc89d5b865f5b163f91.snapshot.json) | 40 | 514 | 502 |
| PIKLIB8 | [d55caf201190d20275db6c26e014664f3b8f65c5fb6bbd2cc81d03aaa3037977](../snapshots/batch/d55caf201190d20275db6c26e014664f3b8f65c5fb6bbd2cc81d03aaa3037977.snapshot.json) | 40 | 514 | 502 |
| PIKLIB8 | [d6968a236288270e90604f5d401244d57ca0882c1405fcf0867dcd3b3e0d64c9](../snapshots/batch/d6968a236288270e90604f5d401244d57ca0882c1405fcf0867dcd3b3e0d64c9.snapshot.json) | 40 | 512 | 500 |
| PIKLIB8 | [d9cf5a3896c9941348d1246e4830096b192f1f0e107b1d7b1e2d73840c0204a2](../snapshots/batch/d9cf5a3896c9941348d1246e4830096b192f1f0e107b1d7b1e2d73840c0204a2.snapshot.json) | 38 | 496 | 482 |
| PIKLIB8 | [ec833739ba267aa137d5f69144ee73711e57710af4ffdb8cd9403dc016f7cf40](../snapshots/batch/ec833739ba267aa137d5f69144ee73711e57710af4ffdb8cd9403dc016f7cf40.snapshot.json) | 39 | 499 | 485 |
| PIKLIB8 | [f21e0b6ff7c0110e4610c9cf93966a1d75b1b5155f7a2330cef1c742930da8ff](../snapshots/batch/f21e0b6ff7c0110e4610c9cf93966a1d75b1b5155f7a2330cef1c742930da8ff.snapshot.json) | 39 | 499 | 485 |
| PIKLIB8 | [f6bb9e5fcdd0fe5dfff3885ca4c713f1c99d0559d614a78cc0d7bbc22923c5d6](../snapshots/batch/f6bb9e5fcdd0fe5dfff3885ca4c713f1c99d0559d614a78cc0d7bbc22923c5d6.snapshot.json) | 36 | 448 | 434 |
| PIKLIB8 | [fc77764002f4b2e883227a16e566fabf613df24871db8e6e6d1f71b7eedbd732](../snapshots/batch/fc77764002f4b2e883227a16e566fabf613df24871db8e6e6d1f71b7eedbd732.snapshot.json) | 40 | 512 | 500 |
Wyniki wznowienia kolejki: `snapshots/batch/failure-report.json`. Logi i odciski ekstraktora: `snapshots/batch/logs/` i `snapshots/batch/states/`. Oryginalne DLL nie były modyfikowane.
+37
View File
@@ -0,0 +1,37 @@
# Resumable engine extraction
Generate an inventory with `python -m ams.inventory ROOT --out inventory.json`, then run:
```sh
python -m ams.acquire.batch --manifest inventory.json --out-dir snapshots/batch \
--ghidra-home /path/to/ghidra --timeout 1800 --limit 2
```
Only `engine` entries run. Plugins and native dependencies require their own extraction paths. Remove `--limit` for the full engine inventory. This queue measures successful extraction, not completeness or functional correctness.
Snapshots are named `<sha256>.snapshot.json`. Each attempt runs in a fresh Python process and process group; the timeout kills that group, including native children. A supplied Ghidra home selects PyGhidra. Otherwise the current wrapper environment chooses the backend.
State records live in `states/`, separate attempt logs in `logs/`, and the last invocation's summary/failures in `failure-report.json`. Every attempt verifies source content before and after analysis. A successful snapshot must contain the expected binary SHA and nonempty types and methods. Writes are atomic, and failed refreshes preserve the prior snapshot.
Re-running skips validated successes with the same extractor fingerprint. The fingerprint includes the queue, wrapper, Python extractor scripts, selected provider, configured Ghidra installation and application properties, PyGhidra version when installed, Python version and Java home. Changes trigger refreshes. Snapshot byte hashes detect edits even when the embedded binary identity remains unchanged. Successful state records include raw type, method and dispatch record counts (not unique API names) and the input filename. Failures and interrupted attempts require `--retry-failed`. A POSIX advisory lock prevents simultaneous writers to one output directory. Avoid external edits to queue state or snapshots while extraction runs.
Failure reports include skipped failed attempts, and the CLI exits 1 if failures remain. `--limit` limits attempted builds in that invocation; scope exclusions and resumed successes do not consume it. A limit of zero performs no extraction. The report counts unattempted engine builds as `pending` when the limit is reached. A prior snapshot alone, without matching successful queue state, is not trusted as a completed queue attempt.
## Local macOS setup
The API environment and Ghidra worker use separate Python environments. The tested Ghidra 12.1.2 distribution supplies PyGhidra and JPype wheels compatible with Python 3.12; the API environment uses Python 3.14. From this repository:
```sh
.venv-ghidra/bin/python -m ams.acquire.batch \
--manifest data/binary-inventory.json --out-dir snapshots/batch \
--ghidra-home /Users/genszu/Downloads/GhidraMacOS/ghidra_install/ghidra/ghidra_12.1.2_PUBLIC \
--timeout 600 --retry-failed
```
No interactive Ghidra window or Hopper license is needed. `--ghidra-home` configures both `GHIDRA_HOME` and `GHIDRA_INSTALL_DIR` for the worker; setting `GHIDRA_HOME` was not a mistake. Each worker gets a temporary project and runtime home, and the original DLL is only read. Internal Ghidra program names are sanitized to ASCII because repository filenames can contain Polish characters; snapshots retain the original filename and SHA.
The bundled inventory records 64 file paths / 51 distinct SHA-256 values: 34 engine builds in scope, 2 script plugins, 8 native Sekai dependencies and 7 earlier engines excluded from this batch. WORLD and KOLOROWANKA have separately documented registration snapshots. Scope classification is based on filenames, so review newly added or renamed files.
Snapshot metadata retains all source paths and game aliases, extraction fingerprint and provider version. The original files must remain available to verify resumed successes. The queue is sequential; independent manifests can be processed in separate output directories. Do not edit extractor code while a queue is running.
Wynik pełnego przebiegu i kolejność dalszych prac: [batch-results.md](batch-results.md).
+36
View File
@@ -0,0 +1,36 @@
# Kolorowanka pilot — bounded static surface extraction
Target: `/Users/genszu/Reksio/Herkules + Odyseusz/Odyseusz/Kolorowanka.dll`.
SHA-256: `7f26356f30f283f7697c9b430fadc68e3932b124dd099d4affd4dc3a21d8e06e`.
Provider: REA with Ghidra 12.1.2, x86 PE, default analysis. No target code executed.
Artifacts: `snapshots/kolorowanka.snapshot.json` (AMS schema 4 with provenance extensions), `snapshots/kolorowanka.evidence.json` (18 complete evidence records).
## Established surface
The plugin factory at VA `0x1000a820` compares TYPE with KOLOROWANKA, allocates `0xfc` bytes and calls `0x100035d0`. The latter creates its runner via `0x1000b1c0`; that constructor installs vtable `0x10010c1c`. Vtable slot +0x28 points to registration routine `0x1000b200`.
The registration routine calls the base CMC_Runner::prepareMthHashSet, then constructs CInteger IDs and CStringHashCode names and inserts them via CHashtable::put. Its 23 explicit registrations are recorded with method IDs, string VAs and the address of each ID PUSH instruction. All 23 ID values were checked against assembly, not inferred from list order. Names were recovered from the registration pseudocode and cross-linked to string operand addresses. Method owner and runner labels are synthetic labels for the observed KOLOROWANKA construction chain; original C++ class spelling remains unknown.
IDs 1–23: LOAD, SETPOSITION, MOVE, SETCOLOR, FLUSH, SHOW, HIDE, ENABLE, DISABLE, CLEAR, APPLYANNSEQ, APPLYSNDSEQ, STOPWAV, PRINT, GETLATESTWAV, GETFIELDNAME, LOADSTATE, SAVESTATE, DRAW, GETCURRENTCOLOUR, SETPATTERN, SETDEFCOLOR, GETENDCOLOR.
## Evidence anchors
- Registration pseudocode: `ev_aeb62723f834068c3c02cfbc35a6e47a05bb9d53a88922d2cbf1d91349a8c353`.
- Complete registration assembly: `ev_26ce096869cd21ca415ffe44d1fd337db7bbc93b64e4b08c41cf7e222f26e63e`.
- Object constructor: `ev_0c36b49ccf457c15f803a650826790164dc4dcb02f19ba3da05450786789fb7f`.
- Runner constructor: `ev_46cfab66dd3dcc9bf902a8ae52c445da16d225d30c8084d08d5b513f32fa428c`.
- Runner vtable bytes: `ev_edc8f35dba4956477de0225d0ce0c19e13dbfb1671b25202130e5c34502463e3`.
- Type literal: `ev_15fdba5dc76642a47e3771a83a549a4912ca994072bbfbee48f2c9acc1b76fa8`.
All VAs use preferred image base `0x10000000`; RVA = VA minus image base. Evidence bundle retains the original provider limitations and source digest.
## Limits and next extraction work
This is partial extraction, not proof of complete DLL API or behavioral correctness. Base runner methods are not expanded. Empty fields/events/dispatch arrays mean unextracted, not absent. No emulator implementation has been certified by this analysis. Ghidra default string inventory missed short names and reported STOPWAV as TOPWAV because of its string-object boundary; registration references recover the correct spelling. Therefore string inventory alone is not a safe method extractor.
The candidate runner dispatch pointer at vtable +0x44 is `0x1000c950`, but Ghidra default analysis did not recognize it as a function (`ev_b935c945474b0e6ab5b710736af786e94ed5bceb5a27d7898bf1a09ec16ac0ab`). Recovering that function and its cases is a follow-up, requiring function creation or a targeted headless script. We deliberately leave method_dispatch empty rather than making guessed case mappings.
Automation strategy: detect module factories through TYPE comparison and construction, follow object -> runner constructor -> vtable, then extract CInteger/hash registrations with direct assembly cross-checks. A generalized plugin extractor should use Ghidra references/P-code, not regex over uppercase string inventory. This pilot snapshot was assembled from the retained evidence and validated with AMS Snapshot.load.
REA session was closed after exporting evidence.
+300
View File
@@ -0,0 +1,300 @@
# Roadmapa emulatora
Wygenerowane przez `python -m ams.roadmap` z eksportu Atlasu (rewizja emulatora `42f4ffb35305e7582173d24c5f0ba4c4acc9d062`, niezacommitowane zmiany). Nie edytuj ręcznie.
Binarki: 6.1 × 5, 7.1 × 2, 7.2 × 2, 8 × 18, BM × 7, KOLOROWANKA × 1, WORLD × 1.
Rejestracja nie oznacza poprawności; „brak literału” znaczy tylko, że nazwy nie ma w kodzie emulatora.
W nawiasie: rodziny silnika, w których DLL pozycja występuje.
| Zakres | Metody (zarejestrowane / w oryginale) | Bez rejestracji | Stuby | Eventy bez literału | Pola bez literału |
|---|---:|---:|---:|---:|---:|
| EXPRESSION | 0 / 32 | 32 | 0 | 4 / 6 | 2 / 7 |
| ARRAY | 25 / 56 | 31 | 0 | 2 / 4 | 2 / 3 |
| CANVAS | 0 / 29 | 29 | 0 | 1 / 7 | 5 / 5 |
| IMAGE | 22 / 49 | 27 | 0 | 1 / 9 | 5 / 11 |
| BOOLEAN | 4 / 32 | 28 | 0 | 2 / 6 | 2 / 6 |
| STRING | 12 / 39 | 27 | 0 | 2 / 6 | 2 / 6 |
| TEXT | 6 / 32 | 26 | 0 | 1 / 5 | 4 / 13 |
| ANIMO | 50 / 73 | 23 | 0 | 3 / 14 | 4 / 13 |
| SYSTEM | 3 / 33 | 30 | 0 | 0 / 0 | 0 / 0 |
| VIRTUALGRAPHICSOBJECT | 0 / 20 | 11 | 9 | 1 / 3 | 8 / 8 |
| SCENE | 15 / 28 | 13 | 0 | 7 / 9 | 8 / 11 |
| EDITBOX | 0 / 15 | 15 | 0 | 4 / 8 | 6 / 7 |
| APPLICATION | 5 / 19 | 14 | 0 | 7 / 9 | 3 / 5 |
| PATTERN | 0 / 11 | 10 | 1 | 1 / 7 | 8 / 8 |
| NETSERVER | 0 / 13 | 13 | 0 | 4 / 4 | 0 / 0 |
| INERTIA | 0 / 0 | 0 | 16 | 0 / 0 | 0 / 0 |
| SCROLL | 0 / 10 | 10 | 0 | 5 / 7 | 1 / 1 |
| DOUBLE | 24 / 34 | 10 | 0 | 2 / 6 | 2 / 6 |
| INTEGER | 22 / 32 | 10 | 0 | 2 / 6 | 2 / 6 |
| MOVIE | 0 / 9 | 9 | 0 | 2 / 6 | 3 / 4 |
| MOUSE | 10 / 20 | 10 | 0 | 2 / 7 | 1 / 2 |
| NETPEER | 0 / 9 | 9 | 0 | 4 / 6 | 0 / 0 |
| BUTTON | 9 / 16 | 7 | 0 | 2 / 12 | 3 / 14 |
| NETCLIENT | 0 / 9 | 9 | 0 | 3 / 3 | 0 / 0 |
| WORLD | 56 / 66 | 0 | 10 | 0 / 0 | 0 / 0 |
| FILTER | 0 / 6 | 6 | 0 | 2 / 6 | 1 / 1 |
| GRBUFFER | 0 / 6 | 6 | 0 | 1 / 3 | 2 / 2 |
| JOYSTICK | 0 / 4 | 4 | 0 | 4 / 6 | 1 / 1 |
| * | 6 / 14 | 8 | 0 | 0 / 0 | 0 / 0 |
| @ | 11 / 19 | 7 | 1 | 0 / 0 | 0 / 0 |
| CANVAS_OBSERVER | 13 / 13 | 0 | 0 | 7 / 9 | 1 / 2 |
| INTERNET | 0 / 3 | 3 | 0 | 4 / 6 | 1 / 1 |
| NETWORK | 0 / 4 | 4 | 0 | 4 / 6 | 0 / 0 |
| TIMER | 10 / 16 | 6 | 0 | 1 / 4 | 1 / 5 |
| VECTOR | 7 / 14 | 7 | 0 | 1 / 3 | 0 / 2 |
| FONT | 0 / 5 | 5 | 0 | 1 / 3 | 1 / 2 |
| PATH | 0 / 5 | 5 | 0 | 1 / 3 | 1 / 1 |
| SOUND | 7 / 9 | 2 | 0 | 2 / 6 | 3 / 5 |
| DATABASE | 8 / 13 | 5 | 0 | 1 / 3 | 0 / 1 |
| FIFO | 0 / 4 | 4 | 0 | 2 / 4 | 0 / 0 |
| GROUP | 12 / 16 | 4 | 0 | 1 / 3 | 1 / 2 |
| LIFO | 0 / 4 | 4 | 0 | 2 / 4 | 0 / 0 |
| DIALOG | 0 / 4 | 4 | 0 | 1 / 3 | 0 / 0 |
| BEHAVIOUR | 3 / 6 | 3 | 0 | 1 / 3 | 0 / 2 |
| EPISODE | 4 / 7 | 3 | 0 | 0 / 0 | 0 / 2 |
| KEYBOARD | 6 / 7 | 1 | 0 | 1 / 6 | 1 / 2 |
| MULTIARRAY | 5 / 7 | 2 | 0 | 1 / 3 | 0 / 1 |
| STRUCT | 2 / 3 | 1 | 0 | 1 / 3 | 1 / 3 |
| COMPLEXCONDITION | 3 / 3 | 0 | 0 | 1 / 5 | 1 / 5 |
| CONDITION | 3 / 3 | 0 | 0 | 1 / 5 | 1 / 5 |
| SEQUENCE | 12 / 12 | 0 | 0 | 1 / 5 | 1 / 3 |
| KOLOROWANKA | 22 / 23 | 1 | 0 | 0 / 0 | 0 / 0 |
| STATICFILTER | 3 / 3 | 0 | 0 | 1 / 3 | 0 / 1 |
## EXPRESSION
- **Metody bez rejestracji:** `ABS` (int) → int (6.1, 7.1, 7.2, 8, BM); `ADD` () → copy / () → — (6.1, 7.1, 7.2, 8, BM); `DEC` () → — (6.1, 7.1, 7.2, 8, BM); `DIV` () → — (6.1, 7.1, 7.2, 8, BM); `INC` () → — (6.1, 7.1, 7.2, 8, BM); `MOD` () → — (6.1, 7.1, 7.2, 8, BM); `MUL` () → — (6.1, 7.1, 7.2, 8, BM); `RESETINI` () → — (6.1, 7.1, 7.2, 8, BM); `SET` () → — (6.1, 7.1, 7.2, 8, BM); `SETDEFAULT` (any) → — (6.1, 7.1, 7.2, 8, BM); `SUB` () → — / (int, int) → — (6.1, 7.1, 7.2, 8, BM); `SWITCH` () → — (6.1, 7.1, 7.2, 8, BM); `AND` (int) → int (7.1, 7.2, 8, BM); `ARCTAN` (double) → double (7.1, 7.2, 8, BM); `ARCTANEX` (double, double, double) → double (7.1, 7.2, 8, BM); `CLEAR` () → — (6.1, 7.2, 8, BM); `COSINUS` (double) → double (7.1, 7.2, 8, BM); `MAXA` (double, …) → double (7.1, 7.2, 8, BM); `MINA` (double, …) → double (7.1, 7.2, 8, BM); `NOT` () → int / () → int/string (7.1, 7.2, 8, BM); `OR` (int) → int (7.1, 7.2, 8, BM); `POWER` (int) → int (7.1, 7.2, 8, BM); `SINUS` (double) → double (7.1, 7.2, 8, BM); `SQRT` () → double / () → int (7.1, 7.2, 8, BM); `XOR` (int) → int (7.1, 7.2, 8, BM); `ISUPPERLETTER` (int) → bool (7.2, 8, BM); `COPYFILE` (string, string) → bool (8, BM); `RANDOM` (int, int) → int / (int, int, …) → int (8, BM); `SGN` () → int (8, BM); `CLAMP` (int, int) → int (7.1); `GET` () → — (7.1); `LENGTH` (double, double) → double (7.1)
- **Eventy bez literału:** `ONBRUTALCHANGED` (6.1, 7.1, 7.2, 8, BM); `ONCHANGED` (6.1, 7.1, 7.2, 8, BM); `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONNETCHANGE` (7.1, 7.2, 8, BM)
- **Pola bez literału:** `NETNOTIFY` bool (7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## ARRAY
- **Metody bez rejestracji:** `REMOVE` (any) → — (6.1, 7.1, 7.2, 8, BM); `DIR` (string, string) → string (7.1, 7.2, 8, BM); `DIV` (any) → — (7.1, 7.2, 8, BM); `DIVA` (string, int, int) → — (7.1, 7.2, 8, BM); `DIVAT` (int, any/double) → — (7.1, 7.2, 8, BM); `GETMARKERPOS` () → int (7.1, 7.2, 8, BM); `MUL` (any) → — (7.1, 7.2, 8, BM); `MULA` (string, int, int) → — (7.1, 7.2, 8, BM); `NEXT` (int) → — (7.1, 7.2, 8, BM); `RESETMARKER` () → — (7.1, 7.2, 8, BM); `SETMARKERPOS` (int) → — (7.1, 7.2, 8, BM); `SORT` (bool) → — (7.1, 7.2, 8, BM); `SUBA` (string, int, int) → — (7.1, 7.2, 8, BM); `SUMA` (string, int, int) → — (7.1, 7.2, 8, BM); `ADDCLONES` (string, int, int) → — (7.2, 8, BM); `COMPARE` (string) → bool (7.2, 8, BM); `PREV` (int) → — (7.2, 8, BM); `ROTATELEFT` () → — (7.2, 8, BM); `ROTATERIGHT` () → — (7.2, 8, BM); `SENDONCHANGE` (bool) → — (7.2, 8, BM); `SHIFTLEFT` () → — (7.2, 8, BM); `SHIFTRIGHT` () → — (7.2, 8, BM); `SWAP` (int, int) → — (7.2, 8, BM); `FILL` (int, any) → — (8, BM); `FINDALL` () → — / (string, …) → int (8, BM); `MAXD` () → double (8, BM); `MIND` () → double (8, BM); `RANDOMFILL` (int, int, int, bool) → — (8, BM); `SORTMANY` () → — (8, BM); `ADDCOLNES` (string, int, int) → — (7.1); `PREF` (int) → — (7.1)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONCHANGED` (7.2, 8, BM)
- **Pola bez literału:** `SENDONCHANGE` bool (7.2, 8, BM); `CONDITION` string (6.1)
## CANVAS
- **Metody bez rejestracji:** `ADD` (string, int) → — / (string, …) → — (7.2, 8, BM); `CAPTURE` (bool) → — (7.2, 8, BM); `CLEAR` () → — / (int, int, int, int) → — (7.2, 8, BM); `DRAW` (string, int, int) → — (7.2, 8, BM); `ERASE` (string, int, int) → — (7.2, 8, BM); `HIDE` () → — (7.2, 8, BM); `MOVE` (int, int) → — (7.2, 8, BM); `REMOVE` (string) → — (7.2, 8, BM); `SAVE` (string, double, double, int, int, int, int) → — (7.2, 8, BM); `SETASBUTTON` (bool, bool) → — / (bool, …) → — (7.2, 8, BM); `SETOPACITY` (int) → — (7.2, 8, BM); `SETPOSITION` (int, int) → — (7.2, 8, BM); `SETPRIORITY` (int) → — (7.2, 8, BM); `SHOW` () → — (7.2, 8, BM); `CUT` (string) → — (BM); `CUTTO` (string) → — (BM); `DRAWELIPSE` (int, int, int, int, int) → — (BM); `DRAWLINE` (int, int, int, int, int) → — (BM); `FILLCOLOR` (string, int, int, int) → — (BM); `GETALPHA` (int, int) → int (BM); `GETHEIGHT` () → int (BM); `GETNUMVISIBLEPIXELS` () → int / (int, int, int, int) → int (BM); `GETPIXEL` (int, int) → int (BM); `GETPOSITIONX` () → int (BM); `GETPOSITIONY` () → int (BM); `GETWIDTH` () → int (BM); `RECREATE` (int, int, bool, bool, int, bool) → — (BM); `REDRAWSCALED` (double, double, int, int) → — (BM); `SAVEREALJPG` (string, double, double, int, int, int, int) → — (BM)
- **Eventy bez literału:** `ONDONE` (7.2, 8, BM)
- **Pola bez literału:** `ALPHA` bool (7.2, 8, BM); `BACKGROUND` bool (7.2, 8, BM); `HEIGHT` int (7.2, 8, BM); `PRIORITY` int (7.2, 8, BM); `WIDTH` int (7.2, 8, BM)
## IMAGE
- **Metody bez rejestracji:** `CLEARCLIPPING` () → — (6.1, 7.1, 7.2, 8, BM); `ISINSIDE` (int, bool, …) → bool / (int, int, bool) → bool (6.1, 7.1, 7.2, 8, BM); `ISNEAR` (int/string, int, int, int, int) → bool (6.1, 7.1, 7.2, 8, BM); `ISVISIBLE` () → bool (6.1, 7.1, 7.2, 8, BM); `SETSCALEFACTOR` (double, double) → — (6.1, 7.1, 7.2, 8, BM); `LINK` (string) → — (7.1, 7.2, 8, BM); `SETASBUTTON` (bool, bool) → — (7.1, 7.2, 8, BM); `FLIPH` () → — (7.2, 8, BM); `FLIPV` () → — (7.2, 8, BM); `RESETFLIPS` () → — (7.2, 8, BM); `SAVE` (string) → — / (string, …) → — (7.2, 8, BM); `DRAWONTO` (string, int) → — (8, BM); `GETCOLORAT` (int, int, string) → — (8, BM); `GETCOLORBAT` (int, int) → int (8, BM); `GETCOLORGAT` (int, int) → int (8, BM); `GETCOLORRAT` (int, int) → int (8, BM); `GETOPACITY` () → int (8, BM); `GETPRIORITY` () → int (8, BM); `GETSLIDECOMPS` (double, double, int, int, string) → — (8, BM); `RESETPOSITION` () → — (8, BM); `SETRESETPOSITION` (int, int) → — (8, BM); `GETFRAME` (int/string, int, int, int, int) → bool (6.1); `MERGEALPHA2` (int, int, string, bool) → — (BM); `PLAYRAND` (bool) → — (6.1); `REPLACECOLOR` (int, int, int, int, int, int) → — (BM); `SETFORWARD` (int) → — (6.1); `SETFPS` (int, int, string) → — (6.1)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `FLUSHAFTERPLAYED` bool (6.1, 7.1, 7.2, 8, BM); `PRELOAD` bool/string (6.1, 7.1, 7.2, 8, BM); `TOCANVAS` bool (6.1, 7.1, 7.2, 8, BM); `ASBUTTON` bool (7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## BOOLEAN
- **Metody bez rejestracji:** `ABS` (int) → int (6.1, 7.1, 7.2, 8, BM); `ADD` () → copy / () → — (6.1, 7.1, 7.2, 8, BM); `DEC` () → — (6.1, 7.1, 7.2, 8, BM); `DIV` () → — (6.1, 7.1, 7.2, 8, BM); `INC` () → — (6.1, 7.1, 7.2, 8, BM); `MOD` () → — (6.1, 7.1, 7.2, 8, BM); `MUL` () → — (6.1, 7.1, 7.2, 8, BM); `SETDEFAULT` (any) → — (6.1, 7.1, 7.2, 8, BM); `SUB` () → — / (int, int) → — (6.1, 7.1, 7.2, 8, BM); `AND` (int) → int (7.1, 7.2, 8, BM); `ARCTAN` (double) → double (7.1, 7.2, 8, BM); `ARCTANEX` (double, double, double) → double (7.1, 7.2, 8, BM); `CLEAR` () → — (6.1, 7.2, 8, BM); `COSINUS` (double) → double (7.1, 7.2, 8, BM); `MAXA` (double, …) → double (7.1, 7.2, 8, BM); `MINA` (double, …) → double (7.1, 7.2, 8, BM); `NOT` () → int / () → int/string (7.1, 7.2, 8, BM); `OR` (int) → int (7.1, 7.2, 8, BM); `POWER` (int) → int (7.1, 7.2, 8, BM); `SINUS` (double) → double (7.1, 7.2, 8, BM); `SQRT` () → double / () → int (7.1, 7.2, 8, BM); `XOR` (int) → int (7.1, 7.2, 8, BM); `ISUPPERLETTER` (int) → bool (7.2, 8, BM); `COPYFILE` (string, string) → bool (8, BM); `RANDOM` (int, int) → int / (int, int, …) → int (8, BM); `SGN` () → int (8, BM); `CLAMP` (int, int) → int (7.1); `LENGTH` (double, double) → double (7.1)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONNETCHANGE` (7.1, 7.2, 8, BM)
- **Pola bez literału:** `NETNOTIFY` bool (7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## STRING
- **Metody bez rejestracji:** `ABS` (int) → int (6.1, 7.1, 7.2, 8, BM); `DEC` () → — (6.1, 7.1, 7.2, 8, BM); `DIV` () → — (6.1, 7.1, 7.2, 8, BM); `INC` () → — (6.1, 7.1, 7.2, 8, BM); `MOD` () → — (6.1, 7.1, 7.2, 8, BM); `MUL` () → — (6.1, 7.1, 7.2, 8, BM); `SETDEFAULT` (any) → — (6.1, 7.1, 7.2, 8, BM); `SWITCH` () → — (6.1, 7.1, 7.2, 8, BM); `AND` (int) → int (7.1, 7.2, 8, BM); `ARCTAN` (double) → double (7.1, 7.2, 8, BM); `ARCTANEX` (double, double, double) → double (7.1, 7.2, 8, BM); `CLEAR` () → — (6.1, 7.2, 8, BM); `COSINUS` (double) → double (7.1, 7.2, 8, BM); `MAXA` (double, …) → double (7.1, 7.2, 8, BM); `MINA` (double, …) → double (7.1, 7.2, 8, BM); `NOT` () → int / () → int/string (7.1, 7.2, 8, BM); `OR` (int) → int (7.1, 7.2, 8, BM); `POWER` (int) → int (7.1, 7.2, 8, BM); `SINUS` (double) → double (7.1, 7.2, 8, BM); `SQRT` () → double / () → int (7.1, 7.2, 8, BM); `XOR` (int) → int (7.1, 7.2, 8, BM); `INSERTAT` (int, string, int) → — (7.2, 8, BM); `ISUPPERLETTER` (int) → bool (7.2, 8, BM); `REPLACE` (string, string) → — (7.2, 8, BM); `RANDOM` (int, int) → int / (int, int, …) → int (8, BM); `SGN` () → int (8, BM); `CLAMP` (int, int) → int (7.1)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONNETCHANGE` (7.1, 7.2, 8, BM)
- **Pola bez literału:** `NETNOTIFY` bool (7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## TEXT
- **Metody bez rejestracji:** `CLEARCLIPPING` () → — (6.1, 7.1, 7.2, 8, BM); `GETHEIGHT` () → int / () → — (6.1, 7.1, 7.2, 8, BM); `GETPOSITIONX` () → int / () → — (6.1, 7.1, 7.2, 8, BM); `GETPOSITIONY` () → int / () → — (6.1, 7.1, 7.2, 8, BM); `GETWIDTH` () → int / () → — (6.1, 7.1, 7.2, 8, BM); `ISNEAR` (int/string, int, int, int, int) → bool / (int/string, int, int, int, int) → — (6.1, 7.1, 7.2, 8, BM); `LOAD` (string) → — (6.1, 7.1, 7.2, 8, BM); `MOVE` (int, int) → — (6.1, 7.1, 7.2, 8, BM); `SETCLIPPING` (int, int, int, …) → — (6.1, 7.1, 7.2, 8, BM); `SETPOSITION` (int, int) → — (6.1, 7.1, 7.2, 8, BM); `DRAWONTO` (string, int) → — (8, BM); `MONITORCOLLISION` (6.1, 7.1); `REMOVEMONITORCOLLISION` (6.1, 7.1); `SETFONT` (string) → — (8, BM); `SETOPACITY` (int) → — (8, BM); `SETRECT` (int/string, int, int, int) → — (8, BM); `SETTEXTDOUBLE` (string, int) → — (8, BM); `GETNUMWORDS` () → int (BM); `GETWORDAT` (int) → string (BM); `GETWORDATXY` (int, int) → int (BM); `GETWORDPOSX` (int) → int (BM); `GETWORDPOSY` (int) → int (BM); `GETWORDWIDTH` (int) → int (BM); `INVALIDATE` () → — (BM); `SEARCH` (string, int) → int (BM); `SETWORDCOLOR` (int, int, int, int) → — (BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `MONITORCOLLISION` bool (6.1, 7.1); `MONITORCOLLISIONALPHA` bool (6.1, 7.1); `CONDITION` string (6.1); `HYPERTEXT` bool (BM)
## ANIMO
- **Metody bez rejestracji:** `CLEARCLIPPING` () → — (6.1, 7.1, 7.2, 8, BM); `GETALPHA` (int, int) → int (6.1, 7.1, 7.2, 8, BM); `GETPIXEL` (int, int) → int (6.1, 7.1, 7.2, 8, BM); `INVALIDATE` () → — (6.1, 7.1, 7.2, 8, BM); `ISINSIDE` (int, bool, …) → bool / (int, int, bool) → bool (6.1, 7.1, 7.2, 8, BM); `MERGEALPHA` (int, int, string) → — (6.1, 7.1, 7.2, 8, BM); `PLAYRAND` (string, int, int) → — / (string, int, int, …) → — (6.1, 7.1, 7.2, 8, BM); `SETCLIPPING` (int, int, int, …) → — (6.1, 7.1, 7.2, 8, BM); `SETFREQ` (int) → — (7.1, 7.2, 8, BM); `SETONFF` (bool) → — (7.1, 7.2, 8, BM); `SETPAN` (int) → — (7.1, 7.2, 8, BM); `SETVOLUME` (int) → — (7.1, 7.2, 8, BM); `FLIPH` () → — (7.2, 8, BM); `FLIPV` () → — (7.2, 8, BM); `RESETFLIPS` () → — (7.2, 8, BM); `DRAWONTO` (string, int) → — (8, BM); `PLAYREVERSE` (any/int) → — / (int/string) → — (8, BM); `GETEVENTNUMBER` (string) → int (BM); `GETFPS` () → int (BM); `ISPAUSED` () → bool (6.1); `REPLACECOLOR` (int, int, int, int, int, int) → — (BM); `REPLACECOLOR1` (int, int) → — (BM); `ROTATERZ` (double) → — (BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONPAUSED` (6.1, 7.1, 7.2, 8, BM); `ONRESUMED` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `FLUSHAFTERPLAYED` bool (6.1, 7.1, 7.2, 8, BM); `PRELOAD` bool/string (6.1, 7.1, 7.2, 8, BM); `ONFIRSTFRAME` bool (7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## SYSTEM
- **Metody bez rejestracji:** `GETDATESTRING` () → int (6.1, 7.1, 7.2, 8, BM); `GETDAY` () → int (6.1, 7.1, 7.2, 8, BM); `GETDAYOFWEEK` () → int (6.1, 7.1, 7.2, 8, BM); `GETDAYOFWEEKSTRING` () → string (6.1, 7.1, 7.2, 8, BM); `GETMINUTES` () → int / () → string (6.1, 7.1, 7.2, 8, BM); `GETMONTH` () → int (6.1, 7.1, 7.2, 8, BM); `GETMONTHSTRING` () → string (6.1, 7.1, 7.2, 8, BM); `GETSECONDS` () → int (6.1, 7.1, 7.2, 8, BM); `GETTIMESTRING` () → string (6.1, 7.1, 7.2, 8, BM); `GETYEAR` () → int (6.1, 7.1, 7.2, 8, BM); `GETHOUR` () → int / () → string (6.1, 7.2, 8, BM); `COPYFILE` (string, string) → bool (8, BM); `DELAY` (int) → — (8, BM); `CREATEDIR` (string) → bool (BM); `GETCMDLINEPARAMETER` (string) → string (BM); `GETCOMMANDLINE` () → string (BM); `GETDATESTRING1` () → string (BM); `GETDAY1` () → string (BM); `GETFOLDERLOCATION` (int) → string (BM); `GETMONTH1` () → string (BM); `GETPRODUCTPATH` () → string (BM); `GETROOTPATH` () → string (BM); `GETSECSINCE1970` () → string (BM); `GETUSERNAME` () → string (BM); `GETYEAR1` () → string (BM); `INSTALL` (string, string) → — (BM); `ISCMDLINEPARAMETER` (string) → bool (BM); `ISFILEEXIST` (…) → bool (BM); `MINIMIZE` () → — (BM); `UNINSTALL` (string) → — (BM)
## VIRTUALGRAPHICSOBJECT
- **Metody bez rejestracji:** `CLEARCLIPPING` () → — (8, BM); `HIDE` () → — (8, BM); `INVALIDATE` () → — (8, BM); `ISINSIDE` (int, int, bool) → bool (8, BM); `ISNEAR` (int/string, int, int, int, int) → bool (8, BM); `ISVISIBLE` () → bool (8, BM); `MONITORCOLLISION` (bool) → — (8, BM); `REMOVEMONITORCOLLISION` () → — (8, BM); `SETASBUTTON` (bool, bool) → — (8, BM); `SETCLIPPING` (int, int, int, …) → — (8, BM); `SHOW` () → — (8, BM)
- **Stuby w emulatorze:** `GETHEIGHT` (8, BM); `GETPOSITIONX` (8, BM); `GETPOSITIONY` (8, BM); `GETWIDTH` (8, BM); `MOVE` (8, BM); `SETMASK` (8, BM); `SETPOSITION` (8, BM); `SETPRIORITY` (8, BM); `SETSOURCE` (8, BM)
- **Eventy bez literału:** `ONDONE` (8, BM)
- **Pola bez literału:** `ASBUTTON` bool (8, BM); `MASK` string (8, BM); `MONITORCOLLISION` bool (8, BM); `MONITORCOLLISIONALPHA` bool (8, BM); `PRIORITY` int (8, BM); `SOURCE` string (8, BM); `TOCANVAS` bool (8, BM); `VISIBLE` bool (8, BM)
## SCENE
- **Metody bez rejestracji:** `GETPLAYINGSEQ` (string) → — (6.1, 7.1, 7.2, 8, BM); `STOPMUSIC` () → — (6.1, 7.1, 7.2, 8, BM); `CREATEOBJECT` (string, string) → — (7.1, 7.2, 8, BM); `GETMUSICVOLUME` () → int (7.1, 7.2, 8, BM); `REMOVE` (string) → — (7.1, 7.2, 8, BM); `SETMUSICFREQ` (int) → — (7.1, 7.2, 8, BM); `SETMUSICPAN` (int) → — (7.1, 7.2, 8, BM); `GETELEMENTSNO` () → int (7.2, 8, BM); `TOTIME` (int) → string (7.2, 8, BM); `GETOBJECTS` (string, string) → — (8, BM); `GETRUNNINGTIMER` (string) → — (8, BM); `RESUMESEQONLY` (string) → — (8, BM); `RUNC` (6.1)
- **Eventy bez literału:** `ONDOMODAL` (6.1, 7.1, 7.2, 8, BM); `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONRESTART` (6.1, 7.1, 7.2, 8, BM); `ONMUSICLOOPED` (7.1, 7.2, 8, BM); `ONACTIVATE` (BM); `ONDEACTIVATE` (BM); `ONUPGRADED` (BM)
- **Pola bez literału:** `AUTHOR` string (6.1, 7.1, 7.2, 8, BM); `COAUTHORS` string (6.1, 7.1, 7.2, 8, BM); `CREATIONTIME` string (6.1, 7.1, 7.2, 8, BM); `DESCRIPTION` string (6.1, 7.1, 7.2, 8, BM); `LASTMODIFYTIME` string (6.1, 7.1, 7.2, 8, BM); `DLLS` string (7.1, 7.2, 8, BM); `VERSION` string (6.1, 7.1, BM); `DEAMON` bool (BM)
## EDITBOX
- **Metody bez rejestracji:** `ACTIVE` () → — (6.1, 7.1, 7.2, 8, BM); `ADDTEXT` (string) → — (6.1, 7.1, 7.2, 8, BM); `DEACTIVE` () → — (6.1, 7.1, 7.2, 8, BM); `DISABLE` () → — (6.1, 7.1, 7.2, 8, BM); `ENABLE` () → — (6.1, 7.1, 7.2, 8, BM); `GETTEXT` () → string / () → — (6.1, 7.1, 7.2, 8, BM); `SETTEXT` (string) → — (6.1, 7.1, 7.2, 8, BM); `MOVE` (int, int) → — (8, BM); `SETCURSORPOS` (int) → — (8, BM); `SETPOSITION` (int, int) → — (8, BM); `SETPRIORITY` (int) → — (8, BM); `ENABLENL` (bool) → — (BM); `SETCOLOR` (int, int, int) → — (BM); `SETREADONLY` (bool) → — (BM); `SETRECT` (int, int, int, int) → — (BM)
- **Eventy bez literału:** `ONCHANGED` (6.1, 7.1, 7.2, 8, BM); `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONENTER` (6.1, 7.1, 7.2, 8, BM); `ONESC` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CURSOR` string (6.1, 7.1, 7.2, 8, BM); `FONT` string (6.1, 7.1, 7.2, 8, BM); `RECT` rect/string (6.1, 7.1, 7.2, 8, BM); `TEXT` string (6.1, 7.1, 7.2, 8, BM); `PRIORITY` int (8, BM); `CONDITION` string (6.1)
## APPLICATION
- **Metody bez rejestracji:** `DISABLEMUSIC` () → — (6.1, 7.1, 7.2, 8, BM); `ENABLEMUSIC` () → — (6.1, 7.1, 7.2, 8, BM); `GOTO` (string) → — (6.1, 7.1, 7.2, 8, BM); `PRINT` (int, int, int, …) → — / (int/string, int, int, int) → — (6.1, 7.1, 7.2, 8, BM); `RESTART` () → — (6.1, 7.1, 7.2, 8, BM); `STOREBINARY` () → — (7.2, 8, BM); `EXISTSENV` (string, string) → bool (8, BM); `GETPLAYER` () → string (BM); `NEEDSUPGRADE` (BM); `RELOAD` (string) → — (BM); `RUNC` (6.1); `STARTDRAGGINGWINDOW` (int, int) → — (BM); `STOPDRAGGINGWINDOW` () → — (BM); `UPGRADE` (BM)
- **Eventy bez literału:** `ONACTIVATE` (BM); `ONDEACTIVATE` (BM); `ONDOMODAL` (BM); `ONDONE` (BM); `ONMUSICLOOPED` (BM); `ONRESTART` (BM); `ONUPGRADE` (BM)
- **Pola bez literału:** `BLOOMOO_VERSION` string (BM); `SCENES` string (BM); `VERSION` string (BM)
## PATTERN
- **Metody bez rejestracji:** `SETGRID` (int, int) → — (7.2, 8, BM); `GETALIASAT` (int, int, bool, bool) → string (8, BM); `GETALIASATCELL` (int, int, int) → string (8, BM); `GETALIASINFO` (string, string) → — (8, BM); `GETCELLCORD` (int, int, string, int) → bool (8, BM); `GETGRAPHICSAT` (int, int, bool, bool) → string / (int, int, bool, bool, int) → string / (int, int, bool, bool, int, int) → string (8, BM); `GETINFOAT` (int, int, bool, bool, int/string) → — (8, BM); `MOVE` (int, int) → — (8, BM); `REMOVE` (int, int, …) → — / (int, …) → — / (string, int, int, …) → — (8, BM); `SETPOSITION` (int, int) → — (8, BM)
- **Stuby w emulatorze:** `ADD` (7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (7.2, 8, BM)
- **Pola bez literału:** `GRIDX` int (7.2, 8, BM); `GRIDY` int (7.2, 8, BM); `HEIGHT` int (7.2, 8, BM); `PRIORITY` int (7.2, 8, BM); `TOCANVAS` bool (7.2, 8, BM); `VISIBLE` bool (7.2, 8, BM); `WIDTH` int (7.2, 8, BM); `LAYERS` int (8, BM)
## NETSERVER
- **Metody bez rejestracji:** `ISSTARTED` () → bool (7.1, 7.2, 8, BM); `SENDCMD` (string, string) → — / (string, …) → — (7.1, 7.2, 8, BM); `START` () → — (7.1, 7.2, 8, BM); `STOP` () → — (7.1, 7.2, 8, BM); `GETDESTROYEDNAME` () → string (7.1, 7.2, 8); `GETLATESTPLAYERNAME` () → string (7.1, 7.2, 8); `GETLATESTTEXT` () → string (BM); `GETLOGGEDPLAYERNAME` () → string (BM); `GETPLAYERNAME` (int) → string (BM); `GETPLAYERSNO` () → int (BM); `SENDBEHAVIOUR` (string, string) → — / (string, …) → — (BM); `SENDTEXT` (string, string) → — / (string, …) → — (BM); `SENDVARIABLE` (string, string) → — / (string, …) → — (BM)
- **Eventy bez literału:** `ONCOMMAND` (7.1, 7.2, 8, BM); `ONDESTROYPLAYER` (7.1, 7.2, 8, BM); `ONNEWPLAYER` (7.1, 7.2, 8, BM); `ONTEXT` (BM)
## INERTIA
- **Stuby w emulatorze:** `ADDFORCE` (—); `CREATESPHERE` (—); `DELETEBODY` (—); `GETPOSITIONX` (—); `GETPOSITIONY` (—); `GETSPEED` (—); `LINK` (—); `LOAD` (—); `RESETTIMER` (—); `SETGRAVITY` (—); `SETLINEARDAMPING` (—); `SETMATERIAL` (—); `SETPOSITION` (—); `SETVELOCITY` (—); `TICK` (—); `UNLINK` (—)
## SCROLL
- **Metody bez rejestracji:** `ADD` (string) → — (7.2, 8, BM); `MOVEVIEWPORT` (int, int) → — (7.2, 8, BM); `REMOVE` (string) → — (7.2, 8, BM); `SCROLLDOWN` (int) → — (7.2, 8, BM); `SCROLLLEFT` (int) → — (7.2, 8, BM); `SCROLLRIGHT` (int) → — (7.2, 8, BM); `SCROLLUP` (int) → — (7.2, 8, BM); `SETVIEWPORT` (int, int, int, int) → — (7.2, 8, BM); `INVALIDATE` () → — (BM); `MOVE` (int, int) → — (BM)
- **Eventy bez literału:** `ONBOTTOM` (7.2, 8, BM); `ONDONE` (7.2, 8, BM); `ONLEFT` (7.2, 8, BM); `ONRIGHT` (7.2, 8, BM); `ONTOP` (7.2, 8, BM)
- **Pola bez literału:** `VIEWPORT` rect (7.2, 8, BM)
## DOUBLE
- **Metody bez rejestracji:** `SETDEFAULT` (any) → — (6.1, 7.1, 7.2, 8, BM); `AND` (int) → int (7.1, 7.2, 8, BM); `NOT` () → int / () → int/string (7.1, 7.2, 8, BM); `OR` (int) → int (7.1, 7.2, 8, BM); `POWER` (double/int) → double/int / (int) → int (7.1, 7.2, 8, BM); `XOR` (int) → int (7.1, 7.2, 8, BM); `ISUPPERLETTER` (int) → bool (7.2, 8, BM); `ROUND` () → int (7.2, 8, BM); `COPYFILE` (string, string) → bool (8, BM); `RANDOM` (int, int) → int / (int, int, …) → int (8, BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONNETCHANGE` (7.1, 7.2, 8, BM)
- **Pola bez literału:** `NETNOTIFY` bool (7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## INTEGER
- **Metody bez rejestracji:** `SETDEFAULT` (any) → — (6.1, 7.1, 7.2, 8, BM); `ARCTAN` (double) → double (7.1, 7.2, 8, BM); `COSINUS` (double) → double (7.1, 7.2, 8, BM); `MAXA` (double, …) → double (7.1, 7.2, 8, BM); `MINA` (double, …) → double (7.1, 7.2, 8, BM); `SINUS` (double) → double (7.1, 7.2, 8, BM); `SQRT` () → double / () → int (7.1, 7.2, 8, BM); `ISUPPERLETTER` (int) → bool (7.2, 8, BM); `COPYFILE` (string, string) → bool (8, BM); `SGN` () → int (8, BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONNETCHANGE` (7.1, 7.2, 8, BM)
- **Pola bez literału:** `NETNOTIFY` bool (7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## MOVIE
- **Metody bez rejestracji:** `ISPLAYING` () → bool / () → — (8, BM); `LOAD` () → — (8, BM); `PAUSE` () → — (8, BM); `PLAY` () → — (8, BM); `RESUME` () → — (8, BM); `SEEK` () → — / (int) → — (8, BM); `SETLOOP` () → — / (int, int) → — (8, BM); `SETPOSITION` () → — / (int, int) → — (8, BM); `STOP` () → — / (bool) → — (8, BM)
- **Eventy bez literału:** `ONDONE` (8, BM); `ONFRAMEUPDATED` (8, BM)
- **Pola bez literału:** `POSITION` point (8, BM); `PRIORITY` int (8, BM); `RESOLUTION` size (8)
## MOUSE
- **Metody bez rejestracji:** `GETLASTCLICKPOSX` () → int (6.1, 7.1, 7.2, 8, BM); `GETLASTCLICKPOSY` () → int (6.1, 7.1, 7.2, 8, BM); `MOVE` (int, int) → — (6.1, 7.1, 7.2, 8, BM); `CLICK` (int, int, string) → — (7.2, 8, BM); `LOCKACTIVECURSOR` (bool) → — (8, BM); `MOUSERELEASE` (int, int, string) → — (8, BM); `SETCLIPRECT` (int, int, int, int) → — (8, BM); `ISLBUTTONDOWN` () → bool (BM); `ISRBUTTONDOWN` () → bool (BM); `SETACTIVERECT` (int, int, int, int) → — (BM)
- **Eventy bez literału:** `ONDBLCLICK` (6.1, 7.1, 7.2, 8, BM); `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## NETPEER
- **Metody bez rejestracji:** `CLOSE` () → — (7.1); `CONNECT` () → — (7.1); `GETLATESTTEXT` () → string (BM); `GETRECEIVED` () → — (7.1); `SEND` () → — (7.1); `SENDBEHAVIOUR` (string, string) → — / (string, …) → — (BM); `SENDCMD` (string, …) → — (BM); `SENDTEXT` (string, string) → — / (string, …) → — (BM); `SENDVARIABLE` (string, string) → — / (string, …) → — (BM)
- **Eventy bez literału:** `ONCLOSED` (7.1); `ONCONNECTED` (7.1); `ONDONE` (7.1); `ONRECEIVED` (7.1)
## BUTTON
- **Metody bez rejestracji:** `ACCENT` (string) → — / (string, bool) → — (6.1, 7.1, 7.2, 8, BM); `GETPRIORITY` () → int (6.1, 7.1, 7.2, 8, BM); `SETONCLICK` (string) → — (6.1, 7.1, 7.2, 8, BM); `SETONMOVE` (string) → — (6.1, 7.1, 7.2, 8, BM); `GETONCLICK` () → string (7.2, 8, BM); `GETONMOVE` () → string (7.2, 8, BM); `SYN` () → — (8, BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONPAUSED` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `ACCENT` string (6.1, 7.1, 7.2, 8, BM); `PRIORITY` int (6.1, 7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## NETCLIENT
- **Metody bez rejestracji:** `CONNECT` () → — (7.1, 7.2, 8, BM); `DISCONNECT` () → — (7.1, 7.2, 8, BM); `ISCONNECTED` () → bool (7.1, 7.2, 8, BM); `SENDCMD` (string) → — / (string, …) → — (7.1, 7.2, 8, BM); `ISCONNECTING` () → bool (7.1, 7.2, 8); `GETLATESTTEXT` () → string (BM); `SENDBEHAVIOUR` (string, string) → — / (string, …) → — (BM); `SENDTEXT` (string, string) → — / (string, …) → — (BM); `SENDVARIABLE` (string, string) → — / (string, …) → — (BM)
- **Eventy bez literału:** `ONCOMMAND` (7.1, 7.2, 8, BM); `ONCONNECTED` (7.1, 7.2, 8, BM); `ONCONNECTIONCLOSED` (7.1, 7.2, 8, BM)
## WORLD
- **Stuby w emulatorze:** `ADDTOPATH` (WORLD); `ADDWAYPOINT` (WORLD); `FOLLOW` (WORLD); `FOLLOWROUTE` (WORLD); `GOTOPATH` (WORLD); `MOVETO` (WORLD); `MOVETOPATH` (WORLD); `REMOVEROUTE` (WORLD); `REMOVEWAYPOINT` (WORLD); `SETOBJECTPROPERTIES` (WORLD)
## FILTER
- **Metody bez rejestracji:** `ISRUNNING` () → — / (string) → bool (7.1, 7.2, 8, BM); `LINK` () → — / (string) → — (7.1, 7.2, 8, BM); `SETPROPERTY` () → — / (string, string) → — (7.1, 7.2, 8, BM); `START` () → — / (string) → — (7.1, 7.2, 8, BM); `STOP` () → — / (string) → — (7.1, 7.2, 8, BM); `UNLINK` () → — / (string) → — (7.1, 7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (7.1, 7.2, 8, BM); `ONTICK` (7.1, 7.2, 8, BM)
- **Pola bez literału:** `ACTION` string (7.1, 7.2, 8, BM)
## GRBUFFER
- **Metody bez rejestracji:** `CREATE` (int, int, int, int, int, int) → int (BM); `DRAW` (int, bool) → — (BM); `FINDAT` (int, int) → int (BM); `FLUSH` (int, bool, bool) → — (BM); `FLUSHALL` (bool, bool) → — (BM); `UNDO` (int, bool) → — (BM)
- **Eventy bez literału:** `ONDONE` (BM)
- **Pola bez literału:** `DESTINY` string (BM); `SOURCE` string (BM)
## JOYSTICK
- **Metody bez rejestracji:** `GETBUTTONSTATE` (int) → int (8, BM); `GETPOSITION` (string) → int (8, BM); `ISLEFT` () → bool (8, BM); `ISRIGHT` () → bool (8, BM)
- **Eventy bez literału:** `ONBUTTONDOWN` (8, BM); `ONBUTTONUP` (8, BM); `ONDONE` (8, BM); `ONMOVE` (8, BM)
- **Pola bez literału:** `PORT` string (BM)
## *
- **Metody bez rejestracji:** `ADDTOARRAY` (string) → — (6.1, 7.1, 7.2, 8, BM); `ADDTOGROUP` (string) → — (6.1, 7.1, 7.2, 8, BM); `GETNAME` () → string (7.1, 7.2, 8, BM); `MSGBOX` () → — (7.1, 7.2, 8, BM); `GETCLONESNO` () → int (8, BM); `REMOVEALLBEHAVIOURS` () → — (8, BM); `OVERIDESIGNALS` (bool) → — (BM); `REMOVEBEHAVIOURFORCE` (string) → — (BM)
## @
- **Metody bez rejestracji:** `MSGBOX` () → — (7.2, 8, BM); `RUNONTIMER` () → — (7.2, 8, BM); `VALUE` () → — / (string) → — (7.2, 8, BM); `CONTINUE` () → — (8, BM); `CREATE` () → — (8, BM); `GETAPPLICATIONNAME` () → string / () → — (8, BM); `GETCURRENTSCENE` () → string / () → — (8, BM)
- **Stuby w emulatorze:** `FOR` (BM)
## CANVAS_OBSERVER
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONINITIALUPDATE` (6.1, 7.1, 7.2, 8, BM); `ONUPDATE` (6.1, 7.1, 7.2, 8, BM); `ONUPDATED` (6.1, 7.1, 7.2, 8, BM); `ONWINDOWFOCUSOFF` (7.2, 8, BM); `ONWINDOWFOCUSON` (7.2, 8, BM); `ONINITIALUPDATED` (BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## INTERNET
- **Metody bez rejestracji:** `EXTRACT` (BM); `GET` (BM); `GETPROGRESS` (BM)
- **Eventy bez literału:** `ONCONNECTED` (BM); `ONDONE` (BM); `ONDOWNLOADED` (BM); `ONERROR` (BM)
- **Pola bez literału:** `SERVER` string (BM)
## NETWORK
- **Metody bez rejestracji:** `CLOSE` (6.1); `CONNECT` (6.1); `GETRECEIVED` (6.1); `SEND` (6.1)
- **Eventy bez literału:** `ONCLOSED` (6.1); `ONCONNECTED` (6.1); `ONDONE` (6.1); `ONRECEIVED` (6.1)
## TIMER
- **Metody bez rejestracji:** `PAUSE` () → — (7.2, 8, BM); `RESUME` () → — (7.2, 8, BM); `ADDTOARRAY` (7.1); `ADDTOGROUP` (7.1); `GETNAME` (7.1); `MSGBOX` (7.1)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## VECTOR
- **Metody bez rejestracji:** `EXPAND` () → — / (int) → — (7.1, 7.2, 8, BM); `GETSIZE` () → — / (int) → — (7.1, 7.2, 8, BM); `SET` () → — (7.1, 7.2, 8, BM); `SMUL` () → double / () → — (7.1, 7.2, 8, BM); `VMUL` () → — (7.1, 7.2, 8, BM); `NEG` () → — (7.2, 8, BM); `SUB` () → — (7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (7.1, 7.2, 8, BM)
## FONT
- **Metody bez rejestracji:** `SETCOLOR` (int) → — / (int, int, int) → — (6.1, 7.1, 7.2, 8, BM); `SETFAMILY` (string) → — (6.1, 7.1, 7.2, 8, BM); `SETSIZE` (int) → — (6.1, 7.1, 7.2, 8, BM); `SETSTYLE` (string) → — (6.1, 7.1, 7.2, 8, BM); `GETHEIGHT` (BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## PATH
- **Metody bez rejestracji:** `ADD` () → — / (string) → — (7.1, 7.2, 8, BM); `GETNODE` () → — / (int) → string (7.1, 7.2, 8, BM); `GETPROPERTY` () → — / (string) → double (7.1, 7.2, 8, BM); `GETSIZE` () → int / () → — (7.1, 7.2, 8, BM); `SETPROPERTY` () → — / (string, double) → — (7.1, 7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (7.1, 7.2, 8, BM)
- **Pola bez literału:** `NODES` list (7.1, 7.2, 8, BM)
## SOUND
- **Metody bez rejestracji:** `SETPAN` (int) → — (7.1, 7.2, 8, BM); `SETVOLUME` (int) → — (7.1, 7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM); `ONRESUMED` (8, BM)
- **Pola bez literału:** `FLUSHAFTERPLAYED` bool (6.1, 7.1, 7.2, 8, BM); `PRELOAD` bool (6.1, 7.1, 7.2, 8, BM); `CONDITION` string (6.1)
## DATABASE
- **Metody bez rejestracji:** `ADD` (string) → — (7.2, 8, BM); `INSERTAT` (int, string) → — (7.2, 8, BM); `PREV` () → — (7.2, 8, BM); `REMOVE` (string, any) → — (7.2, 8, BM); `REMOVEAT` (int) → — (7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (7.2, 8, BM)
## FIFO
- **Metody bez rejestracji:** `GETSIZE` () → int / () → — (7.2, 8, BM); `ISEMPTY` () → bool / () → — (7.2, 8, BM); `POP` () → — (7.2, 8, BM); `PUSH` () → — / (…) → copy (7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (7.2, 8, BM); `ONEMPTY` (7.2, 8, BM)
## GROUP
- **Metody bez rejestracji:** `GETNAME` (int) → string (6.1, 7.1, 7.2, 8, BM); `ADDCLONES` (string, int, int) → — (7.1, 7.2, 8, BM); `ADDCLONE` (6.1); `CONTAINS` (string) → bool (BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## LIFO
- **Metody bez rejestracji:** `GETSIZE` () → int / () → — (7.2, 8, BM); `ISEMPTY` () → bool / () → — (7.2, 8, BM); `POP` () → — (7.2, 8, BM); `PUSH` () → — / (…) → copy (7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (7.2, 8, BM); `ONEMPTY` (7.2, 8, BM)
## DIALOG
- **Metody bez rejestracji:** `SHOW` () → — (6.1, 7.1, 7.2, 8, BM); `ADD` (string) → — (7.2, 8, BM); `HIDE` () → — (7.2, 8, BM); `SETBACKGROUND` (string) → — (7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.2, 8, BM)
## BEHAVIOUR
- **Metody bez rejestracji:** `BREAK` () → — (7.2, 8, BM); `DISABLE` () → — (7.2, 8, BM); `ENABLE` () → — (7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
## EPISODE
- **Metody bez rejestracji:** `NEXT` () → — (6.1, 7.1, 7.2, 8, BM); `PREV` () → — (6.1, 7.1, 7.2, 8, BM); `RESTART` () → — (6.1, 7.1, 7.2, 8, BM)
## KEYBOARD
- **Metody bez rejestracji:** `GETLATESTKEYS` (string, bool) → string (8, BM)
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## MULTIARRAY
- **Metody bez rejestracji:** `COUNT` (any) → int (8, BM); `SAFEGET` (…) → copy/int / (…) → double/int (8, BM)
- **Eventy bez literału:** `ONDONE` (8, BM)
## STRUCT
- **Metody bez rejestracji:** `SETFIELD` (7.2, 8, BM)
- **Eventy bez literału:** `ONDONE` (7.2, 8, BM)
- **Pola bez literału:** `NETNOTIFY` bool (7.2, 8, BM)
## COMPLEXCONDITION
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## CONDITION
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## SEQUENCE
- **Eventy bez literału:** `ONDONE` (6.1, 7.1, 7.2, 8, BM)
- **Pola bez literału:** `CONDITION` string (6.1)
## KOLOROWANKA
- **Metody bez rejestracji:** `GETENDCOLOR` (KOLOROWANKA)
## STATICFILTER
- **Eventy bez literału:** `ONDONE` (7.1, 7.2, 8, BM)
+79
View File
@@ -0,0 +1,79 @@
# Atlas API — tracker silników i bibliotek
Atlas łączy snapshoty oryginalnych DLL z rejestracjami `MethodSpec` w Rex-EMoolator.
Nie uruchamia emulatora ani binarek. Nie utożsamia wykrycia metody z poprawną implementacją.
## Uruchomienie
Z katalogu tego repozytorium, z zainstalowanymi zależnościami `.[api]`:
```sh
.venv/bin/python -m ams.serve_tracker \
--emulator-root /ścieżka/do/Rex-EMoolator
```
Otwórz `http://127.0.0.1:8766/ui/tracker.html`. Command Center ma odnośnik do Atlasu.
`GET /tracker` oraz `GET /tracker?download=1` udostępniają te same dane jako JSON.
Snapshoty z bazy i jawnie wskazanego katalogu są łączone i deduplikowane po SHA DLL.
Bez SHA używany jest identyfikator snapshotu, jawnie niebędący tożsamością binarki.
Katalog snapshotów jest przeszukiwany rekurencyjnie. Wyniki batcha mają pierwszeństwo przed starszymi snapshotami tego samego SHA; konflikt jest widoczny w uwagach, a dane nie są automatycznie scalane.
Launcher domyślnie wczytuje `data/binary-inventory.json`, aby pokazać pokrycie zbioru DLL. Filtr rodziny i wariantu ogranicza dowody oryginału; nadal pokazuje sumę metod API z oznaczeniem „nieustalone” dla braku obserwacji w wybranym zakresie.
Eksport bez serwera:
```sh
.venv/bin/python -m ams.tracker snapshots/batch/*.snapshot.json snapshots/*.snapshot.json \
--emulator-root /ścieżka/do/Rex-EMoolator \
--reviews tracker-reviews.json --out /tmp/tracker.json
```
Atlas odczytuje snapshoty z dysku przy każdym pobraniu katalogu. Command Center, diff i eksport zgodności korzystają z bazy SQLite; nowe wyniki można do niej dodać poleceniem `.venv/bin/python -m ams.api.importer snapshots/batch/*.snapshot.json`.
## Interpretacja
- **Zarejestrowana**: znaleziono wpis `MethodSpec`, bez oceny poprawności.
- **Podejrzenie stubu**: heurystyka wykryła wyjątek lub komunikat o braku implementacji. Może dotyczyć tylko gałęzi; wymaga przeglądu.
- **Brak rejestracji**: adapter nie znalazł wpisu; dynamiczny dispatcher może obsługiwać metodę inaczej.
- **Zaimplementowana / przegląd ASM / test zachowania**: aktualne deklaracje przeglądu obejmują wszystkie obserwowane warianty danej pary typ/metoda.
- **Nieustalone w oryginale**: brak obserwacji, nigdy dowód nieobecności.
Licznik to pary typ/metoda. Nie jest liczbą unikalnych ciał Java ani procentem zgodności całego silnika. Metody bazowe `CMC_Runner` (SEND, CLONE, …) są w zakresie `*` raz; typy wskazują go polem `inherits`. Zakres `@` to instrukcje `@IF`/`@LOOP`/… (runner typu 0), porównywane z `CodeParser.dispatchSpecialCall`. Typy bez rozpoznanych metod pozostają widoczne.
Roadmapę braków emulatora per zakres generuje `python -m ams.roadmap tracker.json -o docs/roadmap.md` (metody z sygnaturą, stuby, eventy i pola bez literału, z rodzinami silnika, w których DLL dana pozycja występuje).
Typ → runner pochodzi z `runner_map` snapshotu (fabryka w 7.1+, konstruktory klas w 6.1); bez niego z nazwy klasy, oznaczone jako wnioskowane. Metoda wspólnego runnera, którą oryginał pomija dla danego typu warunkiem `obj.getType()`, nie jest temu typowi przypisana; pusta implementacja wirtualna jest oznaczona jako brak efektu. Sygnatury (typy argumentów i wyniku) są odczytane z ciała metody i mogą być sumą wariantów (`int/string`).
Eventy typu pochodzą z jego vtable (`type_events`) albo z listy najbliższej klasy w łańcuchu konstruktorów. Po stronie emulatora liczy się literał nazwy: w klasie typu (`emitted`), w `Variable.java` (`emitted_base`), w innym kodzie bez przypisania do typu (`engine_literal`); `not_found` znaczy tylko, że literału nie ma.
Pola typu pochodzą z jego łańcucha konstruktorów (`type_fields`) albo z pól jego klasy i jej baz. Po stronie emulatora: klucz `":NAME"` w gałęzi typu w `CNVParser.createVariable` lub odczyt atrybutu (`getAttribute`, `getAttributeInHierarchy`, `attributes().get`) w klasie typu (`read`), w `Variable.java` (`read_base`), gdzie indziej (`engine_literal`).
Alias `BOOL` jest łączony z `BOOLEAN`, `INT` z `INTEGER`; nazwy metod są normalizowane do uppercase. ID metody pozostaje lokalne dla konkretnej klasy i binarki. Relacje dziedziczenia pochodzą wyłącznie ze snapshotu, nie są zgadywane z innej wersji.
Adapter rozpoznaje bieżący wzorzec rejestracji Java; nie jest ogólnym parserem języka Java. Komentarze i literały nie tworzą fałszywych wpisów, nawiasy są dopasowywane leksykalnie. Własne dispatchery `GROUP` / `INSTANCE` są oznaczone do przeglądu. Celowe no-op nie są automatycznie stubami.
## Dowody poprawności
`tracker-reviews.json` jest wersjonowanym rejestrem przeglądów; początkowo pustym. Ekstrakcja rejestracji silników, WORLD i KOLOROWANKA nie wypełnia go automatycznie.
Każdy wpis wymaga pól tekstowych:
| Pole | Znaczenie |
|---|---|
| `type`, `method` | Para API |
| `binary_sha256`, `rva` | Dokładna binarka i adres względny, np. `0xc950` |
| `emulator_commit`, `body_sha256`, `source_tree_sha256` | Rewizja i hashe z eksportu trackera |
| `kind` | `asm` lub `runtime` |
| `verdict` | `matches`, `partial`, `differs` |
| `reviewer`, `date` | Autor i data przeglądu |
| `notes`, `evidence` | Zakres porównania i odnośnik do trwałego dowodu/testu |
`matches` oznacza świadomą ocenę całej metody dla wskazanego wariantu; dla sprawdzenia pojedynczego przypadku użyj `partial`. Sam adres lub dekompilat nie wystarcza do takiej oceny. Zmiana commita lub dowolnego źródła Java w `core/src` unieważnia przegląd konserwatywnie (także zmiana helpera). Można zachować historyczne wpisy dla starszych rewizji. Sprzeczne, zduplikowane przeglądy tej samej pary i rewizji są odrzucane.
Adresy `impl_addr`, `case_addr`, `registration_addr` w snapshotach są VA, nie RVA. Należy odjąć potwierdzoną bazę obrazu przed zapisaniem `rva`.
## Kolejka dalszej analizy
```sh
.venv/bin/python -m ams.inventory /ścieżka/do/_dll_repository \
/ścieżka/do/World.dll /ścieżka/do/Kolorowanka.dll \
--snapshots snapshots --out /tmp/binary-inventory.json
```
Manifest zachowuje wszystkie ścieżki identycznych DLL i proponuje pliki wynikowe po pełnym SHA. Nie uruchamia analiz. Klasyfikacja nazw wymaga przeglądu przy przemianowanych DLL. Starsze Pikliby są wyłączone z zakresu, Sekai oznaczone jako zależność natywna.
Kolejka wszystkich unikalnych silników: [batch.md](batch.md). Statyczne dowody pluginów: [WORLD](world-analysis.md) i [KOLOROWANKA](kolorowanka-pilot.md).
Pozostałe etapy: uogólnienie ekstrakcji pluginów na kolejne warianty; uzupełnienie niepełnych mapowań klas, dziedziczenia, pól i zdarzeń; rozstrzygnięcie podwójnej rejestracji WORLD.SETPOSITION; analiza natywnego Sekai; porównanie zachowania i rejestracja przeglądów. Historyczny snapshot 7.1 bez SHA pozostaje oznaczony jako nieustalony; nowe ekstrakcje mają pełną tożsamość DLL. Istniejący ogólny pipeline `acquire(directory)` nadal wybiera jeden silnik — do masowej analizy służy `ams.acquire.batch`.
+35
View File
@@ -0,0 +1,35 @@
# WORLD: static script API registration
Analyzed `/Users/genszu/Reksio/Reksio i Czarodzieje/World.dll` with REA/Ghidra 12.1.2. SHA-256: `1f6649e93ddbd12be1865a06f15fbae5c62685dab0efb9072bdd2af1ccaca78f`. Image base: `0x10000000`. This report establishes static registration, not emulator functional equivalence.
## Factory chain
- Exported `getModuleInterface` at `0x1000f300` returns the module singleton stored at `0x1001d014`.
- `CWorld::CWorld` at `0x1000edf0` constructs a null-terminated implemented-types array containing `WORLD`; `getImplementedTypes` at `0x1000ef30` returns that array.
- Exported `CWorld::resolve` at `0x1000f030` compares the element's `TYPE` to `WORLD`, allocates `0x110` bytes and calls object constructor `0x10001000`.
- The object constructor invokes `CMC_Object` with type number `0x2713`, sets vtable `0x10011750`, and creates an `ISekai` instance. Diagnostic string `CMC_World::CMC_World( CMS_Scene )` supports the `CMC_World` label; the constructor itself is unnamed in Ghidra.
Evidence: `ev_99c2269105b1ae67882e312fdaa8883edd2786feb40799d4ce33078482d42365`, `ev_501163338c92037a1f7d3cad8aa4d527cace6cdcdbe4b31040cf93bce51dc095`, `ev_c91a5c5303b818c464ee2728ff883d2d81e3d701148ba99fae16aa6817809295`, `ev_83d9284ab7ce107eb718d1e7c69518ce0f9f6e664a08a579bbb537b762b006d1`.
## Registration
`FUN_10007710` contains **67 registration entries representing 66 distinct method names**. Each recovered entry joins an immediate passed to `CInteger::CInteger` (`0x1000f984`), an ASCII method string constructed as `CStringHashCode` (`0x1000f97e`), and `CHashtable::put` (`0x1000f978`). The routine first calls imported `CMC_Runner::prepareMthHashSet` (`0x1000f4b6`), so inherited/global methods exist outside this DLL's own registration routine.
Every method's ID, string address, ID push address and registration call address are retained in `../snapshots/world.snapshot.json`. Full decompilation and assembly are retained in `../snapshots/world.evidence.json`, especially record `ev_aacb5eb769bd5855ae079efed1447e911ec5d2b83f3e6b4086fa1776bf041d1b`. REA's live response exceeded the transport budget; the complete retained record was exported and read locally instead of repeating analysis.
The binary really registers `SETPOSITION` twice: ID 24 at `0x1000834c`, then ID 43 at `0x10009d4f`, both referencing string `0x100125a0`. `RESUMELINK` also receives ID 43 (`0x10009c4f`, string `0x1001246c`). The snapshot preserves both SETPOSITION entries. The effective duplicate-key behavior of the imported hashtable, and the dispatcher meaning of ID 43, are **unresolved**; do not silently deduplicate this into a single verified method ID.
## Emulator comparison
All 66 distinct names occur in `WorldVariable.java`'s 72-entry method map. Six emulator names are not directly registered in this DLL: `ADDGRAVITYEX`, `GETROTATIONX`, `GETROTATIONY`, `JOIN2`, `JOINTSPEED`, `JOINTSTEER`. They may belong to other versions; this bounded comparison does not establish that they are incorrect or globally absent from the original engines.
Registration coverage says nothing about functional correctness, argument validation, units, side effects, or partial implementations. No behavioral review records were added.
## Remaining work
- Recover other World DLL variants and compare registration IDs and names.
- Resolve SETPOSITION duplicate insertion and dispatcher targets.
- Extract inherited/global methods from the matching engine; extract events and fields separately.
- Review functional equivalence per method against dispatcher and Sekai implementations.
Default Ghidra string inventory initially omitted WORLD and script LOAD, although the bytes and code references were present. This demonstrates why empty `search_strings` results cannot prove absence. Factory exports and raw PE-backed strings resolved the gap. Session resources were closed successfully after evidence export.
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
{
"schema": "extraction-batch/1",
"attempted": 29,
"succeeded": 29,
"pending": 0,
"skipped_success": 5,
"skipped_failed": 0,
"skipped_scope": 17,
"failures": []
}
@@ -0,0 +1 @@
[+] Robin Hood PL__bd761ca745b1__PIKLIB8.DLL [Piklib/MSVC6]: 36 types, 452 methods, 128 events, 111 fields (1418 layout, 440 dispatch) -> /private/tmp/aidem-tracker-pilot/snapshots/batch-1/06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.e19d373bb33d41f8bc9d4fae786bbcf9.pending.json
@@ -0,0 +1 @@
[+] Robin Hood PL__bd761ca745b1__PIKLIB8.DLL [Piklib/MSVC6]: 36 types, 500 methods, 128 events, 111 fields (1418 layout, 485 dispatch, 39 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.728981daff6e41e9b03a1bc21b64e4c1.pending.json
@@ -0,0 +1 @@
[+] Robin Hood PL__bd761ca745b1__PIKLIB8.DLL [Piklib/MSVC6]: 36 types, 500 methods, 128 events, 111 fields (1418 layout, 485 dispatch, 39 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.9b71d6b82912487abe32776e3a833874.pending.json
@@ -0,0 +1 @@
[+] Robin Hood PL__bd761ca745b1__PIKLIB8.DLL [Piklib/MSVC6]: 36 types, 500 methods, 128 events (190 per type), 111 fields (1418 layout, 485 dispatch, 39 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.d55db893a6864a1b91bd231c746860a9.pending.json
@@ -0,0 +1 @@
[+] Robin Hood PL__bd761ca745b1__PIKLIB8.DLL [Piklib/MSVC6]: 36 types, 500 methods, 128 events (190 per type), 111 fields (113 per type, 1418 layout, 485 dispatch, 39 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.d8d498af3ec949049a05cb8fea9ec2c6.pending.json
@@ -0,0 +1 @@
[+] Robin Hood PL__bd761ca745b1__PIKLIB8.DLL [Piklib/MSVC6]: 36 types, 500 methods, 128 events (190 per type), 111 fields (113 per type, 1418 layout, 485 dispatch, 39 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/06aa33cef137a0902f5cd9db7c6549c1d4594bba2e1d06af4531e9ed29bd0e57.b9aa34642c3743bd8931473417b13913.pending.json
@@ -0,0 +1 @@
[+] Wesołe Przedszkole Koziołka Matołka PL__7b7ef02ea246__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 515 methods, 141 events, 114 fields (1495 layout, 503 dispatch) -> /private/tmp/aidem-tracker-pilot/snapshots/batch-2/0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.4db9a32b9bb341498dbda8783822ebab.pending.json
@@ -0,0 +1 @@
[+] Wesołe Przedszkole Koziołka Matołka PL__7b7ef02ea246__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 574 methods, 141 events, 114 fields (1495 layout, 559 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.24d49d4f14cc49fd974fe32846a517ad.pending.json
@@ -0,0 +1 @@
[+] Wesołe Przedszkole Koziołka Matołka PL__7b7ef02ea246__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 574 methods, 141 events, 114 fields (1495 layout, 559 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.dd3fcf76ce0746378ff4c50b7a73ab1a.pending.json
@@ -0,0 +1 @@
[+] Wesołe Przedszkole Koziołka Matołka PL__7b7ef02ea246__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 574 methods, 141 events (208 per type), 114 fields (1495 layout, 559 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.a3edd41a683b46559e671c3a8f4cde85.pending.json
@@ -0,0 +1 @@
[+] Wesołe Przedszkole Koziołka Matołka PL__7b7ef02ea246__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 574 methods, 141 events (208 per type), 114 fields (119 per type, 1495 layout, 559 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.6d5bfe04c28843af95cc6967b0262d7c.pending.json
@@ -0,0 +1 @@
[+] Wesołe Przedszkole Koziołka Matołka PL__7b7ef02ea246__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 574 methods, 141 events (208 per type), 114 fields (119 per type, 1495 layout, 559 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/0b91f4ce57d0c1274e213d83440be76868524441b4c6bec26d9b07ca25dd6e87.179f80ad6ff04ab08caf1afa994dcbd8.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 583 methods, 184 events, 123 fields (800 layout, 564 dispatch) -> /private/tmp/aidem-tracker-pilot/snapshots/batch-0/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.d10c90b49156485b97b4804f338028d5.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 583 methods, 184 events, 123 fields (800 layout, 564 dispatch) -> /private/tmp/aidem-tracker-pilot/snapshots/batch-0/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.1fbc23163e7142d994a0eee773037d4c.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 643 methods, 184 events, 123 fields (800 layout, 621 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.aaa36770ed314be8b2398e54a1404b83.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 643 methods, 184 events, 123 fields (800 layout, 621 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.18359d3035004993898e0c5f4b1a202e.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 643 methods, 184 events, 123 fields (800 layout, 621 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.94dc0139b76348959bc16fce6c03a3c4.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 643 methods, 184 events (218 per type), 123 fields (800 layout, 621 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.ca013b5f9db84f7d944bce718303fb19.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 643 methods, 184 events (218 per type), 123 fields (124 per type, 800 layout, 621 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.6f388826a54e413dafcfd07d473068cd.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 643 methods, 184 events (218 per type), 123 fields (124 per type, 800 layout, 621 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.5c0fec16bdb6498593c34730ee9cf88f.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kretes w akcji__fb9a2b81d685__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 643 methods, 184 events (218 per type), 123 fields (124 per type, 800 layout, 621 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1115d93c71fdc359bd5a28919bce18e26178accae5ce80e2dedc5aa14592bfdf.aaf170929ccf4969b81fbb6f091a3978.pending.json
@@ -0,0 +1 @@
[+] doktor dolittle i sindbad__f01db0dd5a0d__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 512 methods, 141 events, 114 fields (1495 layout, 500 dispatch) -> /private/tmp/aidem-tracker-pilot/snapshots/batch-0/1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.c282c14d98134521ad98dc09d6ace515.pending.json
@@ -0,0 +1 @@
[+] doktor dolittle i sindbad__f01db0dd5a0d__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 568 methods, 141 events, 114 fields (1495 layout, 553 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.b1cfdedb94214b82841d6aaa3ef4042c.pending.json
@@ -0,0 +1 @@
[+] doktor dolittle i sindbad__f01db0dd5a0d__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 568 methods, 141 events, 114 fields (1495 layout, 553 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.28c1a56c017e4880a9e31fcae2894256.pending.json
@@ -0,0 +1 @@
[+] doktor dolittle i sindbad__f01db0dd5a0d__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 568 methods, 141 events (208 per type), 114 fields (1495 layout, 553 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.067b61afe19540e5be9948774d9848a5.pending.json
@@ -0,0 +1 @@
[+] doktor dolittle i sindbad__f01db0dd5a0d__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 568 methods, 141 events (208 per type), 114 fields (119 per type, 1495 layout, 553 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.f21eb75c64744daea46839c66d74c79a.pending.json
@@ -0,0 +1 @@
[+] doktor dolittle i sindbad__f01db0dd5a0d__PIKLIB8.DLL [Piklib/MSVC6]: 40 types, 568 methods, 141 events (208 per type), 114 fields (119 per type, 1495 layout, 553 dispatch, 42 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/1c0f2b7f508c1ccb0bcbe159ab797dec60b78939e8f9faf8d0c3ef81cf168009.6d747fb9cf6445f59ba6b3649d342bd2.pending.json
@@ -0,0 +1 @@
[+] Księga Dżungli PL__c32b439b7217__PIKLIB8.DLL [Piklib/MSVC6]: 38 types, 485 methods, 135 events, 113 fields (1491 layout, 473 dispatch) -> /private/tmp/aidem-tracker-pilot/snapshots/batch-1/2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.cef52cdec009480fb38ff84d451cc8f8.pending.json
@@ -0,0 +1 @@
[+] Księga Dżungli PL__c32b439b7217__PIKLIB8.DLL [Piklib/MSVC6]: 38 types, 535 methods, 135 events, 113 fields (1491 layout, 520 dispatch, 40 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.8ebf113110f4490683508e359ee92747.pending.json
@@ -0,0 +1 @@
[+] Księga Dżungli PL__c32b439b7217__PIKLIB8.DLL [Piklib/MSVC6]: 38 types, 535 methods, 135 events, 113 fields (1491 layout, 520 dispatch, 40 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.d440e33bdd9343da95b884b6c0fd0a8f.pending.json
@@ -0,0 +1 @@
[+] Księga Dżungli PL__c32b439b7217__PIKLIB8.DLL [Piklib/MSVC6]: 38 types, 535 methods, 135 events (193 per type), 113 fields (1491 layout, 520 dispatch, 40 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.97ea9137d8de49c2b66f4c2f64abab3f.pending.json
@@ -0,0 +1 @@
[+] Księga Dżungli PL__c32b439b7217__PIKLIB8.DLL [Piklib/MSVC6]: 38 types, 535 methods, 135 events (193 per type), 113 fields (115 per type, 1491 layout, 520 dispatch, 40 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.103db577227546e2bb80851a38fdb5a8.pending.json
@@ -0,0 +1 @@
[+] Księga Dżungli PL__c32b439b7217__PIKLIB8.DLL [Piklib/MSVC6]: 38 types, 535 methods, 135 events (193 per type), 113 fields (115 per type, 1491 layout, 520 dispatch, 40 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/2b5475edfb3f8ce9df0b20f6dda143622b4b206678915cb1ebcf093327b91a9e.0018edb27ef041ea8529a8c3377e6763.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kapitan Nemo__3be911183e59__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 580 methods, 184 events, 123 fields (800 layout, 561 dispatch) -> /private/tmp/aidem-tracker-pilot/snapshots/batch-1/346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d.5e6fdbbfabfe4933af81b8d0e4b1389d.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kapitan Nemo__3be911183e59__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 580 methods, 184 events, 123 fields (800 layout, 561 dispatch) -> /private/tmp/aidem-tracker-pilot/snapshots/batch-1/346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d.02773689d6944dac9e8cc394a6e493f3.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kapitan Nemo__3be911183e59__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 640 methods, 184 events, 123 fields (800 layout, 618 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d.a0b0fd84b56548f1a499bb67bdfb5afe.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kapitan Nemo__3be911183e59__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 640 methods, 184 events, 123 fields (800 layout, 618 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d.cf2d9db6cde446438343f46182d781ce.pending.json
@@ -0,0 +1 @@
[+] Reksio i Kapitan Nemo__3be911183e59__BLOOMOOD.DLL [BlooMoo/MSVC8]: 42 types, 640 methods, 184 events, 123 fields (800 layout, 618 dispatch, 44 runners) -> /Users/genszu/Aidem-Media-DLL-Analysis/snapshots/batch/346efaeb9c9c098525d8d982aa420bb0a24b64c394bc3f2c71d85f89e607062d.84141a81b58344629b9fb3c022734802.pending.json

Some files were not shown because too many files have changed in this diff Show More