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,21 @@
|
||||
import struct
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).parents[1] / 'tools'))
|
||||
from a64_lift import Compiler, UnsupportedInstruction
|
||||
|
||||
for words, reason in [([0x14000000, 0xd65f03c0], 'loop with unreachable return'),
|
||||
([0x94000000, 0xd65f03c0], 'undeclared host call'),
|
||||
([0x91000400], 'missing return'),
|
||||
([0xd65f03c0, 0xd503201f], 'code after return'),
|
||||
([0x9a010000, 0xd65f03c0], 'unsupported carry arithmetic'),
|
||||
([0x9a810000, 0xd65f03c0], 'conditional select without defined flags'),
|
||||
([0x3cc18020, 0xd65f03c0], '128-bit load without adjacent store'),
|
||||
([0x3d800000, 0xd65f03c0], '128-bit store without adjacent load'),
|
||||
([0x14000002, 0x3cc18020, 0x3d800000, 0xd65f03c0], 'branch into middle of copy')]:
|
||||
try:
|
||||
Compiler().compile(b''.join(struct.pack('<I', word) for word in words), 0x1000)
|
||||
except UnsupportedInstruction:
|
||||
print('PASS: rejected', reason)
|
||||
else:
|
||||
raise AssertionError('Unexpected support for ' + reason)
|
||||
Reference in new issue
Block a user