Main Menu

iOS userland emulator

Started by cuby, February 03, 2023, 08:21:34 AM

Previous topic - Next topic

cuby

This project was announced yesterday - an emulator for iOS 2.0 userland binaries, implementing a subset of the iOS frameworks in Rust (and including an ARM JIT compiler): https://touchhle.org

The author wanted to play Super Monkey Ball, an old iPhone game from their youth which is no longer available in the Appstore since it was a 32-bit only app. Accordingly, touchHLE currently emulates the bare minimum functionality to load and execute a Mach-O binary, libSystem and a lot of functionality related to OpenGL (ES). Fascinating!

Looking at the code, the way the author uses to implement an Objective C-like syntax using Rust macros is pretty nice.

I think this would also be a great basis for a NeXTstep userland emulation for Linux/MacOS...

cuby

First results trying to run the iOS2 Calculator.app (it crashed soon after displaying the initial window, but still...). touchHLE needed a little fix to extract the start address from the LC_UNIXTHREAD load command's pc value instead of the assumed "start" symbol, which is not guaranteed to exist.

Update: After a bit of investigation it looks like the displayed image is the Default.png in the app bundle, which is displayed by touchHLE itself, not the emulated app. Calculator.app crashes when trying to execute the first _objc_msgSend... oh well, that would have been to nice to work that easily :)

Screenshot 2023-02-04 at 00.27.42.png