Skip to content

Real Racing 3 — Apple Silicon macOS port v1.0

Choose a tag to compare

@RegorTheDodger RegorTheDodger released this 30 Nov 22:24
· 13 commits to main since this release

Real Racing 3 — Apple Silicon macOS port · v1.0

First macOS release: the real game, running natively on Apple Silicon. Download the .dmg,
drag Real Racing 3 into Applications, launch it, and point the launcher at your own
APK and com.ea.games.r3_row folder once.

No emulator and no Wine: Real Racing 3's own arm64-v8a libraries are loaded by the port's
ELF64 loader and executed by Dynarmic's native AArch64 host backend, so the guest code
runs effectively 1:1 on the CPU.


Credits

  • Original Windows PC port — @PythonnXD.
    The ELF loader, the Dynarmic guest runtime, the JNI / GLES / bionic / input shims and the
    entire Windows host layer that this build replaces come from that project. This macOS
    port is a fork of it, and the Windows build is untouched.
  • Real Racing 3 © Electronic Arts / Firemonkeys Studios. No game code, APK, or data
    pack is included or redistributed
    — you supply your own.
  • Open-source dependencies: ANGLE, Dynarmic, SDL2, libcurl, zlib, boost, rg-etc1, stb.
    This port is GPL-3.0, matching upstream's LICENSE.

Everything in this release

Native runtime

  • Apple Silicon (arm64) app bundle, macOS 13 or newer — no Rosetta, no x86 build.
  • Same port source as Windows: every macOS change is behind ifdef __APPLE__, port/compat/
    or a .mm file, so the Windows build still compiles unchanged.
  • Dynarmic JIT on its native AArch64 host backend (cpu_dynarmic.cpp).
  • ELF64 guest loader with per-library symbol resolution; verified boot of a stock 14.0.1 APK
    with unresolved=0.
  • Full bionic runtime shim: libc/libm strings, file I/O, pthread, TLS, clocks, dlopen,
    getcwd, atexit, and the Android asset/VFS layer that unpacks the APK's res/xR.zip.
  • Java side of the game served by the Firemint Java shim (JNI env, jstring/arrays,
    Activity, SharedPreferences, GLSurfaceView, GlyphVector, Canvas, Bitmap, toasts).

Graphics

  • ANGLE with the Metal backend — GLES 2/3 translated to Metal; EGL 1.5 with
    METAL_ANGLE display type (gles_bridge.cpp).
  • Dynamic resize and supersampled offscreen FBOs; render scale, MSAA, anisotropy and
    quality presets from the config/launcher.
  • Windowed, borderless and fullscreen modes (F10 cycles, F11 / Alt+Enter toggles),
    with correct display-vs-framebuffer sizing on Retina panels.
  • All four asset flavours detected at startup: Adreno .atc.dds.z, Mali .etc.dds.z,
    Xclipse/Tegra .dxt.dds.z, PowerVR .ptc.pvr.z (Adreno is the most tested).
  • Texture decoders for ETC1/ATC/DXT/PVR plus the game's own compressed GUI packs.

Text

  • CoreText behind a DirectWrite-shaped API (port/compat/dwrite_coretext.cpp):
    font creation, metrics, glyph runs, GetAlphaTextureBounds, RenderGlyphRun.
  • Fixed the "text renders as dashes" bug: DirectWrite's alpha bounds are baseline-relative,
    and the blitter now offsets by the destination baseline row instead of clipping the
    glyph to a few surviving rows.
  • Fixed renderToTexture silently writing nothing: it now builds the RGBA texture
    createTexture actually allocates (with a single-channel coverage fallback for
    luminance-only engine textures) and drains GL errors.
  • Single-line createTexture and multi-line initWithParagraph glyph layout, menu
    labels, HUD numbers and paragraph text all verified.

Audio

  • OpenSL ES implemented on CoreAudio via SDL2 (24 kHz stereo), with frame accounting
    (framesPlayed, enqueues) reported in the exit summary.

Input

  • Keyboard: W/S throttle/brake, A/D steer, C camera, V look back, Esc pause,
    F10/F11 window modes.
  • Gamepads through SDL: Xbox, DualShock 4, DualSense, Switch Pro; joystick_config.txt
    remapping, Android-TV mode.
  • Scripted guest input for reproducible testing: --tap-at-sec, --key-at-sec.

Launcher & app bundle

  • AppKit launcher (configurator_mac.mm) with explicit-frame layout: pick APK + data
    folder, extract libRealRacing3.so / libc++_shared.so / libfmodex.so, display and
    quality options, verbose logs, save import/export, "open saves folder".
  • RR3_LAUNCHER_LAYOUT_CHECK=1 prints every control with an overlap / out-of-bounds count
    (0 problems here) and can dump a PNG snapshot without showing a window.
  • mac/make_app.sh builds the Real Racing 3.app (icon, ANGLE dylibs, launcher script,
    ad-hoc signature); --portable mode keeps settings in
    ~/Library/Application Support/Real Racing 3.
  • This release ships the exact app from that build, packaged as a .dmg with an
    Applications shortcut.

Compatibility shims

  • Win32 → POSIX: virtual memory, threads/locks, timing, file and path handling, console,
    DPI, .ico icon, VEH, SEH-free error paths.
  • Winsock2 → BSD sockets; WinHTTP → libcurl; CryptSHA256 → CommonCrypto;
    WASAPI → CoreAudio; DirectWrite → CoreText.
  • Update checking works through the libcurl WinHTTP shim (--check-update); the
    Windows-only self-updater is disabled on macOS.

Data handling & validation

  • check_rr3_data.sh: verifies the APK really contains the three arm64-v8a libraries and
    res/xR.zip, that the data zip has an intact central directory, the expected .depot
    entries, and — for an extracted folder — every asset listed in the pack's own
    asset_list_base.txtCache.txt. Catches the truncated-download trap that causes the
    endless "Downloading assets" screen.
  • Per-user saves and extracted libraries, plus save import/export (character.2.dat).

Stability & correctness fixes in this release

  • jni_env.cpp: jstring UTF-16 conversion used MultiByteToWideChar and assumed a 16-bit
    wchar_t; on macOS wchar_t is 32-bit, so those buffers were overrun by 2× and corrupted
    the heap. Non-Windows builds now use an explicit UTF-8 ⇄ UTF-16 codec.
  • Bounded GL error draining on texture upload paths instead of unbounded retry loops.
  • Removed leftover font/file tracing from the bionic libc shim.

Performance (measured, 1820×1024, iPhone-class Apple silicon, ANGLE Metal)

  • Menu: 118.2 FPS average / 65.6 FPS 1% low, unresolved=0, zero GL errors.
  • In-race: 111.6 FPS average / 62.8 FPS 1% low while racing at Circuit of The Americas.
  • OpenSL audio: 1.99M frames played, no underrun reported by the game.

Verified gameplay

  • Boot from a stock 14.0.1 APK through the port's own asset check to the main menu, with
    correct UI text.
  • A real race: MOTORSPORTS → Formula 1 → F1 Exhibition → Cup → F1 Debut Car → RACE at
    Circuit of The Americas — cockpit view, live HUD (lap counter, timer, position, speed,
    gear), opponents on track, car accelerating and shifting up under throttle (89 km/h in
    2nd, 155 km/h in 3rd when driven harder), steering and barrier collision responding.

Tests

All five suites build from build_mac.sh and pass:
test_smoke, test_elf_cpu (1 skip without game data), test_bionic_vfs (4 skips without
game data), test_gles_jni, test_input_resize.
test_gles_jni includes a new regression test that renders through the real
createTexture / initWithParagraph / renderToTexture paths and asserts glyph ink lands
where the reported bounds say — both the baseline-offset bug and the silent
luminance-into-RGBA upload fail it if reintroduced.


Requirements

  • Apple Silicon Mac (arm64), macOS 13+
  • Your own Real Racing 3 14.0.1 arm64-v8a APK (international build, 105,189,283 bytes;
    .apkm/.xapk splits will not work)
  • Your own com.ea.games.r3_row data folder, completely downloaded
  • Keyboard or gamepad; ~13 GB free while the zip and its extracted folder coexist

Known limitations

  • Offline by design (online=OFF): EA's Cloudcell host no longer resolves, so online-only
    cards show the game's own "CONNECT TO THE INTERNET" dialog. Single-player racing works.
  • The app is ad-hoc signed, not notarized, so it is meant to be built/run locally; macOS
    may ask you to confirm the first launch of a downloaded copy.
  • No self-updater on macOS (check manually / rebuild).
  • The port's scripted input (--tap-at-sec, --key-at-sec) was used for all verification
    runs, so UI paths outside the ones listed above are less exercised.