3.7 KiB
Build Toolchains For RetroNFS95
There are two different build problems:
-
Win32 user-mode pieces:
bin/retronfs95.exeprovider/RETRONP.DLLmounter/RetroMap95.exe
-
Win95/98 ring-0 VxD:
vxd/RETROVXD.VXD
Do not use one modern default Windows compiler for everything. Modern MinGW and MSVC builds often import APIs or CRT startup code that Windows 95/98 cannot load.
Recommended Setup
User-Mode EXE/DLL
Best options:
- old MinGW 3.x/4.x targeting
msvcrt - MinGW Lite with a Win95/98 profile
- Open Watcom v2 targeting Win32
Avoid:
- UCRT builds
- x86_64 builds
- binaries that depend on APIs newer than Win98
For the current Makefiles, a suitable MinGW command set is:
mingw32-g++ --version
or, on Linux:
i586-mingw32msvc-g++ --version
i686-w64-mingw32-g++ --version
The safest CRT target is old msvcrt.dll, not UCRT.
VxD
Best options:
-
Windows 98 DDK in a Windows 98/2000/XP VM
- most historically accurate
- least surprise
-
Linux cross build with:
- Open Watcom v2
- JWasm/UASM
- Windows 98 DDK headers/libs/includes
- custom linker command file
Open Watcom's linker has VxD output support, but VxD builds still depend on DDK headers, segment layout, control procedure glue, and import definitions.
Practical Recommendation
Use two build environments:
Linux host
builds and tests portable NFS core
builds Win32 EXE/DLL if MinGW-Lite or old MinGW is installed
Win98/XP VM with Win98 DDK
builds RETROVXD.VXD
tests driver loading and IFSMgr behavior
This avoids spending days fighting linker/segment issues before the redirector logic itself is working.
Linux Package Names To Look For
Depending on distribution:
openwatcom-v2
jwasm or uasm
mingw-w64-i686
wine
dosbox-x
qemu-system-i386
For true Win95 compatibility, prefer a dedicated Win95/98-capable MinGW build over a modern distro default.
Suggested Build Order
- Build portable NFS core:
make -f Makefile.posix
- Build Win32 mapping app and provider:
tools/build-win32-mingw.sh
The script rebuilds retronfs95.exe, RetroMap95.exe, and RETRONP.DLL,
then refreshes dist/RetroNFS95-win32-artifacts.zip and
dist/SHA256SUMS.txt.
- Build VxD in DDK environment:
cd vxd
build
or with an Open Watcom/JWasm cross setup once DDK includes are available:
tools/build-vxd-watcom.sh /path/to/win98ddk
The script prefers jwasm when available and assembles the control stub with
MASM-compatible options:
jwasm -nologo -c -omf -Cp -Zm -3p -I/path/to/win98ddk/inc ...
-Cp preserves symbol case, -Zm enables MASM compatibility, and -omf is the
default because Open Watcom wlink expects OMF objects for this VxD flow. COFF
can be tested explicitly:
VXD_OBJ_FORMAT=coff tools/build-vxd-watcom.sh /path/to/win98ddk
The VxD build enables the real IFSMgr registration service call by default:
make -C vxd VXD_IFSMGR_REGISTER=real
For safer load/debug cycles where the FSD entry should only be prepared and
reported through /status, use:
make -C vxd VXD_IFSMGR_REGISTER=prepared
The Linux DDK include tree may contain both uppercase and lowercase copies such
as VMM.INC and vmm.inc. The current vxd/retroctrl.asm avoids that macro
path completely: it carries the small DDB/control-dispatch subset needed by
RetroNFS95, because the stock Win98 DDK vmm.inc MakeCodeSeg macro uses old
MASM concatenation syntax that JWasm rejects.
That script is still not a substitute for a real Win95/98 test machine. It
builds a loadable-format RETROVXD.VXD; runtime loading, MPR interaction, and
IFSMgr file-operation dispatch still need to be tested and completed under
Windows 95/98.