Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
feat(compat): game test runner, compatibility list and gamefix seeds
raymondchins6c400b2d038e
diff --git a/.github/ISSUE_TEMPLATE/game-report.yml b/.github/ISSUE_TEMPLATE/game-report.ymlnew file mode 100644index 0000000..b8c1b6f--- /dev/null+++ b/.github/ISSUE_TEMPLATE/game-report.yml@@ -0,0 +1,85 @@+name: Game report+description: Report how a Windows game runs under NotProton (WineHQ engine)+title: "[Game] <name> (<appid>)"+labels: ["game-report"]+body:+ - type: markdown+ attributes:+ value: |+ Run `scripts/np-test-game.sh <appid> --stop` first; it writes logs and `result.json` to `compat/runs/<appid>-<timestamp>/`. Attach that folder (zipped) below.+ - type: input+ id: name+ attributes:+ label: Game name+ validations:+ required: true+ - type: input+ id: appid+ attributes:+ label: Steam AppID+ description: The number in the store URL.+ placeholder: "1966720"+ validations:+ required: true+ - type: dropdown+ id: api+ attributes:+ label: Graphics API of the game+ description: PCGamingWiki lists it; choose Unknown if unsure.+ options: [Unknown, D3D9, D3D10, D3D11, D3D12, Vulkan, OpenGL, "D3D11 + D3D12"]+ validations:+ required: true+ - type: input+ id: anticheat+ attributes:+ label: Anti-cheat+ description: Easy Anti-Cheat, BattlEye, Vanguard, VAC, none, etc.+ placeholder: none+ - type: dropdown+ id: status+ attributes:+ label: Status+ options:+ - platinum (perfect out of the box)+ - gold (perfect after tweaks)+ - silver (playable with minor issues)+ - bronze (runs, major issues)+ - borked (does not run)+ validations:+ required: true+ - type: dropdown+ id: backend+ attributes:+ label: Backend used+ options: [dxmt, dxvk, wined3d, d3dmetal, default (no gamefix)]+ validations:+ required: true+ - type: input+ id: engine+ attributes:+ label: Engine+ placeholder: WineHQ 11.15+ validations:+ required: true+ - type: input+ id: fork_commit+ attributes:+ label: Fork commit+ description: Output of `git rev-parse --short HEAD` in your NotProton-WineHQ checkout.+ validations:+ required: true+ - type: input+ id: hardware+ attributes:+ label: Mac model and macOS version+ placeholder: MacBook Pro M3 Pro, macOS 26.0+ - type: textarea+ id: notes+ attributes:+ label: Notes+ description: What works, what breaks (black screen, crash on load, missing audio, input), settings or gamefix keys used.+ - type: textarea+ id: logs+ attributes:+ label: Logs+ description: Drag and drop the zipped `compat/runs/<appid>-<timestamp>/` folder here, or paste `result.json`.diff --git a/compat/.gitignore b/compat/.gitignorenew file mode 100644index 0000000..abdc734--- /dev/null+++ b/compat/.gitignore@@ -0,0 +1 @@+installed.jsondiff --git a/compat/README.md b/compat/README.mdnew file mode 100644index 0000000..aa8c5a2--- /dev/null+++ b/compat/README.md@@ -0,0 +1,47 @@+# Compatibility list++Generated by `scripts/compat-table.py` from `games.json`; do not edit by hand. Test with `scripts/np-test-game.sh <appid>`; report results via the *Game report* issue form.++platinum: 0 / gold: 0 / silver: 0 / bronze: 0 / borked: 3 / untested: 36++| Game | AppID | Status | Backend | Engine | API | Anti-cheat | Last tested | Fork commit | Notes |+|---|---|---|---|---|---|---|---|---|---|+| DOOM: The Dark Ages | 3017860 | borked | - | - | Vulkan | none known | - | - | Hardware ray tracing always on, Vulkan 1.3 (PCGamingWiki: ray tracing = always on; min GPU needs hardware RT); MoltenVK has no RT |+| Half-Life: Alyx | 546560 | borked | - | - | D3D11+Vulkan | none known | - | - | VR-only (PCGamingWiki: vr only = true); needs a headset and SteamVR, which this engine does not provide |+| Indiana Jones and the Great Circle | 2677660 | borked | - | - | Vulkan | none known | - | - | Hardware ray tracing always on (PCGamingWiki: ray tracing = always on, Vulkan 1.1); MoltenVK has no RT |+| 007 First Light | 3768760 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| A Way Out | 1222700 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Batman™: Arkham Knight | 208650 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Borderlands 4 | 1285190 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| DARK SOULS™ III | 374320 | untested | dxmt | - | D3D11 | none known | - | - | - |+| DEATH STRANDING DIRECTOR'S CUT | 1850570 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| Deep Rock Galactic | 548430 | untested | dxmt | - | D3D11+D3D12 | none known | - | - | - |+| DOOM Eternal | 782330 | untested | - | - | Vulkan | none known | - | - | - |+| ELDEN RING | 1245620 | untested | wined3d | - | D3D12 | Easy Anti-Cheat | - | - | - |+| Fallout 4 | 377160 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Fallout: New Vegas | 22380 | untested | dxvk | - | D3D9 | none known | - | - | - |+| Ghostrunner | 1139900 | untested | dxmt | - | D3D11+D3D12 | none known | - | - | D3D11 default, D3D12 only for RT (PCGamingWiki) |+| Hogwarts Legacy | 990080 | untested | wined3d | - | D3D12 | none known | - | - | - |+| Horizon Zero Dawn™ Complete Edition | 1151640 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| It Takes Two | 1426210 | untested | dxmt | - | D3D11 | none known | - | - | ARGS=-dx11 seeded from PCGamingWiki (API lists D3D11; flag may be redundant) |+| Lethal Company | 1966720 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Marvel's Spider-Man 2 | 2651280 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| Megabonk | 3405340 | untested | dxmt | - | D3D11+D3D12 | none known | - | - | Unity, D3D11 and D3D12 listed; default dxmt |+| Monster Hunter: World | 582010 | untested | dxmt | - | D3D11+D3D12 | none known | - | - | - |+| Mortal Kombat 1 | 1971870 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| NieR:Automata™ | 524220 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Palworld | 1623730 | untested | dxmt | - | D3D11+D3D12 | none known | - | - | - |+| Persona 5 Royal | 1687950 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Phasmophobia | 739630 | untested | dxmt | - | D3D11 | GuardingPearSoftware's Anti Cheat Pro | - | - | - |+| PowerWash Simulator 2 | 2968420 | untested | dxmt | - | D3D11 | none known | - | - | - |+| R.E.P.O. | 3241660 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Ravenswatch | 2071280 | untested | dxmt | - | unknown | none known | - | - | - |+| Resident Evil Requiem | 3764200 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| Risk of Rain 2 | 632360 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Satisfactory | 526870 | untested | - | - | D3D12+Vulkan | none known | - | - | - |+| Sekiro™: Shadows Die Twice - GOTY Edition | 814380 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Sifu | 2138710 | untested | dxmt | - | D3D11 | none known | - | - | - |+| Split Fiction | 2001120 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| The Elder Scrolls V: Skyrim Special Edition | 489830 | untested | dxmt | - | D3D11 | none known | - | - | - |+| The Last of Us™ Part I | 1888930 | untested | wined3d | - | D3D12 | none known | - | - | D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available |+| The Witcher 3: Wild Hunt — Remastered | 292030 | untested | wined3d | - | D3D12 | none known | - | - | - |diff --git a/compat/games.json b/compat/games.jsonnew file mode 100644index 0000000..b3f5a58--- /dev/null+++ b/compat/games.json@@ -0,0 +1,470 @@+[+ {+ "appid": 3768760,+ "name": "007 First Light",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1222700,+ "name": "A Way Out",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 208650,+ "name": "Batman\u2122: Arkham Knight",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1285190,+ "name": "Borderlands 4",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 374320,+ "name": "DARK SOULS\u2122 III",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1850570,+ "name": "DEATH STRANDING DIRECTOR'S CUT",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 548430,+ "name": "Deep Rock Galactic",+ "api": "D3D11+D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 782330,+ "name": "DOOM Eternal",+ "api": "Vulkan",+ "anticheat": "none known",+ "status": "untested",+ "backend": null,+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 3017860,+ "name": "DOOM: The Dark Ages",+ "api": "Vulkan",+ "anticheat": "none known",+ "status": "borked",+ "backend": null,+ "engine": null,+ "notes": "Hardware ray tracing always on, Vulkan 1.3 (PCGamingWiki: ray tracing = always on; min GPU needs hardware RT); MoltenVK has no RT",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1245620,+ "name": "ELDEN RING",+ "api": "D3D12",+ "anticheat": "Easy Anti-Cheat",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 377160,+ "name": "Fallout 4",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 22380,+ "name": "Fallout: New Vegas",+ "api": "D3D9",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxvk",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1139900,+ "name": "Ghostrunner",+ "api": "D3D11+D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "D3D11 default, D3D12 only for RT (PCGamingWiki)",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 546560,+ "name": "Half-Life: Alyx",+ "api": "D3D11+Vulkan",+ "anticheat": "none known",+ "status": "borked",+ "backend": null,+ "engine": null,+ "notes": "VR-only (PCGamingWiki: vr only = true); needs a headset and SteamVR, which this engine does not provide",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 990080,+ "name": "Hogwarts Legacy",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1151640,+ "name": "Horizon Zero Dawn\u2122 Complete Edition",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 2677660,+ "name": "Indiana Jones and the Great Circle",+ "api": "Vulkan",+ "anticheat": "none known",+ "status": "borked",+ "backend": null,+ "engine": null,+ "notes": "Hardware ray tracing always on (PCGamingWiki: ray tracing = always on, Vulkan 1.1); MoltenVK has no RT",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1426210,+ "name": "It Takes Two",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "ARGS=-dx11 seeded from PCGamingWiki (API lists D3D11; flag may be redundant)",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1966720,+ "name": "Lethal Company",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 2651280,+ "name": "Marvel's Spider-Man 2",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 3405340,+ "name": "Megabonk",+ "api": "D3D11+D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "Unity, D3D11 and D3D12 listed; default dxmt",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 582010,+ "name": "Monster Hunter: World",+ "api": "D3D11+D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1971870,+ "name": "Mortal Kombat 1",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 524220,+ "name": "NieR:Automata\u2122",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1623730,+ "name": "Palworld",+ "api": "D3D11+D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1687950,+ "name": "Persona 5 Royal",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 739630,+ "name": "Phasmophobia",+ "api": "D3D11",+ "anticheat": "GuardingPearSoftware's Anti Cheat Pro",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 2968420,+ "name": "PowerWash Simulator 2",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 3241660,+ "name": "R.E.P.O.",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 2071280,+ "name": "Ravenswatch",+ "api": "unknown",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 3764200,+ "name": "Resident Evil Requiem",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 632360,+ "name": "Risk of Rain 2",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 526870,+ "name": "Satisfactory",+ "api": "D3D12+Vulkan",+ "anticheat": "none known",+ "status": "untested",+ "backend": null,+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 814380,+ "name": "Sekiro\u2122: Shadows Die Twice - GOTY Edition",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 2138710,+ "name": "Sifu",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 2001120,+ "name": "Split Fiction",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 489830,+ "name": "The Elder Scrolls V: Skyrim Special Edition",+ "api": "D3D11",+ "anticheat": "none known",+ "status": "untested",+ "backend": "dxmt",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 1888930,+ "name": "The Last of Us\u2122 Part I",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "D3D12-only per PCGamingWiki; wined3d (vkd3d) route, d3dmetal preferred when available",+ "last_tested": null,+ "fork_commit": null+ },+ {+ "appid": 292030,+ "name": "The Witcher 3: Wild Hunt \u2014 Remastered",+ "api": "D3D12",+ "anticheat": "none known",+ "status": "untested",+ "backend": "wined3d",+ "engine": null,+ "notes": "",+ "last_tested": null,+ "fork_commit": null+ }+]diff --git a/compat/runs/.gitignore b/compat/runs/.gitignorenew file mode 100644index 0000000..d6b7ef3--- /dev/null+++ b/compat/runs/.gitignore@@ -0,0 +1,2 @@+*+!.gitignorediff --git a/gamefixes/1151640.conf b/gamefixes/1151640.confnew file mode 100644index 0000000..664f734--- /dev/null+++ b/gamefixes/1151640.conf@@ -0,0 +1,4 @@+# Horizon Zero Dawn Complete Edition (1151640)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Horizon_Zero_Dawn).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/1245620.conf b/gamefixes/1245620.confnew file mode 100644index 0000000..172847f--- /dev/null+++ b/gamefixes/1245620.conf@@ -0,0 +1,7 @@+# ELDEN RING (1245620)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Elden_Ring);+# DXMT only covers D3D10/11, so route D3D12 through wined3d (vkd3d). Use BACKEND=d3dmetal once that engine ships.+# Not translatable here: umu-protonfixes gamefixes-steam/1245620.py touches Game/DLC.bdt and Game/DLC.bhd so+# Easy Anti-Cheat accepts players without the DLC (https://github.com/Open-Wine-Components/umu-protonfixes).+# Easy Anti-Cheat (AreWeAntiCheatYet: Supported on Linux) is untested on this engine.+BACKEND=wined3ddiff --git a/gamefixes/1285190.conf b/gamefixes/1285190.confnew file mode 100644index 0000000..a1c63e7--- /dev/null+++ b/gamefixes/1285190.conf@@ -0,0 +1,4 @@+# Borderlands 4 (1285190)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Borderlands_4).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/1426210.conf b/gamefixes/1426210.confnew file mode 100644index 0000000..f86c54d--- /dev/null+++ b/gamefixes/1426210.conf@@ -0,0 +1,5 @@+# It Takes Two (1426210)+# Evidence: PCGamingWiki "Fix shader compilation stutter" documents the -dx11 command line argument for the game+# executable (https://www.pcgamingwiki.com/wiki/It_Takes_Two); the page lists Direct3D 11, so the flag may be redundant.+# BACKEND is left to default (dxmt, D3D10/11 only).+ARGS=-dx11diff --git a/gamefixes/1850570.conf b/gamefixes/1850570.confnew file mode 100644index 0000000..00e8653--- /dev/null+++ b/gamefixes/1850570.conf@@ -0,0 +1,4 @@+# Death Stranding Director's Cut (1850570)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Death_Stranding_Director%27s_Cut).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/1888930.conf b/gamefixes/1888930.confnew file mode 100644index 0000000..be9591d--- /dev/null+++ b/gamefixes/1888930.conf@@ -0,0 +1,4 @@+# The Last of Us Part I (1888930)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/The_Last_of_Us_Part_I).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/1971870.conf b/gamefixes/1971870.confnew file mode 100644index 0000000..275f1ee--- /dev/null+++ b/gamefixes/1971870.conf@@ -0,0 +1,4 @@+# Mortal Kombat 1 (1971870)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Mortal_Kombat_1).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/2001120.conf b/gamefixes/2001120.confnew file mode 100644index 0000000..12acb3c--- /dev/null+++ b/gamefixes/2001120.conf@@ -0,0 +1,4 @@+# Split Fiction (2001120)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Split_Fiction).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/2651280.conf b/gamefixes/2651280.confnew file mode 100644index 0000000..b3ae00b--- /dev/null+++ b/gamefixes/2651280.conf@@ -0,0 +1,4 @@+# Marvel's Spider-Man 2 (2651280)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Marvel%27s_Spider-Man_2).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/3764200.conf b/gamefixes/3764200.confnew file mode 100644index 0000000..b88d7e7--- /dev/null+++ b/gamefixes/3764200.conf@@ -0,0 +1,4 @@+# Resident Evil Requiem (3764200)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Resident_Evil_Requiem).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/3768760.conf b/gamefixes/3768760.confnew file mode 100644index 0000000..ca56723--- /dev/null+++ b/gamefixes/3768760.conf@@ -0,0 +1,4 @@+# 007 First Light (3768760)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/007_First_Light).+# Route D3D12 through wined3d (vkd3d); prefer BACKEND=d3dmetal once that engine ships.+BACKEND=wined3ddiff --git a/gamefixes/990080.conf b/gamefixes/990080.confnew file mode 100644index 0000000..d79faca--- /dev/null+++ b/gamefixes/990080.conf@@ -0,0 +1,5 @@+# Hogwarts Legacy (990080)+# Evidence: PCGamingWiki lists Direct3D 12 as the only Direct3D version (https://www.pcgamingwiki.com/wiki/Hogwarts_Legacy);+# DXMT only covers D3D10/11, so route D3D12 through wined3d (vkd3d). Use BACKEND=d3dmetal once that engine ships.+# No umu-protonfixes entry exists for this appid (gamefixes-steam/990080.py returns 404).+BACKEND=wined3ddiff --git a/gamefixes/README.md b/gamefixes/README.mdnew file mode 100644index 0000000..e24f15f--- /dev/null+++ b/gamefixes/README.md@@ -0,0 +1,13 @@+# gamefixes++Per-game overrides, one `<appid>.conf` per game, `KEY=VALUE` lines and `#` comments.++Allowed keys: `BACKEND` (dxmt|dxvk|wined3d|d3dmetal), `DLLOVERRIDES` (Wine syntax), `MSYNC`, `RETINA`, and+env vars starting `DXMT_`, `DXVK_`, `MVK_`, `VKD3D_`, `D3DM_`, or exactly `MTL_HUD_ENABLED`, `WINEDEBUG`,+`WINE_LARGE_ADDRESS_AWARE`, `WINE_CPU_TOPOLOGY`.++Rule: add a file only with evidence, and cite the source in a comment (PCGamingWiki page, a+umu-protonfixes `gamefixes-steam/<appid>.py`, or a test run in `compat/runs/`). Most umu-protonfixes+entries (launch arguments, file creation, winetricks) have no equivalent key here and are not seeded.+Checked 2026-10-09 against all appids in `compat/games.json`: only 782330, 1245620, 377160, 22380,+489830 have a protonfix, and none maps to the allowed keys.diff --git a/scripts/compat-table.py b/scripts/compat-table.pynew file mode 100755index 0000000..7cf1e31--- /dev/null+++ b/scripts/compat-table.py@@ -0,0 +1,37 @@+#!/usr/bin/env python3+"""Render compat/README.md (markdown table sorted by status) from compat/games.json."""+import json+import os++ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+ORDER = ["platinum", "gold", "silver", "bronze", "borked", "untested"]+++def cell(v):+ return "-" if v in (None, "") else str(v).replace("|", "\\|").replace("\n", " ")+++def main():+ games = json.load(open(os.path.join(ROOT, "compat", "games.json")))+ games.sort(key=lambda g: (ORDER.index(g.get("status", "untested")), g["name"].lower()))+ counts = {s: sum(1 for g in games if g.get("status") == s) for s in ORDER}+ lines = [+ "# Compatibility list",+ "",+ "Generated by `scripts/compat-table.py` from `games.json`; do not edit by hand. "+ "Test with `scripts/np-test-game.sh <appid>`; report results via the *Game report* issue form.",+ "",+ " / ".join(f"{s}: {n}" for s, n in counts.items()),+ "",+ "| Game | AppID | Status | Backend | Engine | API | Anti-cheat | Last tested | Fork commit | Notes |",+ "|---|---|---|---|---|---|---|---|---|---|",+ ]+ for g in games:+ lines.append("| " + " | ".join(cell(x) for x in (+ g["name"], g["appid"], g.get("status"), g.get("backend"), g.get("engine"), g.get("api"),+ g.get("anticheat"), g.get("last_tested"), g.get("fork_commit"), g.get("notes"))) + " |")+ open(os.path.join(ROOT, "compat", "README.md"), "w").write("\n".join(lines) + "\n")+++if __name__ == "__main__":+ main()diff --git a/scripts/np-inventory.py b/scripts/np-inventory.pynew file mode 100755index 0000000..f0d30a7--- /dev/null+++ b/scripts/np-inventory.py@@ -0,0 +1,65 @@+#!/usr/bin/env python3+"""Inventory installed Steam games and rate them for NotProton.++Reads ~/Library/Application Support/Steam/steamapps/appmanifest_*.acf, queries the Steam store+(native Mac?), PCGamingWiki (D3D/Vulkan, 64-bit) and AreWeAntiCheatYet (anti-cheat), writes+compat/installed.json and prints a table.+"""+import glob+import json+import os+import re+import sys++sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))+import np_lookup as L # noqa: E402++ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+STEAMAPPS = os.path.expanduser("~/Library/Application Support/Steam/steamapps")+SKIP = {228980} # Steamworks Common Redistributables+++def main():+ rows = []+ for f in sorted(glob.glob(os.path.join(STEAMAPPS, "appmanifest_*.acf"))):+ txt = open(f, encoding="utf-8", errors="replace").read()+ g = lambda k: (re.search(r'"%s"\s+"(.*)"' % k, txt) or [None, ""])[1]+ appid = int(g("appid"))+ if appid in SKIP:+ continue+ name = g("name")+ idir = os.path.join(STEAMAPPS, "common", g("installdir"))+ skip = re.compile(r"unins|crash|redist|vcredist|dxsetup|dotnet|installer|setup|eac|battleye|helper|touchup|cleanup|overlayinjector|bugsplat|bssndrpt|repair|crs-|activationui", re.I)+ exes = sorted({os.path.relpath(os.path.join(d, x), idir) for d, _, fs in os.walk(idir) for x in fs+ if x.lower().endswith(".exe") and not skip.search(x) and d[len(idir):].count(os.sep) <= 4})+ st = L.store(appid) or {}+ info = L.pcgw(appid, name)+ ac = L.awacy(appid)+ api = L.api_summary(info)+ mac = bool(st.get("mac"))+ rows.append({+ "appid": appid, "name": name, "installdir": g("installdir"),+ "exes": exes, "vr_only": bool(info and info.get("vr_only")),+ "ray_tracing": (info or {}).get("ray_tracing") or "?", "mac_native": mac, "windows": st.get("windows"),+ "api": api, "d3d_raw": info and info["d3d"], "vulkan_raw": info and info["vulkan"],+ "win64": (info or {}).get("win64") or "?",+ "anticheat": L.anticheat_text(info, ac),+ "pcgw_page": info and info["page"],+ "suggested_backend": L.suggest_backend(api, mac),+ })+ print(f" fetched {appid} {name}", file=sys.stderr)+ out = os.path.join(ROOT, "compat", "installed.json")+ os.makedirs(os.path.dirname(out), exist_ok=True)+ json.dump(rows, open(out, "w"), indent=2)+ hdr = ("appid", "name", "mac native?", "D3D/Vulkan", "64-bit", "anti-cheat", "suggested first backend")+ table = [hdr] + [(str(r["appid"]), r["name"], "yes" if r["mac_native"] else "no", r["api"], r["win64"],+ r["anticheat"], r["suggested_backend"]) for r in rows]+ w = [max(len(t[i]) for t in table) for i in range(len(hdr))]+ for i, t in enumerate(table):+ print(" | ".join(c.ljust(w[j]) for j, c in enumerate(t)))+ if i == 0:+ print("-+-".join("-" * x for x in w))+++if __name__ == "__main__":+ main()diff --git a/scripts/np-seed-games.py b/scripts/np-seed-games.pynew file mode 100755index 0000000..948b93a--- /dev/null+++ b/scripts/np-seed-games.py@@ -0,0 +1,81 @@+#!/usr/bin/env python3+"""(Re)seed compat/games.json: installed Windows-only games (from compat/installed.json) plus a+curated list of popular Windows-only DX11-era Steam games. Each candidate is verified against the+Steam store (windows && !mac). Existing entries keep status/notes/last_tested/fork_commit/engine;+only api/anticheat/name are refreshed.+"""+import json+import os+import sys++sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))+import np_lookup as L # noqa: E402++ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+GAMES = os.path.join(ROOT, "compat", "games.json")+INSTALLED = os.path.join(ROOT, "compat", "installed.json")++# Curated candidates (appid -> label used if the store lookup fails).+CURATED = {+ 1966720: "Lethal Company", 739630: "Phasmophobia", 3241660: "R.E.P.O.", 632360: "Risk of Rain 2",+ 374320: "DARK SOULS III", 814380: "Sekiro: Shadows Die Twice", 524220: "NieR:Automata",+ 1687950: "Persona 5 Royal", 582010: "Monster Hunter: World", 548430: "Deep Rock Galactic",+ 489830: "The Elder Scrolls V: Skyrim Special Edition", 377160: "Fallout 4", 292030: "The Witcher 3: Wild Hunt",+ 526870: "Satisfactory", 22380: "Fallout: New Vegas", 1245620: "ELDEN RING", 990080: "Hogwarts Legacy",+ 782330: "DOOM Eternal", 892970: "Valheim", 1623730: "Palworld",+}+++BORKED = { # appid -> reason (PCGamingWiki 'vr only' / 'ray tracing = always on')+ 546560: "VR-only (PCGamingWiki: vr only = true); needs a headset and SteamVR, which this engine does not provide",+ 2677660: "Hardware ray tracing always on (PCGamingWiki: ray tracing = always on, Vulkan 1.1); MoltenVK has no RT",+ 3017860: "Hardware ray tracing always on, Vulkan 1.3 (PCGamingWiki: ray tracing = always on; min GPU needs hardware RT); MoltenVK has no RT",+}+++def backend_for(api, native):+ b = L.suggest_backend(api, native).split()[0]+ return b if b in ("dxmt", "dxvk", "wined3d", "d3dmetal") and "Vulkan" not in api else None+++def main():+ old = {g["appid"]: g for g in json.load(open(GAMES))} if os.path.exists(GAMES) else {}+ cands = dict(CURATED)+ if os.path.exists(INSTALLED):+ for r in json.load(open(INSTALLED)):+ cands.setdefault(r["appid"], r["name"])+ out, dropped = {}, []+ for appid, label in cands.items():+ st = L.store(appid)+ if not st or not st["windows"] or st["mac"]:+ dropped.append((appid, label, "no store data" if not st else "has mac build or not windows"))+ continue+ name = st["name"] or label+ info = L.pcgw(appid, name)+ api = L.api_summary(info)+ ac = L.anticheat_text(info, L.awacy(appid))+ g = old.get(appid, {})+ if appid in BORKED and g.get("status", "untested") == "untested":+ g = dict(g, status="borked", backend=None, notes=BORKED[appid])+ out[appid] = {+ "appid": appid, "name": name,+ "api": api if api != "?" else "unknown",+ "anticheat": ac,+ "status": g.get("status", "untested"),+ "backend": g.get("backend") if g.get("status", "untested") != "untested" else backend_for(api, False),+ "engine": g.get("engine"),+ "notes": g.get("notes", ""),+ "last_tested": g.get("last_tested"),+ "fork_commit": g.get("fork_commit"),+ }+ print(f" {appid} {name}: {api} / {ac}", file=sys.stderr)+ for appid, g in old.items(): # keep hand-added entries that were not re-verified+ out.setdefault(appid, g)+ json.dump(sorted(out.values(), key=lambda g: g["name"].lower()), open(GAMES, "w"), indent=2)+ open(GAMES, "a").write("\n")+ for d in dropped:+ print("dropped", *d, file=sys.stderr)+++if __name__ == "__main__":+ main()diff --git a/scripts/np-test-batch.sh b/scripts/np-test-batch.shnew file mode 100755index 0000000..848d9d9--- /dev/null+++ b/scripts/np-test-batch.sh@@ -0,0 +1,13 @@+#!/usr/bin/env bash+# np-test-batch.sh <appid...> - run np-test-game.sh sequentially with --stop; prints a summary.+# Extra args via NP_TEST_ARGS, e.g. NP_TEST_ARGS="--seconds 60 --backend dxvk".+set -u+[ $# -gt 0 ] || { echo "usage: $0 <appid...>" >&2; exit 64; }+DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+# shellcheck disable=SC2206+EXTRA=(${NP_TEST_ARGS:-})+for id in "$@"; do+ out="$("$DIR/np-test-game.sh" "$id" "${EXTRA[@]}" --stop)"+ printf '%s\n' "$out" | jq -r '"\(.appid)\t\(.name)\t\(.backend)\t\(.verdict)\t\(.seconds_alive)s"'+ sleep 5+donediff --git a/scripts/np-test-game.sh b/scripts/np-test-game.shnew file mode 100755index 0000000..902bf00--- /dev/null+++ b/scripts/np-test-game.sh@@ -0,0 +1,216 @@+#!/usr/bin/env bash+# np-test-game.sh - launch one Steam game through NotProton, observe it, collect logs.+#+# scripts/np-test-game.sh <appid> [--seconds N] [--backend dxmt|dxvk|wined3d|d3dmetal] [--stop]+#+# Output: compat/runs/<appid>-<UTC timestamp>/ (logs, ps snapshots, result.json).+# Exit status: 0 running, 1 crashed, 2 no_launch, 64 usage/setup error.+# shellcheck disable=SC2009,SC2012,SC2015,SC2329+set -u++usage() {+ sed -n '2,7p' "$0" | sed 's/^# \{0,1\}//' >&2+ exit 64+}++APPID=""+SECONDS_MAX=90+BACKEND=""+STOP=0+STABLE=20 # seconds the exe must be seen after first sighting (extends deadline)+INTERVAL=2+CRASH_MISSES=5 # consecutive missed samples after first sighting => crashed++while [ $# -gt 0 ]; do+ case "$1" in+ --seconds) SECONDS_MAX="${2:-}"; shift 2 || usage ;;+ --backend) BACKEND="${2:-}"; shift 2 || usage ;;+ --stop) STOP=1; shift ;;+ -h|--help) usage ;;+ -*) echo "unknown option: $1" >&2; usage ;;+ *) [ -z "$APPID" ] && APPID="$1" || usage; shift ;;+ esac+done+[[ "$APPID" =~ ^[0-9]+$ ]] || usage+[[ "$SECONDS_MAX" =~ ^[0-9]+$ ]] || usage+case "$BACKEND" in ""|dxmt|dxvk|wined3d|d3dmetal) ;; *) echo "bad backend: $BACKEND" >&2; usage ;; esac+command -v jq >/dev/null || { echo "jq required" >&2; exit 64; }++REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"+SUP="$HOME/Library/Application Support"+STEAMAPPS="$SUP/Steam/steamapps"+NP="$SUP/notproton"+MANIFEST="$STEAMAPPS/appmanifest_${APPID}.acf"+[ -f "$MANIFEST" ] || { echo "app $APPID is not installed (no $MANIFEST)" >&2; exit 64; }++acf() { sed -n "s/^[[:space:]]*\"$1\"[[:space:]]*\"\(.*\)\"[[:space:]]*$/\1/p" "$MANIFEST" | head -1; }+NAME="$(acf name)"+INSTALLDIR="$STEAMAPPS/common/$(acf installdir)"+PFX="$STEAMAPPS/compatdata/$APPID/pfx"+RUNLOG="$STEAMAPPS/compatdata/$APPID/notproton-run.log"+WINELOG="$NP/launchers/$APPID/notproton-wine.log"+NPLOG="$NP/notproton.log"+FIXDIR="$NP/gamefixes"+FIX="$FIXDIR/$APPID.conf"++STARTED="$(date -u +%Y-%m-%dT%H:%M:%SZ)"+OUT="$REPO/compat/runs/${APPID}-$(date -u +%Y%m%dT%H%M%SZ)"+mkdir -p "$OUT"+WORK="$(mktemp -d)"++# ---- candidate Windows exe names (from the install dir; extended from the run log) ----+PATS="$WORK/exe-patterns"+: > "$PATS"+if [ -d "$INSTALLDIR" ]; then+ find "$INSTALLDIR" -maxdepth 2 -iname '*.exe' 2>/dev/null \+ | sed 's#.*/##' \+ | grep -Eiv 'unins|crash|redist|vcredist|dxsetup|dotnet|installer|setup|eac|battleye|helper|crs-|touchup|cleanup|overlayinjector|bugsplat|bssndrpt|repair' \+ | sort -u >> "$PATS"+fi+add_exes_from_runlog() { # $1 = file with new run-log bytes+ grep -E '^[[:space:]]*\[.*\.exe\][[:space:]]*$' "$1" 2>/dev/null \+ | sed 's/^[[:space:]]*\[//; s/\][[:space:]]*$//; s#.*[/\\]##' \+ | grep -Eiv '^(iscriptevaluator|steam|wineboot|winedevice|services|explorer)\.exe$' >> "$PATS" || true+ sort -u -o "$PATS" "$PATS"+}++# ---- gamefix backup/restore ----+WROTE_FIX=0; FIX_EXISTED=0; FIXDIR_CREATED=0; FIX_BACKUP=""+restore_fix() {+ [ "$WROTE_FIX" = 1 ] || return 0+ WROTE_FIX=0+ if [ "$FIX_EXISTED" = 1 ]; then+ cp -p "$FIX_BACKUP" "$FIX"+ else+ rm -f "$FIX"+ [ "$FIXDIR_CREATED" = 1 ] && rmdir "$FIXDIR" 2>/dev/null+ fi+}+cleanup() { restore_fix; rm -rf "$WORK"; }+trap cleanup EXIT+trap 'exit 130' INT TERM++if [ -n "$BACKEND" ]; then+ WROTE_FIX=1+ [ -d "$FIXDIR" ] || { mkdir -p "$FIXDIR"; FIXDIR_CREATED=1; }+ if [ -f "$FIX" ]; then+ FIX_EXISTED=1; FIX_BACKUP="$WORK/orig.conf"; cp -p "$FIX" "$FIX_BACKUP"+ { grep -v '^[[:space:]]*BACKEND=' "$FIX_BACKUP"; echo "BACKEND=$BACKEND"; } > "$FIX"+ else+ echo "BACKEND=$BACKEND" > "$FIX"+ fi+else+ BACKEND="$(sed -n 's/^[[:space:]]*BACKEND=//p' "$FIX" 2>/dev/null | tail -1)"+ BACKEND="${BACKEND:-default}"+fi++# ---- helpers ----+ps_game() { # print ps lines belonging to the game's wine exe+ [ -s "$PATS" ] || return 1+ ps -axww -o pid=,command= 2>/dev/null \+ | grep -iFf "$PATS" \+ | grep -i 'wine' \+ | grep -Ev 'waitforexitandrun|/bin/sh -c|np-test-game|grep ' || true+}+wine_procs() { ps -axww -o pid=,command= 2>/dev/null | grep -Ei 'wineserver|wine-preloader|/wine(64)? ' | grep -v grep || true; }+now() { date +%s; }+size_of() { [ -f "$1" ] && stat -f %z "$1" || echo 0; }+since() { # $1 file, $2 offset -> bytes after offset+ [ -f "$1" ] && tail -c +"$(( $2 + 1 ))" "$1" || true+}++if [ -n "$(ps_game)" ]; then+ echo "game exe already running under wine; run with --stop first or: scripts/np-test-game.sh $APPID --stop" >&2+ exit 64+fi+pgrep -xq steam_osx || echo "warning: Steam does not appear to be running; 'open steam://' will start it" >&2++OFF_RUN=$(size_of "$RUNLOG"); OFF_WINE=$(size_of "$WINELOG"); OFF_NP=$(size_of "$NPLOG")+T0=$(now)+echo "[$APPID] $NAME backend=$BACKEND max=${SECONDS_MAX}s -> $OUT" >&2+open "steam://rungameid/$APPID"++# ---- sample loop ----+FIRST=""; LAST=""; MISSES=0; WINE_SEEN=0; DEADLINE=$(( T0 + SECONDS_MAX )); CRASHED=0+while :; do+ sleep "$INTERVAL"+ t=$(now)+ since "$RUNLOG" "$OFF_RUN" > "$WORK/run.new"; add_exes_from_runlog "$WORK/run.new"+ [ -n "$(wine_procs)" ] && WINE_SEEN=1+ hit="$(ps_game)"+ if [ -n "$hit" ]; then+ if [ -z "$FIRST" ]; then+ FIRST=$t; echo "[$APPID] exe seen after $(( t - T0 ))s" >&2+ ps -axww -o pid=,etime=,command= > "$OUT/ps-first-seen.txt" 2>/dev/null+ [ $(( FIRST + STABLE )) -gt "$DEADLINE" ] && DEADLINE=$(( FIRST + STABLE ))+ fi+ LAST=$t; MISSES=0+ elif [ -n "$FIRST" ]; then+ MISSES=$(( MISSES + 1 ))+ if [ "$MISSES" -ge "$CRASH_MISSES" ]; then CRASHED=1; break; fi+ fi+ [ "$t" -ge "$DEADLINE" ] && break+done++# ---- collect ----+ps -axww -o pid=,etime=,command= > "$OUT/ps-end.txt" 2>/dev/null+[ -n "$(ps_game)" ] && ALIVE=true || ALIVE=false+since "$RUNLOG" "$OFF_RUN" > "$OUT/notproton-run.log"+since "$WINELOG" "$OFF_WINE" | tail -n 2000 > "$OUT/notproton-wine.log"+since "$NPLOG" "$OFF_NP" > "$OUT/notproton.log"+[ -f "$RUNLOG" ] && tail -n 200 "$RUNLOG" > "$OUT/notproton-run.tail.log"++# engine+ENGINE="$(grep -h 'state crossOver' "$NP/app.log" 2>/dev/null | tail -1 | sed -n 's/.*state crossOver \(.*\) version=.*/\1/p')"+[ -n "$ENGINE" ] || ENGINE="$(basename "$(readlink "$NP/runners/current" 2>/dev/null)" 2>/dev/null)"+[ -n "$ENGINE" ] || ENGINE=unknown++# error signatures+SIG='err:module|err:seh|err:virtual|err:d3d|err:ntdll|DXGI_ERROR|DXMT.*(error|fail)|vkd3d.*(error|fail)|Unhandled exception|wine: could not load|wine: cannot find|No such file|Bad CPU type|Assertion failed|Segmentation fault|page fault|fixme:.*not implemented|cannot open|failed to'+cat "$OUT/notproton-run.log" "$OUT/notproton-wine.log" "$OUT/notproton.log" 2>/dev/null \+ | grep -Ei "$SIG" \+ | sed -E 's/^[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9:]+Z? //; s/^[0-9a-f]{4}:(err|fixme)/\1/; s/0x[0-9a-fA-F]+/0xN/g' \+ | cut -c1-200 | sort | uniq -c | sort -rn | head -10 \+ | sed -E 's/^ *([0-9]+) (.*)$/\2 (x\1)/' > "$WORK/errors.txt"++# verdict+if [ -z "$FIRST" ]; then+ if [ -s "$WORK/errors.txt" ] && [ "$WINE_SEEN" = 1 ]; then VERDICT=crashed; else VERDICT=no_launch; fi+elif [ "$CRASHED" = 1 ] || [ "$ALIVE" = false ]; then VERDICT=crashed+else VERDICT=running; fi+if [ -n "$FIRST" ]; then SECS=$(( LAST - FIRST + INTERVAL )); else SECS=0; fi++jq -n --arg appid "$APPID" --arg name "$NAME" --arg backend "$BACKEND" --arg engine "$ENGINE" \+ --arg started "$STARTED" --argjson alive "$ALIVE" --argjson secs "$SECS" --arg verdict "$VERDICT" \+ --rawfile errs "$WORK/errors.txt" \+ '{appid:($appid|tonumber), name:$name, backend:$backend, engine:$engine, started:$started,+ alive_at_end:$alive, seconds_alive:$secs, verdict:$verdict,+ top_errors:($errs|split("\n")|map(select(length>0)))}' > "$OUT/result.json"++# restore gamefix before optional stop so a relaunch uses user config+restore_fix++# ---- stop ----+stop_game() {+ local ws=""+ ws="$(sed -n 's/^WINESERVER=//p' "$RUNLOG" 2>/dev/null | tail -1)"+ [ -x "$ws" ] || ws="$(ls -d "$NP"/engines/*/Contents/SharedSupport/CrossOver/bin/wineserver 2>/dev/null | head -1)"+ [ -x "$ws" ] || ws="$(ls "$NP"/runners/*/CrossOver/bin/wineserver "$NP"/runners/current/bin/wineserver 2>/dev/null | head -1)"+ if [ -x "$ws" ] && [ -d "$PFX" ]; then+ WINEPREFIX="$PFX" "$ws" -k 2>/dev/null || true+ sleep 2+ fi+ if [ -n "$(ps_game)" ]; then+ ps_game | awk '{print $1}' | while read -r pid; do+ cmd="$(ps -p "$pid" -o command= 2>/dev/null)"+ case "$cmd" in *steam_osx*|*Steam.app*|*steamwebhelper*) continue ;; esac+ kill "$pid" 2>/dev/null || true+ done+ fi+ echo "[$APPID] stopped" >&2+}+[ "$STOP" = 1 ] && stop_game+# always allow standalone stop when exe is up but no --stop given? no: leave running.++cat "$OUT/result.json"+case "$VERDICT" in running) exit 0 ;; crashed) exit 1 ;; *) exit 2 ;; esacdiff --git a/scripts/np_lookup.py b/scripts/np_lookup.pynew file mode 100644index 0000000..d2c7366--- /dev/null+++ b/scripts/np_lookup.py@@ -0,0 +1,127 @@+"""Shared lookups for the NotProton compat tooling (stdlib only).++Sources: Steam store appdetails (platforms), PCGamingWiki page wikitext (API / middleware+templates; its Cargo API is closed to anonymous queries), AreWeAntiCheatYet games.json.+"""+import json+import re+import time+import urllib.parse+import urllib.request++UA = {"User-Agent": "notproton-compat-tools/1.0 (+https://github.com/raymondchins/NotProton-WineHQ)"}+_last = {}+++def _get(url, host_delay=1.0):+ host = urllib.parse.urlsplit(url).netloc+ wait = _last.get(host, 0) + host_delay - time.time()+ if wait > 0:+ time.sleep(wait)+ _last[host] = time.time()+ req = urllib.request.Request(url, headers=UA)+ with urllib.request.urlopen(req, timeout=30) as r:+ return r.read().decode("utf-8", "replace")+++def store(appid):+ """-> dict(name, windows, mac, linux, type) or None when the store has no entry."""+ url = f"https://store.steampowered.com/api/appdetails?appids={appid}&filters=basic,platforms"+ try:+ d = json.loads(_get(url, 1.6)).get(str(appid), {})+ except Exception:+ return None+ if not d.get("success"):+ return None+ data = d["data"]+ p = data.get("platforms", {})+ return {"name": data.get("name"), "type": data.get("type"), "windows": bool(p.get("windows")),+ "mac": bool(p.get("mac")), "linux": bool(p.get("linux"))}+++def _mw(**params):+ params.update(format="json", formatversion="2")+ return json.loads(_get("https://www.pcgamingwiki.com/w/api.php?" + urllib.parse.urlencode(params)))+++def _field(text, label):+ m = re.search(r"^\|\s*" + label + r"\s*=([^\n]*)", text, re.I | re.M)+ return m.group(1).strip() if m else ""+++def pcgw(appid, name):+ """-> dict(page, d3d, vulkan, win64, anticheat[]) or None. Finds the page by title search+ and verifies the wikitext's `steam appid` field contains appid."""+ clean = re.sub(r"[™®©]", "", name or "").strip()+ titles = []+ for q in dict.fromkeys([clean, clean.split(":")[0], re.sub(r"\s*\(.*?\)", "", clean)]):+ if not q:+ continue+ try:+ titles += [h["title"] for h in _mw(action="query", list="search", srsearch=q, srlimit=4)["query"]["search"]]+ except Exception:+ pass+ for title in dict.fromkeys(titles):+ try:+ wt = _mw(action="parse", page=title, prop="wikitext", redirects="1")["parse"]["wikitext"]+ except Exception:+ continue+ ids = re.findall(r"\d+", _field(wt, r"steam appid") + "," + _field(wt, r"steam appid side"))+ if str(appid) not in ids:+ continue+ ac = [a.strip() for a in re.split(r",|<br\s*/?>", _field(wt, r"anticheat")) if a.strip()]+ return {"page": title, "d3d": _field(wt, r"direct3d versions"), "vulkan": _field(wt, r"vulkan versions"),+ "win64": _field(wt, r"windows 64-bit exe(?:cutable)?"), "anticheat": ac,+ "vr_only": _field(wt, r"vr only").lower() == "true",+ "ray_tracing": _field(wt, r"ray tracing").lower()}+ return None+++_awacy = None+++def awacy(appid):+ """-> (status, [anticheats]) from AreWeAntiCheatYet, or (None, [])."""+ global _awacy+ if _awacy is None:+ raw = _get("https://raw.githubusercontent.com/AreWeAntiCheatYet/AreWeAntiCheatYet/HEAD/games.json")+ _awacy = {str(g.get("storeIds", {}).get("steam")): g for g in json.loads(raw)}+ g = _awacy.get(str(appid))+ return (g["status"], g.get("anticheats", [])) if g else (None, [])+++def api_summary(info):+ """Human API string from a pcgw() result: 'D3D11', 'D3D9+D3D11', 'Vulkan', 'D3D11/Vulkan', '?'."""+ if not info:+ return "?"+ parts = []+ for v in dict.fromkeys(re.findall(r"(?<![\d.])(\d+)", info["d3d"])):+ parts.append("D3D" + v)+ if info["vulkan"].strip():+ parts.append("Vulkan")+ return "+".join(parts) if parts else "?"+++def suggest_backend(api, mac_native):+ if mac_native:+ return "native (macOS build)"+ if "D3D11" in api or "D3D10" in api:+ return "dxmt" # incl. D3D11+D3D12 titles: the main exe only imports d3d12 when D3D12-only+ if "D3D12" in api:+ return "wined3d (d3dmetal when available)"+ if "D3D9" in api:+ return "dxvk"+ if "Vulkan" in api:+ return "dxvk (MoltenVK)"+ if api != "?":+ return "wined3d"+ return "dxmt (unknown API)"+++def anticheat_text(info, awacy_res):+ s = []+ if awacy_res[1]:+ s += awacy_res[1]+ if info:+ s += [a for a in info["anticheat"] if a not in s]+ return ", ".join(s) if s else "none known"