Gzegzolka: Is it possible to replace gog dosbox version with different one, for example dosbox-x? Or dos games from GoG are somehow additionally protected? I was thinking about playing World Rally Fever with save states.
Yes, it's possible to do that for all GOG DOS games, there's no DRM or other protection. You simply run the new dosbox-x.exe and call the game's .exe (for many simple games). Many games will work with default settings. Others are more complicated, eg, they may need to mount a fake CD-ROM drive (from a disc that's been "ripped" to an .ISO file) and for those you'd call a .conf file which points to the game (all the information you need for those is in the *single.conf file in the game's folder under the AUTOEXEC section at the bottom).
Eg, say for "The Humans" which needs a CD-ROM mounted, you'd call:-
"C:\Program Files\DOSBoxX\dosbox-x.exe" -conf "C:\GOG Games\The Humans\The Humans.conf" Then inside that .conf file at the bottom it would automatically run commands like:-
MOUNT C "C:\GOG Games\The Humans"
IMGMOUNT D "C:\GOG Games\The Humans\game.gog" -t iso
C:
HUMANS.EXE
^ GOG has already included information that games need in its *single.conf files inside the game folder and it's just a case of pointing to the location where you have the game installed. Not all games need this, but personally I prefer to create 1x .conf file per game anyway as that also lets you setup custom keyboard / controller binds per game without changing them for other games. The file for this is "mapperfile" (a .map file is where custom keybinds are stored).
The reason you may be interested in this is since you want to use DOSBox-X specifically for SaveStates and also for racing games, you can bind two spare keys / controller buttons to QuickSave & QuickLoad function. Eg, if you go into Main -> Mapper Editor and
look in the bottom right, and scroll to pages 4 and 7, you'll see "Load State" and "Save State". By default they're set to S and L, however many games use these keys. If you click on one of these, you can delete that existing S / L key then "Add" a custom key of your own (which can also be a controller button), so if you were to setup a controller to use with World Rally Fever, you could bind a "QuickSave" and "QuickLoad" to say L & R D-Pad buttons and seamlessly save / load at will whilst using a controller without having to put it down to use the keyboard to save / load in the middle of a race.