Read this First: DON'T pester the dosbox authors about the addition of 'savestate' feature in official/SVN dosbox. It is a humble request, to especially the newbies. THANKS.

Thanks to ZenJu, tikalat, ykhwong and of course, all the dosbox authors, here is an alpha version of Dosbox SVN r4019 with savestates(patches taken from this thread), built statically(with few shared dependencies) for debian 32 bit linux systems(tested on lubuntu only) as well as for windows.

Purists & old-timers(including myself) may please forgive.

Summary:

1) diff uploaded by tikalat against Dosbox SVN 3782(patch-005) was used as a base.

2) Added/removed certain data/data structs/POD's by comparing them between r3782 and r4007. Adapted to r4019 later without further changes.

3) Under Dos Files, "LPT1" was needed in addition to "CON", "PRN" & "AUX" checks. Probably it was fixed by tikalat in his later patches to daum build.

4) Save/Load to/from Disk code copied from latest Daum build.

5) Aim is to reach the savestates compatibility level of tikalat's 'savestate patch 005' to SVN r3782 build

Tested games (i.e. no regular crash 🤣):

a) Lure of the Temptress

b) XCOM UFO Defense

c) Turrican II

d) GP2 99 by Microprose

e) Wacky wheels (Thanks to bruenor41)

f) Dangerous dave 2 in the haunted mansion (Thanks to bruenor41)

g) Fallout 1 (Thanks to bruenor41)

h) Bio Menace (Thanks to bruenor41)

i) Might & Magic 1 (Thanks to bruenor41)

Issues/Fix needed/To Do:

Copy code to clipboard 1 a) GP2 throws segmentation fault just after loading the saves. Issue was not observed in the buid of SVN 3782(with tikalat's savestate-005 patch applied). Got fixed automatically in SVN r4019.

2 b) May not work with Dune as 'opl3gold' mode not added yet. Not sure if it is required or that it will crash, as Dune is not available with me.

3 c) There maybe code regression due to certain new or replaced data/POD's in r4019 w.r.t r3782.

4 d) Compile win32 build - Completed.

5 e) Add MUNT support - Dropped

6 f) etc.



Note:

1) Intentionally no code was added 🤣 to the main SVN source.

2) Dosbox SVN source/diff added in posts below

3) Those who download the build are requested to run it first in a virtual environment, if possible, to avoid hard crashes.

Shortcut Keys:

Left ALT + F5 -> Save to current slot

Left ALT + F9 -> Load state from current slot

Left ALT + F6 -> Switch to previous slot

Left ALT + F7 -> Switch to next slot

Total saveslots : 10 (Slots in circular arrangement)

Edit: Old r4007 based builds removed. bruenor41's fixed builds added on 14.09.17. Alien Carnage specific build (win32) of bruenor41 added on 11.10.17