iOS userland emulator

Apple, Inc. -> Apple Work Logs

Title: iOS userland emulator
Post by: cuby on February 03, 2023, 09:21:34 AM
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 (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...
Title: Re: iOS userland emulator
Post by: cuby on February 03, 2023, 05:41:57 PM
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 :)


Go to top  Forum index