"""Reproducible pinned-image constellation constants and function fingerprints.
The semantic data-flow analysis is documented in galaxy-original-constellation-
boundary.md. This script preserves its exact image, bodies, constants and C
artifacts; it does not treat a coincident field offset as a class identity.
No client process, native call, network query or generated coordinate is used.
"""
from pathlib import Path
import argparse
import hashlib
import importlib.util
import json
import struct
ROOT = Path(__file__).resolve().parents[1]
OUTPUT = ROOT / 'artifacts/galaxy-query-research/constellations/original-constellation-geometry.json'
def extract():
spec = importlib.util.spec_from_file_location('audit', ROOT / 'research/Audit-GalaxyClientCompatibility.py')
audit = importlib.util.module_from_spec(spec)
spec.loader.exec_module(audit)
image = audit.Image(ROOT / 'artifacts/ship-model-reference/client-copy/EliteDangerous64.exe')
image_hash = hashlib.sha256(image.raw).hexdigest()
assert image_hash == '6891f70a021fa9f3a0e00458c284f48d1226e68ae7fc02ad48081aed47857e93'
constants = {}
for name, rva, expected in (
('compactRawScale', 0x5192F68, .03125), ('facingExponent', 0x5110C2C, 2),
('fadeInvisibleDistanceLy', 0x5376FE0, 24), ('fadeFullDistanceLy', 0x50CB47C, 8),
('submissionAlpha', 0x4DEE294, struct.unpack('<f', struct.pack('<f', .1))[0]),
('originX', 0x523FDE0, 49985), ('originY', 0x523FDDC, 40985), ('originZ', 0x523FDD8, 24105)):
raw = image.data(rva, 4)
value = struct.unpack('<f', raw)[0]
assert value == expected
constants[name] = dict(rva=hex(rva), raw=raw.hex(), value=value)
fallback = struct.unpack('<4f', image.data(0x50CB0F0, 16))
assert fallback == (0, 0, 1, 0)
functions = []
for rva, leaf_length, meaning in (
(0x3A26BF0, None, 'Actual active-map option3 branch calls constellation rendering'),
(0x3A1CF60, None, 'First-endpoint group mean, directional and Sol-distance fade, unchanged line submission'),
(0x3A5ACE0, None, 'Authored-name pair resolution into reference-owned compact handles'),
(0x3A28A40, None, 'First section: both handles ready, XYZ/32 to32-byte prepared endpoints, whole-group publication'),
(0x39EFB00, 21, 'Event callback subtracts60 from owner pointer and tail-jumps to3A28A40'),
(0x3A4CD50, 8, 'Prepared constellation group table getter: interface+648 = ownerbase6A0'),
(0x3C41080, 15, 'Authored group pointer from original galaxy root110'),
(0x3C41070, 15, 'Authored group count from original galaxy root118')):
span = image.function(rva)
length = leaf_length or span[1] - rva
body = image.data(rva, length)
assert list(image.instructions(rva, length))
row = dict(rva=hex(rva), bytes=length, sha256=hashlib.sha256(body).hexdigest(), meaning=meaning)
for directory in ('constellations', 'power-outer-sources'):
path = ROOT / 'artifacts/galaxy-query-research' / directory / 'decompiled' / f'solo-{rva:x}.c'
if path.is_file():
row['decompilation'] = str(path.relative_to(ROOT))
row['decompilationSha256'] = hashlib.sha256(path.read_bytes()).hexdigest()
break
functions.append(row)
return dict(imageSha256=image_hash, constants=constants, zeroDirection=list(fallback), functions=functions,
gameProcessAccess=False, gameCalls=0, networkRequests=0,
coordinateTransform='Absolute compact XYZ *1/32; for app subtract uniform Sol origin from both endpoints and camera',
originalOwner='global5F8570C, interface5526988 atbase58, preparedbase6A0',
originalDefinitions='global5FDB230, interface5539DA8, frozenroot110/118',
implementation='GalaxyOriginalConstellations; actual resolved catalogue positions only',
unconfirmed=['Original StarMapLine material RGB/width/instance parameters', 'Camera projection near/far/FOV',
'Live asynchronous compact readiness and current-version appearance'])
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--verify', action='store_true')
args = parser.parse_args()
result = extract()
text = json.dumps(result, indent=2) + '\n'
if args.verify:
assert OUTPUT.read_text(encoding='utf-8') == text, 'Constellation geometry evidence changed'
print('PASS: pinned constellation body/constant/source evidence')
else:
OUTPUT.write_text(text, encoding='utf-8')
print(OUTPUT)
"""Reproducible pinned-image constellation constants and function fingerprints.
The semantic data-flow analysis is documented in galaxy-original-constellation-
boundary.md. This script preserves its exact image, bodies, constants and C
artifacts; it does not treat a coincident field offset as a class identity.
No client process, native call, network query or generated coordinate is used.
"""
from pathlib import Path
import argparse
import hashlib
import importlib.util
import json
import struct
ROOT = Path(__file__).resolve().parents[1]
OUTPUT = ROOT / 'artifacts/galaxy-query-research/constellations/original-constellation-geometry.json'
def extract():
spec = importlib.util.spec_from_file_location('audit', ROOT / 'research/Audit-GalaxyClientCompatibility.py')
audit = importlib.util.module_from_spec(spec)
spec.loader.exec_module(audit)
image = audit.Image(ROOT / 'artifacts/ship-model-reference/client-copy/EliteDangerous64.exe')
image_hash = hashlib.sha256(image.raw).hexdigest()
assert image_hash == '6891f70a021fa9f3a0e00458c284f48d1226e68ae7fc02ad48081aed47857e93'
constants = {}
for name, rva, expected in (
('compactRawScale', 0x5192F68, .03125), ('facingExponent', 0x5110C2C, 2),
('fadeInvisibleDistanceLy', 0x5376FE0, 24), ('fadeFullDistanceLy', 0x50CB47C, 8),
('submissionAlpha', 0x4DEE294, struct.unpack('<f', struct.pack('<f', .1))[0]),
('originX', 0x523FDE0, 49985), ('originY', 0x523FDDC, 40985), ('originZ', 0x523FDD8, 24105)):
raw = image.data(rva, 4)
value = struct.unpack('<f', raw)[0]
assert value == expected
constants[name] = dict(rva=hex(rva), raw=raw.hex(), value=value)
fallback = struct.unpack('<4f', image.data(0x50CB0F0, 16))
assert fallback == (0, 0, 1, 0)
functions = []
for rva, leaf_length, meaning in (
(0x3A26BF0, None, 'Actual active-map option3 branch calls constellation rendering'),
(0x3A1CF60, None, 'First-endpoint group mean, directional and Sol-distance fade, unchanged line submission'),
(0x3A5ACE0, None, 'Authored-name pair resolution into reference-owned compact handles'),
(0x3A28A40, None, 'First section: both handles ready, XYZ/32 to32-byte prepared endpoints, whole-group publication'),
(0x39EFB00, 21, 'Event callback subtracts60 from owner pointer and tail-jumps to3A28A40'),
(0x3A4CD50, 8, 'Prepared constellation group table getter: interface+648 = ownerbase6A0'),
(0x3C41080, 15, 'Authored group pointer from original galaxy root110'),
(0x3C41070, 15, 'Authored group count from original galaxy root118')):
span = image.function(rva)
length = leaf_length or span[1] - rva
body = image.data(rva, length)
assert list(image.instructions(rva, length))
row = dict(rva=hex(rva), bytes=length, sha256=hashlib.sha256(body).hexdigest(), meaning=meaning)
for directory in ('constellations', 'power-outer-sources'):
path = ROOT / 'artifacts/galaxy-query-research' / directory / 'decompiled' / f'solo-{rva:x}.c'
if path.is_file():
row['decompilation'] = str(path.relative_to(ROOT))
row['decompilationSha256'] = hashlib.sha256(path.read_bytes()).hexdigest()
break
functions.append(row)
return dict(imageSha256=image_hash, constants=constants, zeroDirection=list(fallback), functions=functions,
gameProcessAccess=False, gameCalls=0, networkRequests=0,
coordinateTransform='Absolute compact XYZ *1/32; for app subtract uniform Sol origin from both endpoints and camera',
originalOwner='global5F8570C, interface5526988 atbase58, preparedbase6A0',
originalDefinitions='global5FDB230, interface5539DA8, frozenroot110/118',
implementation='GalaxyOriginalConstellations; actual resolved catalogue positions only',
unconfirmed=['Original StarMapLine material RGB/width/instance parameters', 'Camera projection near/far/FOV',
'Live asynchronous compact readiness and current-version appearance'])
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--verify', action='store_true')
args = parser.parse_args()
result = extract()
text = json.dumps(result, indent=2) + '\n'
if args.verify:
assert OUTPUT.read_text(encoding='utf-8') == text, 'Constellation geometry evidence changed'
print('PASS: pinned constellation body/constant/source evidence')
else:
OUTPUT.write_text(text, encoding='utf-8')
print(OUTPUT)