Native iPhone port of Factorio 2.0.77
Run the original macOS ARM64 game code on iOS: - tools/retarget.py: header-only Mach-O retargeting to an iOS dylib - platform/native: UIKit host and macOS API shims (AppKit for SDL's Cocoa backend, CoreGraphics displays, CoreAudio device, Metal device properties, Wuffs PNG decoding, Steam and peripheral stubs) - touch, overlay, iOS keyboard and hardware keyboard input - tools/build_native.py: build, sign, install, data copy, launch - docs: build guide, controls, architecture Also includes the earlier static-translation research (ARM64 -> WASM -> native) under docs/research, runtime/, tests/ and tools/. No game files are included; the build reads them from a local install.
This commit is contained in:
commit
51d085e865
89 files changed
+7999
No files matched your search
@@ -0,0 +1,28 @@
|
||||
"""Export the observed startup frontier; never equates discovery with runnable code."""
|
||||
import json
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
bundle = json.loads(Path('evidence/factorio-functions-final.json').read_text())
|
||||
record = next(r for r in bundle['records'] if r['operation'] == 'analyze_function'
|
||||
and r['parameters']['procedure'] == '0x100161584')
|
||||
native = record['normalized_result']
|
||||
callees = []
|
||||
for callee in native['callees']:
|
||||
symbol = callee['name']
|
||||
route = 'exclude-optional-steam' if 'Steam' in symbol else 'host-abi-adapter' if symbol.startswith('imp___stubs') else 'pending-lift'
|
||||
callees.append({'address': callee['address'], 'symbol': symbol,
|
||||
'planned_route': route, 'route_authority': 'analyst planning from symbol identity'})
|
||||
indirect = [line for line in native['assembly'] if re.search(r': blr\s', line)]
|
||||
result = {'status': 'not-runnable', 'root': native['procedure']['name'],
|
||||
'root_address': '0x100161584', 'evidence_id': record['evidence_id'],
|
||||
'observed_direct_callees': len(callees), 'observed_basic_blocks': len(native['basic_blocks']),
|
||||
'observed_indirect_call_sites': indirect, 'callees': callees,
|
||||
'limitations': ['This is one observed function frontier, not a transitive closure.',
|
||||
'Hopper does not expose complete body ranges or all indirect targets.',
|
||||
'The straight-line lifter cannot yet compile this startup function.',
|
||||
'Graphical startup includes inlined Steam initialization; changing the factory alone is insufficient.']}
|
||||
out = Path('build/startup'); out.mkdir(parents=True, exist_ok=True)
|
||||
(out / 'frontier.json').write_text(json.dumps(result, indent=2) + '\n')
|
||||
print(json.dumps({key: result[key] for key in ['status', 'root_address', 'evidence_id',
|
||||
'observed_direct_callees', 'observed_basic_blocks']}, indent=2))
|
||||
Reference in new issue
Block a user