Libre-SAMP: experimental drop-in replacement for the SA-MP 0.3.7-R5
samp.dll.
Runtime traces, original DLL reverse engineering, open.mp compatibility work, and an ASI probe for reproducible client-side instrumentation.
git clone --recurse-submodules https://github.com/Knogle/libsamp
cd libsamp
reimpl/scripts/build_win32.sh
tools/asi_probe/build_win32.shBuild outputs:
build-win32/samp.dllbuild-asi-probe/samp_probe.asi
The build ships the vendored Knogle/RakNet submodule as the SA-MP/open.mp-compatible network transport source.
Use this only with local development servers and controlled test environments. It is not a cheat, bypass, or public-server abuse toolkit.
libsamp, written out as Libre-SAMP, targets one concrete artifact: a compatible
drop-in replacement for the SA-MP 0.3.7-R5 client samp.dll.
The short-term runtime still expects an existing GTA San Andreas installation with the SA-MP client files installed by the normal SA-MP installer. This repository does not ship proprietary client assets, game files, or a complete client distribution. The goal is to replace the DLL in that existing install while preserving protocol and runtime compatibility with 0.3.7-compatible servers, including open.mp compatibility paths.
The project is driven by observed behavior from the original DLL, ASI probe golden traces, and public engine/protocol references. Proprietary binaries, game assets, and local reverse-engineering workspaces are intentionally not part of this repository.
This is not feature-complete. The current network-enabled development milestone can connect, enter the gameplay state on tested local servers, handle chat/dialog flows, spawn the local player, create vehicles, show core HUD/UI elements, and render a growing subset of TextDraw behavior.
Known active work areas:
- Remote player sync, interpolation, nametags, and radar blips.
- Full RPC coverage with safe stubs and bounds-checked payload readers.
- SA-MP custom object loading and material handling.
- TextDraw parity for model previews, sprites, spacing, selection, and alpha.
- Vehicle sync details such as components, lock state, objective markers, and streaming budget.
- CI parity checks once public reference fixtures are available.
See repo/TASK_TRACKER.md for the current task tracker.
Current development snapshots from local compatibility runs:
- Win32
samp.dlldrop-in rebuild with PE/export compatibility tracking. - Vendored Knogle/RakNet transport path for SA-MP/open.mp-oriented networking.
- Runtime bridge for GTA-SA state, UI, dialogs, chat, TextDraws, vehicles, and basic world state.
- ASI probe included under tools/asi_probe for repeatable instrumentation and golden trace collection.
- Evidence-tagged documentation model:
OBSERVED_037,PROBE_TRACE,STATIC_037,OPENMP_REF,GTA_REVERSED_REF,INFERRED, andTODO_VERIFY.
On Linux, install:
- CMake
- Ninja
- MinGW-w64 i686 GCC/G++
- Git submodule support
Fedora example:
sudo dnf install cmake ninja-build mingw32-gcc mingw32-gcc-c++Debian/Ubuntu example:
sudo apt-get install cmake ninja-build gcc-mingw-w64-i686 g++-mingw-w64-i686git submodule update --init --recursive
reimpl/scripts/build_win32.shThis is the same public CI-style build used by GitHub Actions. It verifies the DLL surface, runtime bridge, and vendored RakNet-backed network path without depending on local-only reference workspaces.
tools/asi_probe/build_win32.shThe probe builds to build-asi-probe/samp_probe.asi and is loaded by a normal
ASI loader from the game root or an ASI loader search path.
The repository contains a CI workflow at .github/workflows/build.yml. It builds:
samp.dllsamp_probe.asiSHA256SUMS.txt
The CI artifact build intentionally avoids proprietary inputs and local-only reference paths. Runtime parity still depends on golden-trace verification.
- Task tracker
- Publication checklist
- Reverse-engineering evidence guide
- TextDraw render stack notes
- Custom asset pipeline notes
- ASI probe README
This project is for compatibility research, local testing, and preservation of 0.3.7-compatible client behavior. Do not use it to cheat, evade bans, bypass server protections, or disrupt public servers.
Server-provided data is treated as untrusted. New RPC handlers should be bounds-checked, fail closed, and log unknown behavior before implementing unverified semantics.
Libre-SAMP is licensed under the MIT License. See LICENSE.
Third-party components and generated asset provenance are documented in NOTICE.md. The repository MIT License does not relicense third-party submodules.
- SA-MP and GTA-SA modding communities for protocol and engine knowledge.
- open.mp for public server-side compatibility references.
- gta-reversed for public GTA-SA engine research.
- Ultimate ASI Loader and related tooling for the ASI plugin ecosystem.




