needs
Tool
tools/triage/needs.py(program, Triage). List what a game needs to run: CPU features, operating system, graphics and sound APIs, libraries, extenders, DRM and media, each with its evidence.
Run it with ./gameframe run needs ARGS or python3 tools/triage/needs.py. Source on GitHub.
Its own help
This is the help text in the tool itself, as ./gameframe tool needs prints it.
text
List what a game needs to run: CPU features, operating system, graphics and sound APIs,
libraries, extenders, DRM and media, each with its evidence.
Usage: needs.py PATH ... [--json] [--no-cpu] [--max-files N]
PATH an executable or DLL (PE, NE, LE/LX or DOS MZ), a game's folder, or a disc image
(.cue, .bin or .iso, read in place through tools/disc)
--json print the needs as JSON: [{"need": "api:glide2", "evidence": ["GAME.EXE imports
glide2x.dll"]}, ...]
--no-cpu skip the scan of the code for MMX, 3DNow!, SSE and AVX instructions (the slow part)
--max-files read at most N executables (default 200)
A need is `kind:value`: cpu:mmx, os:windows-9x, os:windows-3x, os:os2, os:dos, api:glide2,
api:directdraw, api:xaudio2, lib:miles, extender:dos4gw, drm:steam, drm:steamstub,
drm:safedisc, store:gog-galaxy, media:cd-check, and so on. The signs and their needs are in
needs_signs.py. tools/live/harness.py reads this list and picks a module for each need.
It reads imports, the PE subsystem version, the NE target OS byte, section names, file names,
a few strings, and (for CPU features) every instruction of the code sections with capstone.
What it does not do: prove a need. An import shows the program can use an API, not that the
build you run does; a CPU feature found in the code may sit on a path that checks the CPU
first (re-vectoriser). Read each need as a lead, and confirm it by running the game.