Apply recovered player phases, static camera query and level availability
This commit is contained in:
1 parent
117db77c7b
commit
09cf1172bf
33 files changed
+1500
-99
No files matched your search
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Read-only anchors for the implemented player/input/body phase boundary."""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from pe_inspect import PE
|
||||
|
||||
SHA256 = 'f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8'
|
||||
ANCHORS = [
|
||||
(0x438B1E, '0fbf8604070000', 'input dispatch reads stored interface704 mode'),
|
||||
(0x438B2A, 'ff2485a48b4300', 'input dispatch uses mode table'),
|
||||
(0x437A96, '66c786040700000100', 'held jump selects air mode during player update'),
|
||||
(0x437B9E, '66899e2807000066899e04070000899e14060000',
|
||||
'grounded release resets jump state, mode, then turn rate'),
|
||||
(0x437BC5, 'ff9034010000', 'player air apply virtual134'),
|
||||
(0x437C1C, 'ff9230010000', 'player ground apply virtual130'),
|
||||
(0x47E554, 'e867b6ffff', 'physics before object registry'),
|
||||
(0x47E582, 'e8b951ffff', 'object registry callback pass'),
|
||||
(0x47E587, 'e8e451ffff', 'logical-to-visual sync after callbacks'),
|
||||
]
|
||||
|
||||
|
||||
def collect(original):
|
||||
root = Path(original)
|
||||
paths = [p for p in root.iterdir() if p.name.casefold() == 'neutron.exe']
|
||||
if len(paths) != 1:
|
||||
raise ValueError('Original EXE missing or ambiguous')
|
||||
pe = PE(paths[0])
|
||||
if hashlib.sha256(pe.data).hexdigest() != SHA256:
|
||||
raise ValueError('Unsupported EXE identity')
|
||||
result = []
|
||||
for va, expected, label in ANCHORS:
|
||||
offset = pe.offset(va - pe.base)
|
||||
raw = bytes.fromhex(expected)
|
||||
if pe.data[offset:offset + len(raw)] != raw:
|
||||
raise ValueError(f'Changed source contract at {va:#x}')
|
||||
result.append(dict(va=hex(va), file_offset=hex(offset), bytes=expected, label=label))
|
||||
return {'sha256': SHA256, 'sites': result,
|
||||
'limits': 'Static source anchors; port capsule/grounding and cadence remain provisional.'}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('original', type=Path)
|
||||
print(json.dumps(collect(parser.parse_args().original), indent=2))
|
||||
Reference in new issue
Block a user