Repository navigation
Releases
The Familia v0.2.8 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds. No game files are included: you need your own copy (see the README).
Two downloads
| Download | For |
|---|---|
the_familia.zip |
Start here on any device. Profile-guided (PGO) build, trained on an H700: about 10% faster there. |
the_familia-nopgo.zip |
The same code without the H700 profile, for testing on faster handhelds (RK3566/RK3568 and up), where the H700-trained layout may not help. |
Both have the same features and use the same saves and settings; extract either one over your install to switch. See Which download.
What's new in 0.2.8
- Collision tests: the game's line tests run as native ARM code. Every AI sight check, camera wall check, bullet and car probe goes through them. Checked against the original code until they give identical results.
- Free Ride with maximum traffic on the H700: about 27 FPS standing. The night chase in mission 1 runs at about 26 FPS, as in 0.2.7.
Everything else is as in 0.2.7.
Updating: extract over your install. Your saves and settings in conf/ are kept.
The Familia v0.2.7 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds. No game files are included: you need your own copy (see the README).
What's new in 0.2.7: faster night scenes
At night every car's headlights and every street lamp is projected onto the road and the buildings around it, and the game picks the nearby lights for every object. Both now cost far less:
- The projected lights' clipping and geometry run as native ARM code, checked against the original code until they give identical results.
- Picking each object's lights from the hundreds in a night street is cheaper; the lighting result is the same.
- A small change from 0.2.5 that turned out to cost more than it saved is removed.
Measured on an H700 (RG40XX H):
- Night chase in the first mission: about 23 → 26 FPS; the game's own work per frame went from 38.7 to 33.0 ms.
- Free Ride with maximum traffic: about 1 FPS faster as well.
Everything else is as in 0.2.6.
Updating: extract over your install. Your saves and settings in conf/ are kept.
The Familia v0.2.6 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds. No game files are included: you need your own copy (see the README).
What's new in 0.2.6: about 100 MB less memory
- Texture copies freed:
- Like Direct3D, the port kept a CPU copy of every texture next to the GPU's.
- These copies are now dropped once a texture is in use; in the city that frees about 110 MB at 32-bit textures.
- If the game ever needs one again, it is read back from the GPU unchanged.
- Memory returned at every loading screen: what the previous location freed goes back to the system.
- Read-ahead per location:
- The port remembers the game data each location reads, separately for every location behind a loading screen.
- When a location loads, only its data is read ahead, not that of the whole game.
- Car reflections computed faster: single precision with NEON, as the game did on Windows; any difference is less than a pixel.
In Free Ride the game now uses 238 MB of memory instead of 344 MB, at the same speed (about 29 FPS standing in maximum traffic on the H700).
The read-ahead learns each location again after updating, so the first visit to each location after the update has no read-ahead.
Everything else is as in 0.2.5.
Updating: extract over your install. Your saves and settings in conf/ are kept.
The Familia v0.2.5 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds. No game files are included: you need your own copy (see the README).
What's new in 0.2.5: no more slowdown and freezes in long sessions
The fix: previous versions used more and more memory the longer you played, through no fault of the game itself.
- The cause was the port's "GPU streaming" draw path: the H700's GPU driver took memory for every draw that went through it and never gave it back.
- On a 1 GB handheld the game got slower over time and could freeze on a loading screen after about half an hour.
- On handhelds with more RAM it only got slower; restarting the game brought the speed back.
GPU streaming is now off by default, and memory use stays flat over a session.
New launcher setting: GPU streaming turns the faster path back on. It gains about 2 FPS, so use it for short sessions only.
Speed: Free Ride with maximum traffic on the H700 runs at about 29 FPS standing at the start (about 31 with GPU streaming on, before the memory runs out). Prefetching in the traffic and particle code recovers part of the difference.
Diagnostics: with FAMILIA_STATS=1 in conf/dev.cfg, the performance log also shows where the memory goes ([mem] lines).
Updating: extract over your install, including the new The Familia.sh. Your saves and settings in conf/ are kept.
The Familia v0.2.4 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds. No game files are included: you need your own copy (see the README).
What's new in 0.2.4: a faster render path
More of the engine's per-frame rendering now runs as native ARM code. Each part is checked against the original code:
- the per-frame pass over all of the city's sounds;
- the draw call for each part of each object;
- the shadow textures;
- the engine's name lookup tree.
Speed:
- Free Ride with maximum traffic on the H700 now runs at about 31 FPS while standing (32.2–32.7 ms per frame, down from 32.9–34.6 ms in 0.2.3).
- The game's memory bookkeeping no longer slows down as a session goes on.
Diagnostics: the performance log (FAMILIA_STATS=1 in conf/dev.cfg) now also shows CPU clock and temperature, plus a [growth] line for tracking down slowdowns in long sessions.
Everything else is as in 0.2.3: learned read-ahead, native gamepad support, the launcher.
Updating: extract over your install. Your saves and settings in conf/ are kept.
The Familia v0.2.3 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds. No game files are included: you need your own copy (see the README).
What's new in 0.2.3: smoother streaming
- Learned read-ahead. The port remembers which parts of the game's archives you have played through (
conf/readahead.txt, a few KB). At the next start it reads them into memory in the background while the menus and loading screen run, so driving through the city no longer waits on the SD card.- Measured on a scripted city drive after a reboot (H700): time spent waiting on the card during stutters fell from 8.4 s to 0.4 s; stutter time over 50 ms per frame from 15.4 s to 8.5 s; frames over 200 ms from 21 to 13.
- Loading is not slower, and the frame rate is unchanged.
- The list grows as you explore, so areas you visit for the first time behave as before.
- Cheaper texture lookups. The engine searches for every texture as a loose file before reading it from an archive, and each search used to read a folder from the SD card. Those searches now take about a tenth of the time, and frames over 100 ms on the drive fell from 25 to 19.
Everything else is as in 0.2.2:
- native gamepad support with on-foot and in-car layouts, analog driving, and rebinding in the game's Options → Controls;
- the new launcher.
Updating: extract over your install. Your saves and settings in conf/ are kept. The read-ahead learns during your first session after updating.
The Familia v0.2.2 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds. No game files are included: you need your own copy (see the README).
What's new in 0.2.2
A small performance update for the H700. Free Ride with maximum traffic now takes about 34.6 ms per frame, down from 35.2 (roughly 28.9 FPS instead of 28.4):
- Animation keyframe interpolation runs as native code. It is checked against the original code in 20,000 random cases.
- Calls from the game into the graphics and sound layer skip an unnecessary lookup.
- The optimised build is profiled on three play sessions: Free Ride standing, mission 1 and Free Ride driving.
Everything else is as in 0.2.1:
- native gamepad support with on-foot and in-car layouts, analog driving, and rebinding in the game's Options → Controls;
- the new launcher;
- the import fix.
Updating: extract over your install. Your saves and settings in conf/ are kept.
The Familia v0.2.1 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds. No game files are included: you need your own copy (see the README).
Fixed in 0.2.1
- First-start import no longer appears stuck. The import page could keep its timer running after the importer had finished ("done: … 24 files written"). It now moves on to the settings page.
- If you hit this on 0.2.0: your files were imported. Power the handheld off and on, then either create an empty file
ports/the_familia/data/.installedor let it import again.
- If you hit this on 0.2.0: your files were imported. Power the handheld off and on, then either create an empty file
Everything else is as in 0.2.0:
- native gamepad support with on-foot and in-car layouts, analog driving and rebinding in the game's Options → Controls;
- a gentler right stick;
- the new launcher.
Updating: extract over your install. Your saves and settings in conf/ are kept.
The Familia v0.2.0 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds.
No game files are included. You need your own copy: the three CDs (.bin+.cue or .iso), the official mafia_patch_1.2_eng.exe and an unprotected 1.2 Game.exe. See the README.
What's new in 0.2.0
- Native gamepad support. The game reads the controller as its own gamepad (PortMaster's gptokeyb2 presents any handheld as an Xbox 360 pad):
- separate on-foot and in-car layouts, like the console versions;
- analog steering, throttle (RT) and brake (LT).
- Rebinding and sensitivity in the game. Rebind the pad in the game's Options → Controls. Aiming sensitivity X/Y and invert are there too.
- Gentler right stick. It runs at 30 % of the previous speed by default. Adjust it in the launcher (Look sensitivity).
- Quick taps no longer get lost. Every button and key press is kept until the game reads it.
- A new launcher in the style of the game's menus, with a controls page.
Updating from 0.1.0: extract over your install. Your saves and settings in conf/ are kept, and your profile gets the gamepad layout automatically.
Tested on the Anbernic RG40XX H (H700, muOS)
- Menus 60 FPS, videos 25 FPS, cutscenes 57–60 FPS
- City driving and Free Ride at maximum traffic: about 25–30 FPS
- Night missions: 26–28 FPS, short dips into the low 20s
Known limitations
- A full playthrough has not been verified.
- Brief hitches can happen when new city areas or assets load.
- Only muOS on the RG40XX H has been tested.
The Familia v0.1.0 (beta)
Beta, for testing purposes only. Mafia: The City of Lost Heaven (PC, 2002, v1.2) statically recompiled to ARM64 for PortMaster handhelds.
No game files are included. You need your own copy: the three CDs (.bin+.cue or .iso), the official mafia_patch_1.2_eng.exe and an unprotected 1.2 Game.exe. See the README for installation.
Tested on the Anbernic RG40XX H (H700, Mali-G31, muOS):
- Menus 60 FPS, videos 25 FPS, cutscenes 57–60 FPS
- City driving and Free Ride at maximum traffic: about 25–30 FPS
- Night missions: 26–28 FPS, short dips into the low 20s
Known limitations:
- A full playthrough has not been verified.
- Brief hitches can happen when new city areas or assets load.
- Only muOS on the RG40XX H has been tested.
Install: copy The Familia.sh into your Ports folder (muOS: ROMS/Ports) and the_familia/ into ports/, put your files in ports/the_familia/source/, and start The Familia. The first run imports the game (about 2 GB).