# Gundam Breaker 4 — UltraWide Fix

✅ **Confirmed working in gameplay at 5120×1440 (32:9) on Proton.**

Forces **Hor+ FOV** so an ultrawide display shows *more of the battlefield* instead of zooming the camera in, and disables pillarboxing.

- **Engine:** Unreal Engine 4.27
- **Steam AppID:** 1672500
- **Executable:** `GB4-Win64-Shipping.exe` (SteamStub-encrypted → runtime patch required)

## Install (Linux / Proton)

```bash
./install.sh GundamBreaker4
```

Then **required** — Steam → right-click *Gundam Breaker 4* → Properties → Launch Options:

```
WINEDLLOVERRIDES="dsound=n,b" %command%
```

Without it, Proton ignores the native `dsound.dll` and the fix appears to work **only in the lobby** (that part is the `Engine.ini` tweak) while reverting in missions.

Finally, set the in-game resolution to **5120×1440**, fullscreen.

## Install (Windows)

Extract the release zip into `…\GB4\Binaries\Win64\` (next to `GB4-Win64-Shipping.exe`). No launch option needed.

## Uninstall

```bash
./install.sh GundamBreaker4 uninstall
```

## What it patches

| Patch | Effect |
|---|---|
| `AspectRatioAxisConstraint` | Forces `MaintainYFOV` (0) → Hor+ FOV. **Do not use at 16:9 or narrower.** |
| `ConstrainAspectRatio` | NOPs the pillarbox/letterbox clamp |
| `HardcodedAspect_16by9_*` | Optional fallbacks, disabled by default |

The patterns are UE4-generic (adapted from Trepang2 / Lies of P in [Lyall's UltrawidePatches](https://codeberg.org/Lyall/UltrawidePatches)) and matched GB4's 4.27 code as-is.

## Troubleshooting

Add `PROTON_LOG=1` to the launch options, relaunch, then:

```bash
./tools/read_protonlog.sh 1672500
```

That reports whether the ASI injected and how many matches each pattern found. If a pattern shows `No pattern found`, derive the exact bytes:

```bash
python3 tools/dump_decrypted.py GB4-Win64-Shipping.exe   # while the game runs
python3 tools/aob.py <dump> games/GundamBreaker4/SUWSF.ini
```

## Known / not yet verified

- HUD/UI scaling and cutscene framing at 32:9 have not been formally checked.
