FFFF GitHub - dmikey/cara: squeezing more juice - fast accurate 3ds emulation for mobile devices · GitHub
[go: up one dir, main page]

Skip to content
dmikeyPublic

About

squeezing more juice - fast accurate 3ds emulation for mobile devices

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

248 Commits

Folders and files

Repository files navigation

Cara

Build License: GPL v2 or later

Cara Cara orange icon

A new Nintendo 3DS emulator core for Apple hardware.

Our goal is the smoothest 3DS experience on Apple hardware without CPU JIT. Cara brings a performance-first approach to emulation on iPhone and iPad: custom GPU rendering, efficient memory use, and gameplay without CPU JIT. Open source, with a native shell of its own and a reusable core designed for Delta integration.

Performance you can measure

In a recorded Xenoblade Chronicles 3D opening replay on an M4 iPad, Cara reached 99.5% emulation speed using 758 MiB peak sampled memory—about 40–45% less memory than the two Azahar-based apps in the same comparison.

Build Emulation speed Peak sampled memory
Cara GLES3 99.5% 758 MiB
Manic / Azahar 97.4% 1,373 MiB
Azahar / MoltenVK 84.6% 1,261 MiB

All three completed the opening replay at native resolution, with sound enabled, CPU JIT disabled, and 100% guest CPU clock. This is a whole-app comparison of one scene; performance and compatibility vary by game. See the full results, build revision, and methodology.

What makes Cara different

Focus The Cara approach
Built for Apple hardware Custom GPU rendering and native presentation for iPhone and iPad.
More work on the GPU GPU vertex processing and packed-data decoding reduce work on the CPU.
Less repeated work Prepared-input reuse and fewer CPU/GPU transfers target the costs that slow gameplay down.
Memory-conscious design Bounded graphics caches and data reuse keep memory efficiency central to performance tuning.
Play without CPU JIT Cara extends Azahar FastInterp with static arithmetic fast paths, decoded-block caching and execution-budget fixes inside the signed app.
A core and a shell A reusable core developed for Delta integration, alongside Cara’s standalone iOS app.

From Android performance work to Apple hardware

Citra MMJ, weihuoya’s performance-focused Android fork, gave Cara a mobile rendering foundation to build on. We carry that work forward in three key areas:

  • Mobile GPU rendering. MMJ’s OpenGL ES rendering path is the starting point for Cara’s Apple-focused graphics engine. Cara adds custom GPU vertex processing, packed-data decoding, and native screen presentation.
  • Shader generation and reuse. MMJ generates and reuses GPU shaders and programs to avoid repeated compilation. Cara adapts that shader foundation for Apple GPUs and extends it with its own rendering enhancements.
  • Graphics data reuse. MMJ’s texture and render-target caching provides the foundation for reusing graphics resources. Cara takes that focus further with prepared-input reuse, bounded graphics caches, and fewer CPU/GPU transfers.

Azahar FastInterp supplies the interpreter foundation. Cara extends it with static arithmetic fast paths, faster instruction-timing lookup, and an eight-way decoded-block cache on iOS. Cara also fixes decode-record reuse and execution budgets across chained blocks. Guest CPU instructions remain interpreted inside the signed app, without runtime CPU code generation.

Cara combines these execution changes with its Apple graphics pipeline, bounded memory and upload caches, a reusable core, and its own native shell.

Going to Vulkan was never the answer

Cara’s progress has come from understanding more of the machine: how the guest CPU produces graphics commands, who owns each byte of shared memory, when work becomes visible, and how the host presents it. Changing the graphics API alone would leave that machinery to solve. Metal remains a future direction; the current work makes the engine underneath it better.

The GLES3 results above demonstrate what this approach can deliver. They compare whole applications, so they do not isolate the performance of one graphics API. The stronger evidence comes from changing one mechanism at a time:

Finding What changed or what we learned
Keep graphics data on the GPU GPU alias remapping lets compatible surfaces share GPU-resident data while preserving guest-visible bytes. A matched Luigi laboratory replay fell from roughly 24.5 to 16.7 ms per refresh, eliminating six downloads per refresh with matching final pixels. Results
Preserve memory ownership Targeted cache cleanup and alias invalidation preserve coherence without flushing unrelated dirty surfaces. Partial writes, overlapping views and CPU reads need explicit correctness checks. Residency research
Fix host pacing Bounded pacing recovered near-full speed in a matched Xenoblade replay while preserving guest event timing, draw counts and final pixels. Results
Follow the guest’s work Stories traces distinguish command submission, draw work, completion events and display refresh. Offline instruction inspection identified copying, visibility tests and a tick-poll pacing loop; their execution counts alone do not establish CPU cost or justify skipping them. Trace findings
Measure the waiting work A bounded Stories probe measured about 0.69 ms of instrumented CPU time per sampled refresh in the fine polling episode, including conversions and its tick query. It does not explain the whole slowdown; observer overhead remains in the figure and outside-interpreter scheduler cost is still unmeasured. Findings
Keep experiments accountable Staging only shader-used inputs removed 14% of configured input registers in a Stories comparison, but interleaved data kept payload bytes unchanged and there was no measured speed gain. The option stays off. Results

These research results describe the development builds recorded in each report. The target is full speed at 100% guest CPU with sound and no CPU JIT. Some Stories scenes still fall short. Underclocking can help playability, but it also changes how much work the guest produces; it cannot establish a full-clock gain. Hardware diagrams and register research guide the investigation, while matched checkpoints, memory-coherence fixtures and pixel comparisons test each change.

Explore the architecture, hardware evidence, and research references.

Made for playing

  • Your games, through Files. Open extracted game files from the file browser.
  • Your controls. Touch controls and customizable Delta-compatible skins.
  • Your progress. Per-game save-state slots and in-game save syncing through a selected iCloud Drive folder.
  • Your experience. GPU-accelerated graphics, native stereo audio, and an optional adaptive guest CPU clock for demanding scenes.

The standalone Cara app is the playable build provided here. Delta core integration is a development target.

Open source, built in the open

Cara is licensed under GPL-2.0-or-later. Emulator and dependency source is bundled in the repository, with build tools and validation guides included.

Build Cara · Performance · Architecture · Save states · Validation

Build and contribute

Start with the build guide. Reports should include the Cara revision, device, iOS version, game region, settings and steps to reproduce. For performance work, include comparable runs and correctness checks. See validation and existing issues.

Game ROMs, Nintendo firmware and keys are not included. Cara is not affiliated with Nintendo.

Credits

Cara builds on the work of the Citra Emulator Project, weihuoya’s Citra MMJ, and Azahar, including warmenhoven’s FastInterp. Save-state support builds on original Citra work by Hamish Milne and other contributors.

Development inspection uses Capstone by Nguyen Anh Quynh and contributors. Research also draws on fearkov’s 3dsrecomp and Zakuro. See inspection tool credits for usage and revisions.

Our research also learns from Dolphin, PPSSPP, Panda3DS, Mikage, and V8’s interpreter work, alongside DMP, 3dbrew, GBATEK and community hardware tests. The research reference guide credits their contributions and links the source reviews separately from Cara’s inherited code.

Upstream copyright notices and third-party licenses are preserved. See NOTICE, LICENSE, and source provenance.

About

squeezing more juice - fast accurate 3ds emulation for mobile devices

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0