Skip to content

TRusselo/007FirstLight-UltrawideFix

Repository files navigation

007 First Light — Ultrawide / Aspect Ratio Fix

A small hex patcher that unlocks ultrawide and super-ultrawide aspect ratios in 007 First Light by changing the aspect-ratio value baked into 007FirstLight.exe.

Works on Windows, Linux, and macOS — including games run through Wine / Proton (Heroic, Lutris, Steam Play). The cross-platform version uses only Python 3, so it does not depend on PowerShell (which Wine does not ship).

⚠️ Use at your own risk. This modifies the game executable. The tool makes a .bak backup before touching anything, but you are responsible for your own files. Not affiliated with IO Interactive or the game's publisher.


What it does

The game stores its target aspect ratio as a 32-bit float inside the exe. The default 16:9 ratio (1.7778) is stored as the little-endian bytes:

39 8E E3 3F

This tool finds every occurrence of those bytes and replaces them with the value for your chosen resolution — e.g. 32:9 (5.3333) is 39 8E 63 40. It creates a one-time 007FirstLight.exe.bak backup first, and can restore it at any time.

Supported resolutions

# Aspect Example resolutions Hex value
1 21:9 2560×1080 26 B4 17 40
2 21:9 3440×1440 8E E3 18 40
3 21:9 3840×1600 9A 99 19 40
4 32:10 3840×1200 / 5120×1600 CD CC 4C 40
5 32:9 3840×1080 / 5120×1440 39 8E 63 40
6 Custom any 4-byte hex value you provide

Need a value not listed? Compute it from your ratio (width / height) as a little-endian 32-bit float, or grab common values from the WSGF hex value guide.


Requirements

Platform What you need
Windows Nothing — WindowsUltrawideFix.bat uses built-in PowerShell. (Python is optional; Windows doesn't include it.)
Linux python3 — preinstalled on virtually every distro.
macOS python3 — install via Xcode Command Line Tools (xcode-select --install) if not already present.

Install

Copy the scripts into the game's Retail folder — the same folder that contains 007FirstLight.exe.

  • Windows / Steam: ...\007 First Light\Retail\
  • Heroic / Lutris (Wine prefix), typical path: .../drive_c/.../007 First Light/Retail/

You only need ultrawide_fix.py plus the launcher for your OS. The whole repo dropped in the folder works fine too.

Usage

Windows

Windows does not come with Python. PowerShell, however, ships with every Windows 10/11 — so the PowerShell version needs zero installs.

  • Recommended (no install): double-click WindowsUltrawideFix.bat — uses only built-in Windows PowerShell.
  • Or: double-click Patch-Ultrawide.bat. If you have real Python it runs the cross-platform script; if not, it automatically falls back to the PowerShell version. It also skips the Microsoft Store "python" stub (typing python on a stock Windows just opens the Store — this launcher ignores that).
  • Terminal (if Python is installed): py -3 ultrawide_fix.py

Linux (native or Wine/Proton — Heroic, Lutris, Steam)

Patch the real Windows exe on disk with your system's Python — you do not run this inside Wine:

cd "/path/to/007 First Light/Retail"
python3 ultrawide_fix.py

Or double-click ultrawide_fix.command (mark it executable first: chmod +x ultrawide_fix.command).

macOS

Double-click ultrawide_fix.command, or run python3 ultrawide_fix.py in Terminal.

Non-interactive / scripted

# Patch directly to a specific 4-byte value (e.g. 21:9 3440x1440)
python3 ultrawide_fix.py "8E E3 18 40"

# Restore the original exe from the .bak backup
python3 ultrawide_fix.py --revert

Reverting

Run the patcher and choose R, or:

python3 ultrawide_fix.py --revert

To do it by hand, delete 007FirstLight.exe and rename 007FirstLight.exe.bak back to 007FirstLight.exe.

Switching ratios: once patched, the original 39 8E E3 3F bytes are gone, so patching again reports "Pattern not found." Revert first, then patch to the new ratio.


Troubleshooting

  • "Pattern not found" / already patched — the exe no longer contains the 16:9 bytes. It's already modified. --revert to get back to stock, then re-patch.
  • Permission denied / read-only — the script clears the read-only bit automatically. If it still fails, ensure the game isn't running and you own the file (chmod u+w 007FirstLight.exe on Linux/macOS).
  • HUD/FOV looks stretched or wrong — this patch replaces all matching values, matching the original mod's behavior. If the result looks off, --revert and try a different ratio, or report an issue.
  • Wine users: don't run the .bat files through wine cmd. Wine has no PowerShell, so the original WindowsUltrawideFix.bat can't complete there. Patch the on-disk exe with your host OS's python3 instead.

How it works

  1. Reads 007FirstLight.exe as raw bytes.
  2. Counts occurrences of the 16:9 pattern 39 8E E3 3F.
  3. Copies the exe to 007FirstLight.exe.bak (only if no backup exists yet).
  4. Clears the read-only flag and writes back the file with every occurrence replaced by your chosen 4-byte value.

No external dependencies — Python 3 standard library only.

Files

File Purpose
ultrawide_fix.py The cross-platform patcher (Windows/Linux/macOS).
Patch-Ultrawide.bat Windows double-click launcher for the Python script.
ultrawide_fix.command macOS/Linux double-click launcher.
WindowsUltrawideFix.bat Original Windows-only version (PowerShell, no Python).

License

MIT

About

Ultrawide / super-ultrawide aspect ratio hex patcher for 007 First Light. Cross-platform (Windows/Linux/macOS, Wine/Proton). No PowerShell required.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors