Skip to content

Releases: Umar-Qayyum-dev/uncharted_pc

Raw mouse aiming for Uncharted 1, 2 and 3

Choose a tag to compare

@Umar-Qayyum-dev Umar-Qayyum-dev released this 22 Oct 18:14

Raw mouse aiming for Uncharted 1, 2 and 3

For SuperMedo's Uncharted PC port 0.3.6 on Windows, US version 1.02 of the collection (CUSA02320).

Aiming and looking around with the mouse now feel like a PC game:

  • Raw aiming: the crosshair follows your hand 1:1. No joystick feel, no speed cap, the same at any frame rate. Aim assist and recoil still work.
  • Mouse look while walking works on US 1.02 (before, the mouse acted like a joystick there).
  • Rolling and aiming right away points where you look. Fast flicks don't swing the camera over Drake's head.

Mouse speed: launcher → Settings → Controls → Mouse sensitivity.

Install

  1. Back up bin\bb-probe.exe and bin\libc++.dll in your port folder.
  2. Copy bin\bb-probe.exe and bin\libc++.dll from the zip into your port's bin folder (replace).
  3. Start the game from the launcher as before.

Undo: put your backup back. Old stick-style aiming for comparing: add BB_AIM_DIRECT=0 to the launcher's extra environment.

Older CPUs (before Intel Haswell, e.g. Ivy Bridge): this build is plain 0.3.6 + raw mouse, so it needs a CPU the port already supports. For older CPUs see my oldcpu-test-1 release.

Tested on Uncharted 1, 2 and 3 (walking, aiming, rolls, fast turns). Tell me how it feels.

Pull request for the main port: (link after posting)

Fork of SuperMedo's port: patches and launcher by Umar-Qayyum-dev. Free, now and always.
Not affiliated with Sony Interactive Entertainment or Naughty Dog. You need your own game dump.

Written with help from Claude.


❤️ Like my work? You can support me on Patreon. Everything I make stays free for everyone: no paywall, no early access.

Uncharted PC Port: every fix in one download (FPS, crash fix, graphics & physics fixes, raw mouse, new launcher)

Choose a tag to compare

@Umar-Qayyum-dev Umar-Qayyum-dev released this 22 Oct 19:14

Uncharted: The Nathan Drake Collection PC port, special build

Every fix and feature I've made for SuperMedo's Uncharted PC port, in one download.

