Skip to content

Complete iPhone/iPad distribution and port Apple controls and graphics diagnostics - #1

Draft
AttilaTheFun wants to merge 36 commits into
mastercheese-dev:mainfrom
AttilaTheFun:apple/ios-installer
Draft

AttilaTheFun wants to merge 36 commits into
mastercheese-dev:mainfrom
AttilaTheFun:apple/ios-installer

Conversation

@AttilaTheFun

@AttilaTheFun AttilaTheFun commented Oct 12, 2026 •

Copy link
Copy Markdown

Try it on iPhone or iPad

Download the unsigned IPA and re-signing kit, then follow the re-signing/source-build guide. Build 18 uses a dynamic guest arena and does not request Extended Virtual Addressing or Increased Memory Limit. The tested signing route uses a paid developer team. Free-account AltStore installation is not verified. Supply your own Xbox ISO/XISO on first launch. The public IPA contains no personal profile or game data.

iPhone/iPad imports and Apple diagnostics on the current runtime

Ports the useful additions from my earlier Apple PR onto innerhat-dev/OpenCE main (036b9fe6). This base already includes iOS: the change completes its import/distribution path and adapts the previous controls and graphics tools while retaining the newer LLVM runtime, renderer, native menus, server browser and network protocol.

  • macOS ISO/XISO picker now retains a SHA-256-verified private image as well as extracted maps, and saves the private image path. A regression test removes the original selected ISO and verifies import data and reloaded preferences still work.

  • Universal iPhone/iPad app with Files ISO/XISO import, structural validation, SHA-256 copy verification and transactional private storage. No retail images/maps are bundled. Existing private imports and saves remain usable when the bundle ID is unchanged.

  • Touch layout, D-pad, primary hardware-controller routing, automatic touch visibility and landscape handling.

  • Shake-accessed iOS Graphics & Diagnostics menu with persisted Metal (ANGLE, default) or native OpenGL ES, render resolution, 30/60/120 FPS limit, smooth-motion interpolation and optional FPS overlay. MetalFX spatial upscaling is optional with Metal. Mac retains its separate graphics window. The old WebKit room transport remains retired.

  • Bounded ANGLE shader cache and shareable session reports containing active settings, frame-time/thermal samples, shader timings and recent logs. First-use GPU-stall capture is opt-in. Scenario-script music cues respect the console filter and stay in debug.txt instead of appearing during normal play.

  • Restore the iOS platform imports/DTLS build and retain a separately signed instruction image. Allocate an OS-selected aligned guest arena with matching compiler/import/GL translation, without special memory entitlements. Standalone iPhone 15 Pro startup passed; LiveContainer remains unverified. See memory-layout design and attribution.

  • IPA packaging/re-signing tools with explicit profile checks. Repository bundle IDs remain unchanged; builders supply their own with --bundle-id.

  • Mouse sensitivity 1–100, default 20; preserve existing multiplier units. Fix duplicate [display] sections that made newly generated configuration invalid on relaunch.

  • Update public-game discovery to upstream network protocol 29, bundle the missing iOS broker defaults, recover broker connections after resume, and rank joinable servers by population before limiting results. Include the upstream map-transfer and join-admission dependencies while retaining Apple transport fixes.

Attribution and lineage

This builds on innerhat-dev/OpenCE main, retaining its Apple runtime and current networking. The carried additions originate in AttilaTheFun/halo-ce-universal, former apple/ios-web-multiplayer, previously OpenCommunityEdition/OpenCE PR #64.

Earlier foundations deserve credit: NicholasDominici/halo-ce-ios, ios-port for the iOS port, and fqlx/halo-ce-universal, fqlx/browser-webgl-stream-batching, PR #12, for the earlier browser/network foundation. Shared decompilation lineage comes through OpenCommunityEdition/OpenCE and bnunu/halo-1.

The protocol-28 integration selectively adopts OpenCommunityEdition/OpenCE networking work, with source commits, decisions and validation recorded in the network review.

Browser visibility and landscape correction

Fixed an invalid map-sharing menu platform attribute that caused the whole updated menu set to fall back to the Xbox menus. The browser is now visually verified in the iPhone simulator, showing 35 public servers in population order. Updated XML validation catches this failure. Removed the scene lock to permit rotation between the two supported landscape orientations; simulator orientation and background/resume checks pass. Physical-device rotation still needs a retest.

