Skip to content

v0.5.0 — Tune-Up

Pre-release
Pre-release

Choose a tag to compare

@Swisha33 Swisha33 released this 04 Dec 23:15
· 1 commit to main since this release

Memory fixes, smoother movies, a steadier touch screen, and several fixes found by reviewing another fork's
change list. Install the new NFSCVita.vpk over the old one with VitaShell; your game files, saves and settings
stay.

An early release. My Vita is on its last legs (failing charging port and cable), so I am putting out what is
finished and tested now instead of waiting. Some things still need more work: real races run slower than free
roam, the sound can still double, and the items under Known issues below are still open.

PlayStation buttons in the menus: the port cannot ship the button icons, so you fetch them yourself once. Download
NFSCVita-button-icons.zip below, double-click Get button icons.bat on your PC and copy the
XtendedInputButtons.tpk it fetches to ux0:data/NFSCVITA/GLOBAL/. Without that file the menus show the PC's
keys. Already did this for v0.4.0? The file stays, nothing to do.

Required plugins: CapUnlocker (the fourth CPU core) and
PSVshell with the CPU at 500 MHz. The port still leaves the CPU clock to
PSVshell (cpu_clock=0).

Fixed

  • Memory is given back. Textures and vertex buffers the game had queued for release are now freed at once
    instead of three per frame, and the cars the game keeps loaded "just in case" are unloaded at loading screens
    (24-26 cars before a career race; video memory in use dropped from 67 to 45 MB in our test). Not in the menus
    and not while driving, where the game needs them (car-select preview, traffic).
  • Car select browses at full speed again with the above: video memory blocks are kept for 2 seconds before
    they go back to the system, so browsing cars no longer frees and re-maps 16 MB blocks every few seconds.
  • Camera switching between first and third person by itself (reported on Reddit): a palm or finger resting
    on the touch screen's edge could tap the camera zone. The front touch halves now need 60 ms of contact to
    press and 150 ms without contact to let go, and the front panel has a 5 % dead border by default
    (front_touch_dead_border).
  • The EA timer never ticked: GetSystemTime returned local time where the game expects UTC.
  • Boss races: the picture-in-picture inset showed only its mask; it now shows the boss's face.
  • Car reflections: a reflection face can no longer stay stale; faces are redrawn by age.
  • Video memory: finished releases are freed before the GPU memory grows, and render targets are retried with
    fewer scenes when memory runs out instead of the game closing.
  • Award points / cash are skipped safely when the racer is not found.
  • The movies use less memory (3 decoded frames instead of 6): the 720p attract movie no longer brings the heap
    close to its end.

Faster

  • High preset: about +1.8 fps in free roam. The six car reflection faces are no longer drawn while no car
    shader reads them (race cars use a shader without the environment map).
  • Movies: the colour conversion of each movie frame runs on two spare CPU cores instead of the game thread.
    The 720p attract movie (6.4 s of video) now plays in about 8.7 s instead of about 11.5 s; the other movies
    play 5-8 % faster.
  • Scenery: the game's scenery tree walk runs as native code (checked against the game's own walk: 300 of 300
    identical). Free roam is often at the 30 fps cap already, so the frame rate barely changes on its own, but the
    game thread has more room.

v0.4.0 vs v0.5.0, frame rate per detail preset (the same 150 s free-roam drive for both versions, back to back
on one Vita, 500 MHz, 30 fps lock, 640x480; average of the 10-second windows while driving, worst window in
brackets):

Preset v0.4.0 v0.5.0
Low 29.4 fps (27.1) 29.3 fps (26.7)
Medium 28.4 fps (25.7) 29.1 fps (27.0)
High 26.4 fps (21.0) 28.2 fps (25.1)

Low already sits at the 30 fps lock, so it cannot gain. One run each: differences of a few tenths are noise.
Real races with AI cars run slower than free roam (about 19-20 fps on Low in a Quick Race);
speeding up races is next.

Changed

  • The online dialogs say "Online play: coming soon." instead of "Cannot connect to EA Nation".

Thanks: valentinorzusa's fork

valentinorzusa's fork (based on our v0.1.8) lists many changes. We
checked each one against the game's code and our port, and wrote our own fixes; no code was copied.

Helped us (their finding, our own fix):

  • the EA timer (UTC), the boss picture-in-picture inset, car reflection faces by age, safe award points / cash,
    render target retries, video memory freed before it grows;
  • skipping the car reflection faces nobody reads (+1.8 fps on High in free roam);
  • releasing queued textures / vertex buffers at once and trimming the car cache (our rule: only at loading
    screens; trimming in the menus left the car-select preview loading forever, and while driving the game reloads
    its traffic cars at once);
  • the scenery tree walk as native code (ours follows the game's code exactly and leaves out their extra culling);
  • the "coming soon" text for the online dialogs.

Not useful for our port:

  • dimmer characters and world brightness changes (ours already match the PC's techniques);
  • a file-handle cache (files are never reopened in our port);
  • NEON swizzle / audio mixing, RPM sync, digital gas (well under 1 % of a frame, or not needed);
  • linker symbol ordering (tested: 27.4 vs 27.3 fps, no gain);
  • car_reflect_dist (our car shader has no reflection to cull) and world_detail (the game's Video menu sets it);
  • an offline online server: we want real online servers later instead.

Already in our port before we knew of the fork:

  • movies with native VP6 decoding and the Vita's hardware decoder (v0.4.0);
  • console button prompts (v0.4.0);
  • the mesh flush running off the game thread (v0.2.0);
  • effect constant caching (skipping unchanged shader constants, v0.2.0).

Not tried yet: their track-pool overflow (we have not seen a track section dropped yet), faster loading, the
missing-LOD switch, a native SetTransforms, and their audio changes.

Tips

  • Choppy frame rate? Keep frame_rate=30 (the default). 60 turns the 30 fps lock off and the frame rate then
    swings between about 15 and 60.
  • Buildings or signs appearing late? scenery_scale=1 draws small scenery as far as the PC does (default 0.5,
    about 1.3 fps faster).

Known issues

  • The sound can double (repeat a short piece) in busy races, as in v0.4.0.
  • High preset with racing_resolution=manual at 1024x768 runs out of memory (the default 640x480 is fine).
  • Depth of field is not drawn.
  • A small mouse arrow (the PC's cursor) stays in the middle of the menus.
  • The career is tested up to just after the first boss; please report anything that stops you later on, with
    nfscvita.log and nfscvita.prev.log attached.

Icon and LiveArea artwork by u/Either-Version-9577.

Unofficial, non-commercial fan port, not affiliated with or endorsed by Electronic Arts.