Not just an FPS boost: this build fixes problems in how the PS4 code is run on a PC at every level. That covers the CPU (instructions older CPUs lack, a Windows crash), the GPU (synchronization), the shader translation (code that relied on how AMD's PS4 GPU behaves), the graphics (lighting, exposure, depth of field) and the physics (cloth). Plus raw mouse aiming, keyboard button prompts and a new launcher.

For SuperMedo's port 0.3.6 on Windows. Mouse features target the US 1.02 version of the collection (CUSA02320). You need your own game dump.


Update 2 (Oct 23)

Mouse in cover is now as fast as normal camera (Uncharted 1, 2 and 3). Before, the mouse turned the camera slowly while Drake was in cover. Download the full archive again; it includes everything.

Update 1 (Oct 23)

+11% FPS at heavy Uncharted 2 spots (for example the museum). The GPU now waits less between small jobs. Nothing else changed.


Install

  1. Back up these files in your port folder: Uncharted.exe, the _internal folder, bin\bb-probe.exe and bin\libc++.dll.
  2. Copy everything from the zip into the port folder (replace).
  3. Start Uncharted.exe.

Undo: put your backup back.


What's new and fixed, by game

All three games

  • Runs on older CPUs. Intel CPUs before Haswell (Sandy/Ivy Bridge) and AMD CPUs without BMI1 used to stop at start. The port now rewrites the few missing instructions when a game loads. Tested on a Xeon E3-1240 v2 (Ivy Bridge).
  • Much higher FPS at heavy spots. Less waiting between the CPU and the GPU and less wasted CPU time: details below.
  • Aiming focus (depth of field). When aiming, the target at the crosshair is sharp again and the near foreground is blurred, as on PS4. Before, everything but Drake was blurred.
  • Raw mouse aiming. The crosshair follows your hand 1:1: no joystick feel, no speed cap, any frame rate. Aim assist and recoil still work. Mouse look while walking works on US 1.02, rolls + instant aim point the right way, and fast flicks don't swing the camera over Drake.
  • Keyboard & mouse button prompts. The game shows your keys instead of PlayStation buttons, switches automatically between controller and keyboard, and works with any keyboard layout (AZERTY, …).

Uncharted: Drake's Fortune (U1)

  • Random crash fixed: Fault: execute access to 0 … guest offset 0x641532 after some time of playing.
  • Raw aiming, mouse look and keyboard prompts (title screen, menus, hints).

Uncharted 2: Among Thieves (U2)

  • Lighting: at busy spots (e.g. the museum hall) the lighting was too bright and yellow and cost huge time. It now looks right, and that spot went from 14-15 to 24-25 FPS.
  • Characters: fix for NPCs floating, sinking and hopping on the ground (stale character data).
  • FPS: at the heaviest spot I measured (museum, ~2700 draw calls per frame) from about 10 to 17-18 FPS on my PC.
  • Raw aiming, mouse look and keyboard prompts (including the big on-screen button prompts).

Uncharted 3: Drake's Deception (U3)

  • Over-bright picture: white edges on ledges and leaves, washed-out walls and brightness jumping up and down are fixed. The auto exposure works as on PS4 again.
  • Cloth: Sully's missing shirt piece in the young-Nate chapter is back. This is very likely also the "cloth vortex" glitch other players see.
  • Raw aiming, mouse look and keyboard prompts (U3's own icon sheet and big prompts).

New launcher

  • Console-style home screen: the three games as tiles, start with Enter or a click.
  • Settings as clean lists; choices open a small drop-down next to the setting.
  • FPS limit (Settings → Display): 30 / 40 / 45 / 50, for a steady frame rate on slower PCs.
  • Smooth switching between games.

How it works (for developers)

CPU

  • Older CPUs (src/cpu_patch.c, new): at load, BMI1/LZCNT/MOVBE instructions in the game code are rewritten into equivalent code in thunks; two sites per game that can't be rewritten in place use a breakpoint. Tests: tests/test_cpu_patch.c.
  • Windows exception frames vs. the System V red zone (src/red_zone.c, new): Windows writes its exception frame into the 128 bytes below rsp, which PS4 leaf functions use. A GPU page-tracking fault there lost data; in U1's constant-table builder that was a function pointer, so the game jumped to 0. Faultable accesses in red-zone leaf functions are moved into thunks that step below the red zone first. Tests: 228/312 wrong before, 0/312 after (tests/test_red_zone.c).

GPU synchronization and CPU time (liverpool.cpp, vk_scheduler.*, vk_rasterizer.*, buffer_cache.*, texture_cache.*, bbport_wait.h, src/probe.c)

  • Compute queue: packets no longer drain the draw pipe each; compute release-memory events run in order on the recording thread (+45% at the U2 museum wall).
  • End-of-shader fences are signalled on the recording thread, and WaitRegMem treats fences that ran but aren't written yet as pending.
  • Naughty Dog's job workers spun on pause while idle; a hook makes them yield the CPU instead (+14%).
  • Waits on atomics sleep (WaitOnAddress) instead of polling.
  • Read-only buffer ranges already streamed into the same command buffer are reused (+7%).
  • Texture sets are reused after a texture-cache generation change when their images are still the same.
  • Interleaved written buffers (Update 1, vk_rasterizer.cpp): U2's skinning shader writes each vertex attribute through its own buffer view (+0/+12/+20, stride 28). Each view claimed a full stride past the mesh, into the next mesh's output, so ~1200 dispatches a frame each got a full barrier. Those views now end where their records end: ~70 barriers a frame.
  • Barrier tracker cap (Update 1, vk_runtime.*): with fewer barriers the range tracker grew large between flushes (9 ms a frame). A dispatch now flushes once 64 ranges were added. Together: +11-13% at the U2 museum wall.

Shader translation (shader_recompiler/…)

  • ReadConst windows (flatten_extended_userdata_pass.cpp, srt.h, emit_spirv_context_get_set.cpp): constant reads at per-lane offsets went through a 256-dword window and were clamped. U2's lighting shader reads up to 128 lights × 56 dwords, so every light after the 4th got garbage and passed culling everywhere (too bright, and ~26 ms per frame). The window is now 8192 dwords: ~2 ms.
  • Wave-local LDS steps (shared_memory_barrier_pass.cpp): GCN runs 64 lanes in lockstep, so reductions skip barriers in their last steps. NVIDIA runs 32-lane subgroups, so those steps read partial sums before they were written. U3's auto exposure lost parts of its luminance sums and stayed at maximum. Barriers are now added for those steps in workgroups larger than one wave (top-level only).
  • Out-of-range LDS (shared_memory_range_pass.cpp, new): U3's 1024-thread cloth solver reads past its 2 KiB of shared memory, which returns 0 on GCN. Here it read garbage/NaN and the cloth vanished. Out-of-range accesses now behave as on GCN.

Graphics

  • Tiny render results the CPU reads (texture_cache.cpp): the autofocus reduces depth to a 1×1 image that the CPU reads to set the focus. Render targets weren't copied back, so the focus came from stale data. Images up to 4×4 that the GPU writes are now copied back without waiting.
  • Character constants (vk_shader_hle.*, vk_scheduler.*): scalar copies of character constant blocks that the GPU wrote are read back before the CPU-side shader-resource walker uses them; fences behind those copies wait for them.

Input (src/runtime_pad.c, src/probe.c, src/runtime.h)

  • US 1.02 hooks for all three games: follow camera, pad and aim controller (the port's hooks matched EU 1.00 only).
  • Raw aim turns the aiming camera's remembered aim direction 1:1. Follow camera: per-camera state, a stick push that follows the mouse, and a limit that keeps the direction within 60° of the game's spring-smoothed camera.
  • Cover camera (Update 2): in cover the games use their own camera (CameraControlCover), which the mouse didn't reach, so it went through the pretend right stick and its top speed. A hook at the start of each game's cover update (US 1.02: U1 0xa4670, U2 0x417450, U3 0x4cd030) now turns its direction and pitch by the mouse, kept within the camera's own limits.
  • Keyboard prompts (button_prompts.*, new): known PlayStation button pictures are recognised by their texture hash and redrawn with the bound keys.

Files: 56 changed (about +4,900 / −140 lines). New: src/cpu_patch.c, src/red_zone.c, shared_memory_range_pass.cpp, button_prompts.cpp, bbport_wait.h, plus tests. Every part is also on its own branch on this fork, based on 0.3.6.


Known issues (fixes planned for an update)

  • The camera also turns with the mouse while the pause menu is open.
  • Uncharted 2: guns look black (an older port issue, not caused by these patches).

The single fixes as separate pull requests

Tested on my PC (Xeon E3-1240 v2, GTX 1050 Ti 4 GB, Windows 10, US 1.02), including a 30-minute session.

Thanks to SuperMedo for the port this all builds on.

Fork of SuperMedo's port: patches and launcher by Umar-Qayyum-dev. Free, now and always, nothing behind a paywall.
Not affiliated with Sony Interactive Entertainment or Naughty Dog.

Written with help from Claude.


❤️ Like my work? You can support me on Patreon. Everything I make stays free for ever...

Read more

Uncharted 2 Aim Blur Fixed: Enemies Stay in Focus

Choose a tag to compare

@Umar-Qayyum-dev Umar-Qayyum-dev released this 22 Oct 07:24

Unofficial test build of PR Supermedo#528

Aim without the blur

Aiming at an enemy in Uncharted 2 used to blur the whole screen, the enemy too. Now the enemy under your crosshair stays sharp, just like on the PS4. Only the foreground close to the camera gets a soft blur.

Before After
aim-focus-before aim-focus-after
aiming at an enemy: everything blurred aiming at an enemy: the enemy is sharp
  • Nothing to set up, and it doesn't slow the game down.
  • Tested in Uncharted 2. Uncharted 1 and 3 should behave the same (not tested yet).

Also included: keyboard & mouse prompts

This build also has my In-Game Keyboard & Mouse Layout (version 1.1, PR Supermedo#420): play with keyboard and mouse and the game shows your keys instead of PlayStation buttons, in Uncharted 1, 2 and 3. Pick up a controller and the PlayStation buttons come back. One download, both fixes.

How to install

  1. Install the official port 0.3.6 and run it once.
  2. In its bin folder, rename bb-probe.exe to bb-probe-backup.exe and libc++.dll to libc++-backup.dll.
  3. Copy both files from this zip's bin folder (bb-probe.exe and libc++.dll) into the bin folder.
  4. Start Uncharted.exe and aim at an enemy: it stays sharp. With keyboard and mouse, the prompts show your keys.

Already have the keyboard prompts build? Just copy this one over it: it has both.

To undo: delete the two new files and rename the backups back.
Turn a fix off with an environment variable: BB_TINY_READBACK=0 (aim fix) or BB_BUTTON_PROMPTS=0 (keyboard prompts).
Problems? Open an issue here with your user\last_run.log.

Source: branch release-aim-keyboard of this repository (branch aim-focus-fix + keyboard-prompts 1.1).
SHA-256 of uncharted-0.3.6-aim-focus-fix-1.zip: @SHA@

No game files included: you need your own PS4 dump. Built with help from Claude, tested on my own PC.

Older Intel CPU (3rd gen / Ivy Bridge) that can't start the game? See the older-CPU patch.


❤️ Like my work? You can support me on Patreon. Everything I make stays free for everyone: no paywall, no early access.

Fix for the random Uncharted 1 crash ("execute access to 0")

Choose a tag to compare

@Umar-Qayyum-dev Umar-Qayyum-dev released this 22 Oct 17:29

Fix for the random Uncharted 1 crash ("execute access to 0")

For SuperMedo's Uncharted PC port 0.3.6 on Windows.

Uncharted 1 could crash at random after some time of playing. The log (user\last_run.log) then ends with a line like Fault: execute access to 0 … guest offset 0x641532. This build fixes that crash. Uncharted 2 and 3 have the same code and are covered too.

Install

  1. Back up bin\bb-probe.exe and bin\libc++.dll in your port folder.
  2. Copy bin\bb-probe.exe and bin\libc++.dll from the zip into your port's bin folder (replace).
  3. Start the game from the launcher as before.

To turn the fix off for a test: add BB_RED_ZONE=0 to the launcher's extra environment. Undo: put your backup back.

Older CPUs (before Intel Haswell / AMD with BMI1, e.g. Ivy Bridge): this build is plain 0.3.6 + the fix, so it needs a CPU the port already supports. For older CPUs see my oldcpu-test-1 release.

Pull request for the main port: (Supermedo#559)

For developers

Windows writes its exception frames into the 128-byte "red zone" below the stack pointer, which the PS4 code (System V) uses in leaf functions. When the port's GPU page tracking faults inside such a function, its data is lost; in Uncharted 1 that was a function pointer, hence the jump to 0. At load the port now finds those functions and moves each memory access that can fault into a small stub that steps below the red zone first. Details in the PR.

Fork of SuperMedo's port: patches and launcher by Umar-Qayyum-dev. Free, now and always.
Not affiliated with Sony Interactive Entertainment or Naughty Dog. You need your own game dump.

Written with help from Claude.


❤️ Like my work? You can support me on Patreon. Everything I make stays free for everyone: no paywall, no early access.

In-Game Keyboard & Mouse Layout

Pre-release

Choose a tag to compare

Unofficial test build of PR Supermedo#420

Play with keyboard and mouse, see keyboard and mouse keys. The games' button prompts
(menus, hints, the big on-screen prompts) show the keys you bound in the launcher instead of the
PlayStation buttons. Touch a controller and the PlayStation pictures come back, live.

  • Uncharted 1, 2 and 3
  • Shows your own bindings from the launcher's Controls page
  • Keys follow your keyboard layout (AZERTY testing in progress): on AZERTY, binding Z means your Z key (it used to land on W).
    Default WASD stays on the same physical keys (ZQSD on AZERTY), and the prompts show ZQSD.

Changelog

1.1

  • Fixed: the game didn't start on the official 0.3.6 with the error "The procedure entry point
    _ZTVSt29__bad_variant_access_with_msg could not be located"
    . The zip now includes the
    libc++.dll this build needs (it works with all other files of the port).
  • Install now copies two files instead of one (see below).

1.0

  • Keyboard and mouse button prompts in Uncharted 1, 2 and 3, switching with the controller.
  • Custom keybindings follow the keyboard layout (AZERTY, QWERTZ...).

How to install

  1. Install the official port 0.3.6 and run it once.
  2. In its bin folder, rename bb-probe.exe to bb-probe-backup.exe and libc++.dll to libc++-backup.dll.
  3. Copy both files from this zip's bin folder (bb-probe.exe and libc++.dll) into the bin folder.
  4. Start Uncharted.exe and play with keyboard and mouse. user\last_run.log shows lines
    starting with Button prompts:.

To undo: delete the two new files and rename the backups back.
Turn the prompts off with the environment variable BB_BUTTON_PROMPTS=0.
Problems? Open an issue here with your user\last_run.log.

Source: branch keyboard-prompts of this repository.
SHA-256 of uncharted-0.3.6-keyboard-prompts-1.1.zip: 3409a1f64514193484ec29711b6a88d420a14a7785b97a05683ec7aed4f3f854

No game files included: you need your own PS4 dump. Built with help from Claude, tested on my own PC.

Older Intel CPU (3rd gen / Ivy Bridge) that can't start the game? See the older-CPU patch.


❤️ Like my work? You can support me on Patreon. Everything I make stays free for everyone: no paywall, no early access.

Uncharted on 3rd-gen Intel (Ivy Bridge), based on 0.3.6

Choose a tag to compare

@Umar-Qayyum-dev Umar-Qayyum-dev released this 18 Oct 19:02
6839e97

Unofficial test build of PR Supermedo#336

Only for Intel 3rd-gen / Xeon E3 v2 CPUs (Ivy Bridge), which can't start the official port.
On 4th-gen Intel and newer, or AMD Ryzen, use the official release instead.

How to install

  1. Install the official port 0.3.6 and run it once.
  2. Back up its bin folder (copy it, rename the copy to bin-original).
  3. Copy everything from this zip's bin folder into your bin folder, replacing files.
  4. Start Uncharted.exe. Your user\last_run.log should show a line starting with CPU: this processor lacks the PS4's ...

Tested on a Xeon E3-1240 v2 + GTX 1050 Ti: Uncharted 1, 2 and 3 start and play.
Problems? Open an issue here with your user\last_run.log.

Source: branch claude/hopeful-archimedes-ro1kv4 of this repository.
SHA-256 of the zip: db1a949f14a57f4567559c7bcf5fc651a763beb0eedd9c512ce56b15e42a947d

No game files included: you need your own PS4 dump. Built with help from Claude, tested on my own PC.


❤️ Like my work? You can support me on Patreon. Everything I make stays free for everyone: no paywall, no early access.