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,36 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Summarize observed REA loader frontiers without inferring graph closure."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
ROOTS = ['0x1014c93f8', '0x1014c9618', '0x1000fa1d0', '0x1014c6aac']
|
||||
TARGET = '2cb4de127b50d54c6c5666acfef2263fae16d11a3361ad39353ecf8a66a4d9c7'
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('bundle', type=Path)
|
||||
args = parser.parse_args()
|
||||
records = json.loads(args.bundle.read_text())['records']
|
||||
records = [r for r in records if r.get('authority') == 'shipped-artifact'
|
||||
and r.get('confidence') == 'observed'
|
||||
and r.get('subject', {}).get('digest', {}).get('sha256') == TARGET]
|
||||
roots = []
|
||||
for address in ROOTS:
|
||||
selected = [r for r in records if r.get('parameters', {}).get('procedure') == address]
|
||||
calls = [r for r in selected if r['operation'] == 'procedure_callees']
|
||||
if not calls:
|
||||
raise ValueError('Missing observed call frontier for ' + address)
|
||||
record = calls[-1]
|
||||
info = [r['normalized_result'] for r in selected if r['operation'] == 'procedure_info']
|
||||
assembly = [r for r in selected if r['operation'] == 'procedure_assembly']
|
||||
roots.append({'address': address, 'direct_callees': record['normalized_result'],
|
||||
'direct_callee_count': len(record['normalized_result']),
|
||||
'evidence_id': record['evidence_id'], 'relationship_coverage': record.get('relationship_coverage'),
|
||||
'procedure': info[-1] if info else None,
|
||||
'unresolved_indirect_sites': [line for line in assembly[-1]['normalized_result'].splitlines()
|
||||
if ': blr ' in line or ': br ' in line] if assembly else None,
|
||||
'scope': 'observed immediate frontier; not transitive dependency closure'})
|
||||
output = Path('build/startup/loader-frontier.json')
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
output.write_text(json.dumps({'status': 'not-runnable', 'arm64_sha256': TARGET,
|
||||
'roots': roots}, indent=2) + '\n')
|
||||
print('PASS: observed direct call frontiers:', ', '.join(str(r['direct_callee_count']) for r in roots))
|
||||
Reference in new issue
Block a user