Validation and draft limits

Current networking checks: exact upstream protocol-29 wire manifest; iOS simulator and device builds; population-ranking and menu checks; map-transfer/cache regression cases, with the 32-bit geometry overflow negative control separately run through the ILP32 compiler/runtime. The iOS simulator discovered and joined the populated public HALO UNIVERSAL game on Wizard and exchanged gameplay updates. This was a short join test, not a full match, Custom Edition transfer, or physical-iOS networking test. Protocol-29 changes, upstream attribution and validation.

The preceding protocol-28 integration also built the native Mac app and joined a public game; that historical Mac test is not presented as validation of the new version-29 build.

Passed: native Mac, simulator and signed device builds; signed-image ABI probe; 16 importer safety tests under ASan/UBSan; menu XML/capacity validation; fresh config parse/save/relaunch test. A private retail ISO imported successfully in the iPad simulator; main menu, first-mission startup and graphics modal rendered. Mac menu rendering and MetalFX initialization also passed smoke tests.

The broad inherited fixture run reproduces the same 5 failures, 7 errors and 1 skip on pristine 036b9fe6; these are documented, not suppressed. See migration decisions and validation and iOS build/re-signing instructions.

Physical iPhone 15 Pro launch has passed, and the owner reports playable Silent Cartographer with a Backbone controller, approximately 110 FPS at native resolution with occasional area-loading drops to 50–60 FPS. These are user observations, not a controlled benchmark. Simulator checks covered both Metal and native OpenGL menu rendering, resolution selection, the shake handler, FPS overlay and session-report generation.

Still draft pending broader physical iPad/gameplay coverage, controller reconnect, background/resume, physical-device MetalFX output validation and a full online match against a compatible current web build. This does not claim compatibility with older deployed PR OpenCommunityEdition#12 clients.

Branch scope

innerhat-dev:main → AttilaTheFun:apple/ios-installer → AttilaTheFun:apple/ios-internal.

This PR contains the reusable functionality and preserves upstream app names, icons and bundle-ID defaults. Personal distribution branding and identifier overrides live only on the downstream apple/ios-internal branch, which is not proposed for merging.

Adapt the earlier Apple contributions while preserving upstream branding and defaults. Includes private game imports, iPhone/iPad controls, graphics diagnostics, simulator ABI support, IPA tooling and settings fixes. Attribution and validation are recorded in docs/apple-ios-migration.md.
@AttilaTheFun
AttilaTheFun marked this pull request as ready for review October 13, 2026 00:22
@AttilaTheFun

Copy link
Copy Markdown
Author

image

About 110fps on iPhone 15 Pro at native resolution.

bmanturner and others added 18 commits October 12, 2026 22:07
When the process is suspended (a phone app in the background) or the
machine sleeps (a laptop), the p2p thread's wait lasts far longer than it
asked for. The NAT's mapping of the tunnel may have lapsed and the brokers'
TCP connections may be gone, but nothing notices until each one's silence
timeout, so joins and listings fail for a while after the game resumes.

When a wait lasts longer than its length plus PEER_TIMEOUT, the thread now
discards what the sockets reported, asks the STUN servers for the public
address again, and has every broker close and connect again at once
(p2p_signal_reconnect). A wait of normal length changes nothing.

Nothing sent over the network changes, so HALO_PORT_NETWORK_VERSION stays.

Checked: the Android guest and the web build compile with no new warnings.
The same change, together with an iOS host fix for the sockets iOS takes
from a suspended app, made server browser joins work on an iPad Pro after
about five minutes in the background (they failed until a relaunch
without both). Not run on Linux, Windows or Android.

(cherry picked from commit 0a5a235)
Hosts send players who join without the game's Custom Edition map the map
and the resource maps it needs; the other players help, torrent-style.
Network version 27: new map sharing messages, and players of an internet
game now reach each other.
… still downloading it.

(cherry picked from commit 71ceb36)
Campaign scripts only name two players, so a large group was left on the beach when Truth and Reconciliation's grav lift switched into the ship.

(cherry picked from commit d6df944)
… type chooses the sky.

(cherry picked from commit b71bd6a)
Network version 28: the host now holds a downloading machine's players out
of the game, and keeps a multiplayer map's first scripted BSP. Dynamic lights
and the flashlight stay on past the Xbox limits, and a second weapon picked
up while firing is readied. Machines of version 27 would disagree on these.

