Cross-platform wrapper for the Need For Speed™ II SE game with 3D acceleration and TCP protocol!
Don't forget to update submodules:
git submodule update --init --recursive
gl1
argument to compilation script.gles2
argument to compilation script.$CC
environment variable),root
):
dpkg --add-architecture i386
apt-get update
apt-get install libsdl2-dev:i386 gcc-multilib yasm
compile_nfs
script, modify what do you want. Compile the game by executing the script - it will automatically generate executable file inside Need For Speed II SE
directory:
./compile_nfs
- native compilation for Unix-like systems (Linux, macOS up to Mojave, ...),./compile_nfs win32
- cross compilation for Windows (on Arch Linux install: mingw-w64-gcc
and mingw-w64-sdl2
from AUR).One way is to use WSL (Windows Subsystem for Linux) and install mingw-w64
which cross-compiles to Windows
sudo apt install mingw-w64
also gcc-multilib
might be needed to be installed using
sudo apt install gcc-multilib
Don't install SDL using apt-get, instead take it from their official repo packages page, get the package with mingw suffix
Inside the package folder you should use the one called i686-w64-mingw32
Either copy the include, bin, lib, share
to your system files (not recommended) or you can modify the following lines in the file compile_nfs
:
On line 27 with:
C_FLAGS="$COMMON_FLAGS -O2 $CPU_FLAGS"
add before the last quotation mark -I/path/to/include/folder
so that it becomes:
C_FLAGS="$COMMON_FLAGS -O2 $CPU_FLAGS -I/path/to/include/folder"
On line 23 add the same include directory paramter before the quote
On line 39 which has:
i686-w64-mingw32-ld --enable-stdcall-fixup -o "../Need For Speed II SE/nfs2se.exe" *.o --stack=0x7D00,0x7D00 --heap=0x2000,0x1000 -lws2_32 -lwinmm -lmingwex -lmsvcrt -lkernel32 -lopengl32 -lSDL2 -lSDL2main -lSDL2_test -subsystem=$WIN_SUBSYSTEM $STRIP -e _start &&
After the -lSDL2_test
add -L/path/to/lib/folder/
Now the command ./compile_nfs win32
should work fine
If you try to run the exe, windows will say the dll is missing so you should get it from the same SDL packages link
but this time the package for win32-x86
Copy the dll you get from decompressing the zip file and put it in the same directory as the game's exe file
Now if you follow the other steps (of copying game data and dealing with possible errors explained futher), it should work fine
./compile_nfs cpp
ANDROID_HOME
and ANDROID_NDK_HOME
,SDL2-*
directory into src/Android/app/jni/SDL
,./compile_nfs android
or ./compile_nfs android install
.fedata
and gamedata
directories from the Need For Speed™ II SE original CD-ROM into Need For Speed II SE
directory.fedata/pc/text/text.*
, because TCP version uses new files in root directory.Need For Speed II SE/convert_to_lowercase
script if you have UPPERCASE names.install.win
file (with text editor which doesn't modify last line or line edings!) and change the first line. Leave 4nn
as is and modify only language name. Possible languages are:
~/.nfs2se
(%AppData%\.nfs2se
on Windows). At the first run, the nfs2se.conf.template
will be copied there. You can modify the file if you want to configure the game. On Windows, you can use open_config.bat
to open the config file in notepad.gamedata
, fedata
, install.win
, text.*
, nfs2se.conf
(rename nfs2se.conf.template
to nfs2se.conf
) into /sdcard/NFSIISE
or /storage/emulated/0/NFSIISE
(create NFSIISE
directory first).nfs2se-win32-v1.4.0.zip
under Releases), unpack it,fedata
and gamedata
directories into Need For Speed II SE
directory,Need For Speed II SE
directory create new file autorun.cmd
with content CMD=nfs2se.exe
,Need For Speed II SE
to Need For Speed II SE.pc
,Need For Speed II SE.pc
into your Batocera Linux directory /userdata/roms/windows/
,START
and go to GAME SETTINGS
→ UPDATE GAMELISTS
, the game is listed under Windows
section and will be successfully emulated via Winenfs2se-git
.xgamma -gamma 1.0
.