A small Python script that fixes two problems Prototype has on modern PCs:
- Resolutions capped (often at 1280x800). The game detects VRAM incorrectly.
- Low FPS while the GPU is idle. The game polls every USB/HID device in the system each frame.
It patches 40 bytes in prototypeenginef.dll, makes a backup first, and can restore the original.
Requires Python 3. Close the game first.
python prototype_patch.py "C:\Program Files (x86)\Steam\steamapps\common\Prototype"If the game is installed somewhere else, pass that folder instead. Without an argument the script uses the current folder (if the game is there) or the default Steam path above.
Options: --vram-only, --input-only, --restore.
The script checks the original bytes before writing. If they don't match (different game version), it skips that fix. Running it twice is safe.
The game reads VRAM from WMI (Win32_VideoController.AdapterRAM). Integrated GPUs report 128 MB. Cards with 4 GB or more report 0xFFF00000, which the game reads as a signed int, so it sees -1 MB. Either way you get the minimum resolution list.
The detection function (0x10861CA0) is patched to always return 2048 MB:
mov eax, 2048
retThe game calls IDirectInput8::EnumDevices with DI8DEVCLASS_ALL and creates a controller for every device, including headset buttons, RGB interfaces and so on. All of them get polled every frame.
The enumeration callback (0x106435CD) now jumps to a small filter in unused padding. Devices outside types 0x12-0x18 (mouse, keyboard, gamepads) are skipped:
movzx eax, byte ptr [edi+24h] ; dwDevType
cmp eax, 12h
jb skip
cmp eax, 18h
ja skip
add eax, -14h ; original code
jmp 0x106435D4 ; back to the game
skip:
jmp 0x10643670 ; return DIENUM_CONTINUEKeyboard, mouse and gamepads work as before.
Steam release. SHA-256 of prototypeenginef.dll:
- original:
D331BE205BDDE99897952EE88261AB7E63C5C65E36A4660E2A367886A3537071 - patched:
6065EB16B3347C81836EACBDA3DAEB1EA2420CBE194DAD9B3AA963969C2ECD63
- "Verify integrity of game files" in Steam reverts the patch.