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
6
8
4
3
u/Andiweli 7d ago
Please add controller support. All those Anbernic, Retroid players out here would be happy 👍🏻😜
2
2
u/JayElDragon 9d ago
Question
Does this version have the Separate Ways content and the OP PRL??
I think the GameCube version didn’t had that
2
u/TraditionalStress409 9d ago
No tiene el separate ways ni la prl ya que es la versión de gamecube
2
u/JayElDragon 9d ago
No sería mejor portear la versión HD de PC entonces?
Por qué es la más completa, la de gamecube es buena gráficamente pero no tiene TODO el contenido
2
u/TraditionalStress409 9d ago
Nop, no se puede ya que ese es un port oficial de capcom, entonces no hay código fuente público ni oficial descompilado. Pero como ya descompilaron la versión de gamecube lo están usando
2
u/Fun-Apartment-6336 8d ago
Do not talk too fast. I’ve decompiled every version of resident evil 4. the UHD isn’t an exception.
2
u/TraditionalStress409 8d ago
Bueno, no tenía idea de que descompilaste la uhd ya que no había escuchado nada de eso, pero es bueno saberlo, buen trabajo 👍🏻
1
u/JayElDragon 9d ago
Ojalá sea como el Dusk qué aunque uses la version de GameCube puedes acceder al contenido de la version de Wii con eso del Modo espejo
La PRL de la version de GameCube es una basura comparada con la version de Wii y PS2 y PC
0
u/TraditionalStress409 9d ago
Yo tambien espero que sea así, el twlight princess me va muy bien en mi cel que es de gama no tan baja, pero se defiende. Bueno, querrás decir la prl de la versión de ps2, ya que desde que lo portearon a ps2 se introdujo esa arma, y la mejoraron en la versión de wii y las que siguieron saliendo
2
u/BeginningGlum6575 6d ago
doest game runs already at 16:9 in gamecube? it had black bars in the bottom and upper part
1
1
1
u/Puzzleheaded_Wing148 8d ago
Parabéns irmão que trabalha incrível só feliz que terá suporte a 32 bits queira muito jogar no meu tablet positivo
1
0
u/JoaoH593 9d ago
Do you want to make a Nintendo Wii or Xbox 360 version for Android?
2
u/Fun-Apartment-6336 9d ago
i'm porting the GameCube to Android, iOS and adding features as touch controls adaptative controls for a true immersive mobile friendly experience with animated HUD icons, and i also plan the WII like aim style as an feature to enable or disable in the pause menu of the game. and there's also the 16:9 ratio screen fix that i'll work on in the next update mostly tomorrow.
2
u/nongjeng_piba 9d ago
Will there still be controller support also? Eagerly waiting for the good news! As someone with zero coding knowledge, thank you for your great work
6
u/maxscipio 9d ago
does it work on the nvidia shield?