How to install TDU1 on Linux Debian/Ubuntu and play online Platinum/Project Paradise

This worked on Debian, likely will work on Ubuntu and possibly also on other Linux systems.

Wine install Debian:

At https://wiki.winehq.org/Debian skipped to "Enable 32 bit packages"
wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo mv winehq.key /usr/share/keyrings/winehq-archive.key
Following command is applicable on Debian 11 only, other version per https://wiki.winehq.org/Debian
wget -nc https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources && sudo mv winehq-bullseye.sources /etc/apt/sources.list.d/
sudo apt update
sudo apt install --install-recommends winehq-devel
-> somehow it not installed my OS architecture 64bit, but 32bit? (Get:2 https://dl.winehq.org/wine-builds/debian bullseye/main i386 wine-devel-i386 i386 7.8~bullseye-1 [92.3 MB]) "yitianetie" said he choosen 64bit

Wine setup:

mkdir -p /home/$(whoami)/TDU && WINEPREFIX=/home/$(whoami)/TDU WINEARCH=win64 winecfg
There was a prompt: "Wine could not find a wine-mono package", so i have clicked "Install" button.
After done, Wine config window appeared which i have closed.
sudo apt-get install winetricks # or use other software to install that package
WINEPREFIX=/home/$(whoami)/TDU winetricks corefonts d3dx9 d3dcompiler_43 dxvk vkd3d
seen "Unknown arg vkd3d" (possibly my GPU does not support it or a bug)

Installing the Test Drive Unlimited 1:

A) Inserted TDU1 DVD, copied path to it and went to that directory using command:
cd /media/$(whoami)/ABCD-EFGH/
WINEPREFIX=/home/$(whoami)/TDU wine setup.exe
B) mount TDU1 .iso image:
sudo mkdir -p /mnt/iso && sudo mount "/media/$(whoami)/ABCD-EFGH/tdu1.iso" /mnt/iso -o loop
and then run the setup from the mounted path:
WINEPREFIX=/home/$(whoami)/TDU wine /mnt/iso/setup.exe
Installation seemed OK. Terminal shown some usual warnings: https://bin.disroot.org/?ff8ab984314cec4a#5Kz66VzvYwD3cq4xsvJqRw3BSKRf3MzJ Ykjc5DsphhFn

Installed the TDU 1.66A patch:
WINEPREFIX=/home/$(whoami)/TDU wine "/path/to/TDU_PC_Patch_166A.exe"
Extracted platinum pack ( https://turboduck.net/forums/topic/35843-released-test-drive-unlimited-platinum/ ) files to /home/$(whoami)/TDU/drive_c/Program Files (x86)/Atari/ replacing existing files
Platinum pack also contained Extras folder and 4gb executables. Its content i have also extracted & copied over as i have read that this fixes some issues.
cd "/home/$(whoami)/TDU/drive_c/Program Files (x86)" # it seems to be needed to be in game directory in order game to work!!!
WINEPREFIX=/home/$(whoami)/TDU
WINE_LARGE_ADDRESS_AWARE=1 wine "Atari/Test Drive Unlimited/TDU - Project Paradise Launcher.exe"
After a while and showing some usually warnings https://bin.disroot.org/?8c3a26aaabb043c6#8yqfvusZgJT5aUwp3Lr1cRf6tkunx7qT kDunucyVrfMr , it launched PPL window.
In that window i have ticked: Solo Races (H-mode), Big .bnk (vsync cause higher load on CPU i think)
And Browse to the E:\program files\Atari\Test Drive Unlimited\TestDriveUnlimited.exe
Clicked Start button. It shown: Unhandled exception has occured ... Bad EXE format for %1. - https://bin.disroot.org/?2503ec04776cf70c#7MRxEHXCMM3JfizB886HrERkzDM1gsU6 43RsTAyvZCc8
I clicked Continue. It not launched the game, PPL window stays, last lines of terminal are https://bin.disroot.org/?9deeaa31d6ecb870#GDsF3m8SsC9mJZDVKoNgyh48FVaqmoLD WAUWFRHf5ZBn
After i have tried to select TestDriveUnlimited.exe from H: drive, then the message was:
01a8:err:module:import_dll Library binkw32.dll (which is needed by L"H:\\program files\\Atari\\Test Drive Unlimited\\TestDriveUnlimited.exe") not found
01a8:err:module:LdrInitializeThunk Importing dlls for L"H:\\program files\\Atari\\Test Drive Unlimited\\TestDriveUnlimited.exe" failed, status c0000135
Then i have tried to browse for TestDriveUnlimited.exe in Z: drive and that worked (/home/$(whoami)/TDU/drive_c/Program Files (x86)/Atari/...).
Entered the serial key
Entered nickname, confirmed, New game, things working, a wine bug with missing bridges over water was fixed. Game is not much fluent a bit freezing (make sure no other apps are running?).
After selecting to quit game, game was stuck, black screen. Alt+F4 closed it.

So when i want to launch the game, then i can
A) run this long command (or placing it to a file which i will then execute "bash filename":
cd "/home/$(whoami)/TDU/drive_c/Program Files (x86)/Atari/Test Drive Unlimited/" && WINEPREFIX=/home/$(whoami)/TDU WINEARCH=win64 WINEDEBUG=-all,+d3d WINE_LARGE_ADDRESS_AWARE=1 wine "/path/to/TDU/drive_c/Program Files (x86)/Atari/Test Drive Unlimited/TDU - Project Paradise Launcher.exe"
B) creating shortcut in the programs menu. Command:
WINEPREFIX="/home/$(whoami)/TDU" WINE_LARGE_ADDRESS_AWARE=1 /usr/bin/wine "/home/$(whoami)/TDU/TDU/drive_c/Program Files (x86)/Atari/Test Drive Unlimited/TDU - Project Paradise Launcher.exe"
Work path (important, else game does not launch!!):
/home/$(whoami)/TDU/drive_c/Program Files (x86)/Atari/Test Drive Unlimited

It was suggested that following may improve game performance, but i have not seen FPS improvement, rather seemsed a bit worse, but hard to say.:
sudo apt install gamemode && echo "gamemode-simulate-game should end with no error in like 10 seconds:" && gamemode-simulate-game
And then prefix the wine command with "gamemode" in TDU startup command shown above., like "... WINE_LARGE_ADDRESS_AWARE=1 gamemode /usr/bin/wine "/home/$(whoami)..."


Now i will try to setup Xbox One gamepad. I am in the middle of the task.