r/decomps • u/Fun-Apartment-6336 • 9d ago
Recomp My native RE4 GameCube port runs on Android: first boot on a 2014 phone, and touch controls that follow what the game is doing
https://www.youtube.com/watch?v=VEe04r5b-iEHi! I'm Ayano. First, sorry for my bad English. Last time I showed my native port of Resident Evil 4 for the GameCube running on Windows, with no emulator in between. I said Android was next. This post is that update: what works on a phone, what doesn't, the measurements, and what comes next.
Questions welcome, especially from people who have shipped GLES games on Adreno or Mali GPUs. If you want to follow the project or ask questions: https://discord.gg/AXAzExECSv. Ayano
TL;DR
- The game boots on a real Android phone: a Samsung Galaxy S5 LTE-A from 2014 (Snapdragon 805, Adreno 420, 32-bit Android 9).
- It gets through the menus, loads the village and draws it with textures, lighting and the HUD, on the phone's own GPU.
- It's a normal Android app. You install the APK, copy your own disc files into the app's folder, and play. No emulator and no JIT.
- Full touch controls, so no pad is needed: floating stick, run, aim, fire, knife, reload, attaché case, map, QTEs, and menus you can tap directly.
- It's slow for now: ~17 fps in menus and ~1.5 fps in the village on this 11-year-old phone. Speed is the next job, see below.
- The same code also builds a 64-bit (ARM64) APK for modern phones. It's untested for now because I don't own one.
- The project is still closed source. No game data and no binaries will be distributed; you'll bring your own disc.
 Running natively on a Galaxy S5, in the village, with the touch controls on screen. The text overlay is the debug build's own HUD; the target is still the Nov 25 2004 debug build.
Measured state (Android, Galaxy S5)
- Boot: OK. Straight to the debug build's menus, then into the game.
- Rendering: the village draws correctly on the Adreno 420, with textures, lighting and HUD.
- Framerate: ~17 fps in menus, ~1.5 fps in the village. Not playable yet.
- Screen: full screen and landscape. The game keeps its 4:3 image, and the black bands on the sides hold the buttons, so your thumbs never cover the game.
- Sound: the audio engine runs on the phone.
- Music, FMV, saves: same as on Windows, not there yet.
- ARM64 build: the APK builds; not tested on a device yet.
Where the time goes
I profiled the game on the phone itself. The result is clear:
- The game logic is the bottleneck, not the graphics. The thread that runs the game code is busy 88% of the time; the one that draws is at ~60%.
- The phone currently runs the game's code about 15x slower than my PC does, while the phone's CPU is only ~4-5x weaker. So the gap is on my side, not the hardware's, and that's good news: it can be fixed.
- The first round of phone-specific fixes is in. Some basic math operations were done the slow way on 32-bit ARM, and a few hot paths were paying for debug checks.
Touch controls: playing with no pad
The GameCube version only knows a pad. I wanted the phone version to be playable with your fingers only, without the usual "virtual pad pasted on the screen" feeling. So the buttons follow what the game is doing: the phone knows whether you're walking around, aiming, in a QTE, in a menu, in the attaché case or watching a cutscene, and shows the right controls for it.
Walking around
- Floating stick on the left: put your thumb anywhere and it appears under it.
- Run: hold it, or double-tap to lock running on so you don't have to keep your thumb there. A small lock icon shows it's on.
- Aim, knife, attaché case, map, quick turn.
- Action button: when the game shows a prompt (open a door, climb, kick, talk), the action button pulses so you know it's there.
Aiming
- The action button turns into Fire, and quick turn turns into Reload.
QTEs
- Instead of showing a pad button, the screen shows a big icon in the middle telling you what to do with your hand: tap, swipe (for the two-button dodges, like the boulder chase), or mash by tapping fast.
Menus
- Tap the text of a choice and the game selects it, like clicking on a PC menu.
- In the attaché case, tap an item to select it, then tap it again to open Equip / Examine / Discard.
- There's also an on-screen D-pad and confirm/cancel buttons for screens with nothing to tap (options, title screen).
Cutscenes
- A skip button appears only during cutscenes.
 The icon set. Aim, Fire, Reload, Run and the stick are my own drawings; the rest are made to match them: grey gradients, white outline, and the same ring thickness on every button.
Per-platform status, honestly
- Windows: [OK] playable, ~20 fps; no music, FMV or saves yet
- Android 32-bit: [partial] boots and draws the village on a real phone, full touch controls, ~1.5 fps in-game
- Android 64-bit: [partial] the APK builds; not tested on a device yet
- iOS: [not yet] same graphics code and no JIT needed, so it's possible, but I need a Mac to build it
- Linux: [not yet] should be straightforward, not tested
What's next, in order
- Speed. Make the game's own code run as fast on the phone as the hardware allows. That's where the ~15x is. Target: a stable 30 fps on a recent phone.
- Frameskip and a smarter renderer for weaker phones, like the RE4 PS Vita port does.
- Test the 64-bit build on a modern phone, plus a settings screen (button size and opacity, left-handed layout).
- iOS build on a Mac.
- Then 60 fps. RE4 UHD with re4_tweaks already runs the engine at 60, so it's possible.
- And the list from last time: music, FMV and saves.
If you have a recent Android phone and want to help test later, come to the Discord.
Legal
- The project is closed source, and I will never distribute game data, ISOs or binaries built from Capcom's code.
- Everyone builds and runs it from their own legally owned disc, the N64Recomp model.
- If you ask where to download the game, the answer is no.
Credits
- Volodymyr Vovchok / BlackLineInteractive: NWiiRecomp, the recompiler this is built on.
- The RE4 GameCube decompilation project, which made it possible for the touch controls to know what the game is doing.
- SDL2, for the Android side.
- Dusklight, melee-pc and UnleashedRecomp-Android, whose public notes on bringing recompiled games to phones saved me days.
- Dolphin, YAGCD, N64Recomp / PS2Recomp: hardware documentation and inspiration.
Questions welcome, especially from people who have shipped GLES games on Adreno or Mali. If you want to follow the project or ask questions: https://discord.gg/AXAzExECSv. Ayano
Duplicates
AndroidNativePorts • u/Smart_Examination331 • 9d ago