- A large co-op game's respawn fallback no longer picks a teammate who is in
  the air, outside the BSP, or riding an AI vehicle.
- A machine still downloading the map times out when it goes silent.
- Held players join through the late-join queue, so they get the same checks.
  A machine with no held players is started instead of being refused.
- The co-op teleport uses world positions, which are right for seated players.
- Overshield drain no longer cuts off a hit's flash, and hits over 0.02 flash.
- The menu XML is the generator's (Custom Edition's layout) again.
- port: markers on two new declarations.

Checked: ninja linux, android and web build; tools/harness,
test_touch_menu and test_web_build pass.

(cherry picked from commit 5a7c655)
@AttilaTheFun

Copy link
Copy Markdown
Author

Following up on the feedback from the original OpenCommunityEdition/OpenCE PR #64, now that the Apple work is based on this fork.

@UEMxMDE — thank you for the detailed gameplay/input report. I checked all six points against the current code:

  • Split-screen: this base has multiplayer lobby Add Player / controller Start joining, plus Co-op Campaign. The menu-loading regression that hid the updated menus is fixed. I also fixed an iOS routing bug where the desktop single-controller rule could move the touch controller out of player one's slot.
  • Touch plus a physical controller: added Touch as a separate player in the shake settings. Enable it and relaunch: touch stays visible on player one, and hardware controllers get separate slots. Use Add Player in the lobby, then select the additional player's profile with their controller. The default still hides touch when a controller connects and shares player one, preserving the owner's requested behavior.
  • LIGHT / SWAP G: already corrected in the migrated controls. With default bindings, LIGHT maps to left shoulder / Xbox white / flashlight, and SWAP G maps to right shoulder / Xbox black / grenade switching.
  • Movement while navigating pause: already fixed by this fork's upstream 129d3483. Gameplay input is suppressed for the player whose controller owns the menu; the online match itself continues. That fix is retained and credited to upstream.
  • Custom Edition: partially covered by the current protocol-28 community-map transfer/download work. An iOS standalone CE import/switcher and full CE-map interoperability testing remain open; I am not claiming arbitrary Xbox and CE content can share a match.
  • Customizable layouts/remapping: a full drag/remap/add/remove editor and named layout presets remain feature follow-ups. The new routing setting does not close that request.

@cybersecurity — regarding the Apple CI/testing concern, this contribution is now against the Apple-maintained innerhat fork, which already has macOS workflows. It requests no runner/workflow changes in the original repository. This does not remove Apple runner costs or ask you to take on Apple-device testing.

The new changes are in 811cbb42. Validation: signed iOS device build passed; five focused routing, browser-ordering and menu checks passed. Routing tests exercise production functions with ASan/UBSan, including separate-player isolation, reconnect, bounded enumeration and modal input suppression. Physical split-screen/controller gameplay still needs testing; no phone/tablet was installed or launched during this review.

Full disposition and validation record. The larger feature requests above remain explicitly open rather than being presented as fixed.

@UEMxMDE

UEMxMDE commented Oct 13, 2026

Copy link
Copy Markdown

I just tested this app in LiveContainer (I downloaded it from here: https://github.com/AttilaTheFun/halo-ce-universal/releases/tag/apple-ios-pr1-20261012). I enabled "Fix File Picker" before booting it up for the first time. Here is what happened:

  • I opened the app and tapped on "Choose Halo ISO"
  • I chose the same .xiso.iso I have been using to test iOS ports
  • I see loading bars that say the app is importing stuff
  • I get an error that says:

Halo OG could not start
Cannot initialize game memory. See save/halo.log for the failed memory reservation or image load.
OK button

Here is save/halo.log after getting this error for the first time: halo.log

Here is save/halo.log after opening the app multiple times after the first time: halo.log

Also once the app is opened more than the first time, the "OK" button becomes untappable. The entire error window quickly shrinks to nothing when I open the app and the "OK" button is kind of cut off. When I tap the "OK" button or anywhere else on the screen, nothing happens.

These issues are not fixed by closing and reopening the app or by deleting and reinstalling the app.

I tested this on an iPhone 17 Pro Max on iOS 26.0.

@AttilaTheFun

Copy link
Copy Markdown
Author

@UEMxMDE Thanks for both logs. They report the same failure: Guest arena reservation: (os/kern) invalid address. The import completed, but iOS rejected the runtime's fixed virtual-memory range before the game image started. Re-importing the ISO will not fix that, and the logs do not suggest a bad ISO.

This runtime requires Extended Virtual Addressing in the process actually running the game. LiveContainer documents that guest entitlements are not applied to its host, so granting it to the Halo guest does not establish that the host has it. “Fix File Picker” only addresses the picker. The error is consistent with a missing host capability or incompatible address-space layout; these two logs alone cannot distinguish them. I cannot yet claim LiveContainer support, even with an entitled host.

I pushed 38b21174 to address the app-side failure handling:

  • Check the required memory reservation before asking you to import a large ISO.
  • Log the requested address, size and kernel result.
  • Replace the shrinking SDL alert with a dedicated scrollable UIKit screen, with Copy details and Close buttons outside the text area. Existing imported data and saves are preserved.

Updated unsigned IPA and signing kit (public build 16). This improves diagnostics/error handling; it does not bypass the memory capability or establish LiveContainer compatibility. The tested signing route remains a standalone app with a provisioning profile that grants Extended Virtual Addressing, as described in the guide.

Validation: device build and re-signing/signature/entitlement checks passed. A forced-error iPhone simulator test exercised Copy details and Close across three launches with orientation changes; ordinary startup still loaded the guest and menus. I have not reproduced your exact LiveContainer/iPhone 17 Pro Max setup. If you can try standalone signing and it still fails, the new halo.log will give us the address/size and kernel code needed for the next investigation. Please don't upload provisioning profiles or signing keys.

@UEMxMDE

UEMxMDE commented Oct 14, 2026

Copy link
Copy Markdown

I just downloaded and tested your new ipa and the "extended virtual addressing" is an issue for me. I like that the error in the updated ipa is more descriptive of what I am missing to get the app to work. Previously I used an app called GetMoreRam (which can be found here: https://github.com/hugeBlack/GetMoreRam) to add the "Increased Memory Limit" entitlement to LiveContainer (I did this a long time ago and the entitlement is still there), but now to run your app I also need extended virtual addressing (by the way, extended virtual addressing was not a requirement to test other iOS Halo ports that I tried, I am not sure why it is a requirement now).

I found an app called iRAM+ (which can be found here: https://github.com/NexSideloading/iRAM-Plus) that says it can provide both the "Increased Memory Limit" and "extended virtual addressing" entitlement to any sideloaded app, but this app is experiencing an error called the "-80045" error. According to r/altstore right now, this error is happening to AltStore and Sidestore as well due to issues caused by Apple themselves, which means I can't actually test your app until Apple/sideloading developers resolve this issue.

@AttilaTheFun

Copy link
Copy Markdown
Author

@UEMxMDE I investigated why the other iOS port could run without Extended Virtual Addressing. NicholasDominici's ios-port uses an OS-selected aligned arena; our previous runtime hardcoded 448 GiB. I replaced that fixed-address dependency in the allocator, compiler lowering, import stubs and GL pointer arguments.

New unsigned IPA and signing kit: public build 17. It no longer requests Extended Virtual Addressing or Increased Memory Limit. Please use this new IPA; re-signing build 16 with an empty entitlement file cannot change its compiled memory layout.

I installed and launched the same runtime standalone on an iPhone 15 Pro/iOS 27.0.1, with both memory entitlements verified absent from the app signature. It loaded all imports and reached the main menu with Metal/MetalFX. The signed-code tests also run the same machine code at three different arena addresses.

Your iOS 26/LiveContainer combination is still unverified. Our test phone's OS selected 448 GiB, so this does not prove that every earlier OS/container has an available aligned region, or resolve the provisioning-service error you reported. When your signing tools work again, please try build 17 and share save/halo.log if it still fails. Existing imports and saves should be retained when updating with the same container/identifier.

Design, attribution and test limits. Physical gameplay/performance comparison remains to be done; the device check so far establishes startup.

cybersecurity and others added 5 commits October 14, 2026 11:37
(cherry picked from commit 37ded32)
A game's level name is the map's own (custom_maps\hugeass), so no screen or
server browser listing shows a hash, and the game record's map version is
the map's hash's first 32 bits, which a client finds its file by. Maps are
no longer renamed; a download beside another version of its name is named
<name>_<hash>.map and listed as "(2)"; maps the last build renamed get
their names back. Network version 29: the level name and the map version
mean something else.

(cherry picked from commit 3e0ba55)
@AttilaTheFun

Copy link
Copy Markdown
Author

@UEMxMDE The latest version is ready to try: public build 18 — unsigned IPA and re-signing kit.

It includes:

  • Dynamic memory allocation instead of the old fixed address, removing our Extended Virtual Addressing requirement. Neither that entitlement nor Increased Memory Limit is requested.
  • The readable startup error screen with working Copy details/Close buttons.
  • Updated protocol-29 multiplayer compatibility and upstream map-download/restart fixes, so it can discover and join current servers.

The memory change launched successfully standalone on my iPhone 15 Pro without either memory entitlement. The latest protocol-29 runtime also joined a populated live server in the simulator. Your iOS 26/LiveContainer setup is still unverified, so I'd appreciate another try when your sideloading tools allow it. Download the new IPA itself; re-signing an older build won't update its memory layout.

If it still fails, please attach the new save/halo.log and let me know whether you used LiveContainer or a standalone installation. Thanks for helping test this!

@UEMxMDE

UEMxMDE commented Oct 14, 2026 •

Copy link
Copy Markdown

I tried the new build and I'm still getting the same error: halo.log

@AttilaTheFun

Copy link
Copy Markdown
Author

@UEMxMDE Thanks for the log. It contains the old fixed-address diagnostic (Guest arena reservation at 0x7000000000) and “The running process needs Extended Virtual Addressing” instructions. I checked the release IPA: those strings are absent from build 18, whose startup error explicitly says it does not require that entitlement.

This suggests an older installed copy is still launching, or an older log was exported. It does not yet establish whether the updated runtime works in your LiveContainer setup.

Please use the direct build 18 IPA download, confirm the imported app is 0.2.0, build 18, then fully close/reopen LiveContainer and launch the updated entry. Preserve your game data and saves; there is no need to delete them or re-import the ISO.

The unsigned download's SHA-256 is 52efc8c3d73637e577da597ebe90385835d5a99fa32df07bd636ea539a24b932 (before re-signing/container modifications).

If it still fails, please attach a freshly exported log from that entry after the failed launch, the error-screen screenshot, and the installed build number if available. Please also confirm whether this attempt uses LiveContainer or a standalone installation. Your iOS 26/LiveContainer combination remains unverified.

@UEMxMDE

UEMxMDE commented Oct 15, 2026

Copy link
Copy Markdown

I just tried that direct download and it worked! Thank you for that, when I saw the log again it was my mistake. The app successfully imported the game. I will do some more testing when I can.

@UEMxMDE

UEMxMDE commented Oct 18, 2026

Copy link
Copy Markdown

I just did more testing on the latest version:

  • I am struggling to figure out what you mean by "shake settings" so that I can have touch controls and physical controller as separate players. Because of this I also can't test split screen. Pressing "Add player" on the lobby does nothing, regardless of whether I am pressing it using touch controls or a physical controller.
  • I also get stuttering in this build in the same way that I get stuttering on my PC for the Windows build, but I have found stuttering on this build to be less intense than on my Windows copy of OpenCE. For both platforms I noticed that stuttering usually happens when I load a map for the first time, and it goes away the more I explore the same map and the more times I load into the same map. On an unrelated note, when testing stuttering on "Coldsnap 20th Xl Rc5", I eventually got rid of most of the stuttering by doing what I said above (exploring the map for the first time, loading into the map multiple times) I got lots of graphics popping issues when flying in the main large area.
  • This is a tiny thing and not an issue/problem at all, but it's something I noticed anyways: On the Multiplayer menu, there are 4 options under Create Game (internet, LAN, CO-OP campaign, and Edit Gametypes). On the Windows build, the horizontal line is above the Edit Gametypes button while on this build the horizontal line is below the Edit Gametypes button.

I also have some suggestions:

  • The upstream OpenCE now has mod support, so my suggestion is to pull that from upstream to this iOS build.
  • I talked about this in the OpenCE PR that was closed by cybersecurity: An on-screen button to hide or show the touch screen controls. NicholasDominici's iOS build already has this button.
  • The Windows build has the ability to open and use the terminal. I don't know if this is possible in this iOS build and I would like to see it implemented if it isn't already.

@AttilaTheFun
AttilaTheFun marked this pull request as draft October 21, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants