I fixed most critical issue when loading states in Alien Carnage. Another rare situation must wait, but seems it is far enough for this game, it works well.
Edit : uploaded sources with latest fix
Please report game which wont work with states
@bruenor41, getting error while compiling your updated build in MinGW. There were some changes in my MinGW environment, but normal dosbox SVN compiles fine. Looking into drive_local.cpp, there seemed to be some major changes. Like, there was no 'localFile' Class at the start. Are you changing the main code?
1make[3]: Entering directory `/home/Administrator/r4019_sav_lin2/src/dos' 2g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/mingw/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -g -O2 -mno-ms-bitfields -MT drive_local.o -MD -MP -MF .deps/drive_local.Tpo -c -o drive_local.o drive_local.cpp 3drive_local.cpp: In member function 'virtual bool localDrive::FileCreate(DOS_File**, char*, Bit16u)': 4drive_local.cpp:58:31: error: no matching function for call to 'localFile::localFile(char*&, FILE*&)' 5 *file=new localFile(name,hand); 6 ^ 7In file included from ../../include/dos_inc.h:24:0, 8 from drive_local.cpp:27: 9../../include/dos_system.h:106:2: note: candidate: localFile::localFile(localDrive*, const char*, FILE*) 10 localFile(localDrive *drive, const char* name, FILE * handle); 11 ^~~~~~~~~ 12../../include/dos_system.h:106:2: note: candidate expects 3 arguments, 2 provided 13../../include/dos_system.h:105:2: note: candidate: localFile::localFile() 14 localFile(); 15 ^~~~~~~~~ 16../../include/dos_system.h:105:2: note: candidate expects 0 arguments, 2 provided 17../../include/dos_system.h:103:7: note: candidate: localFile::localFile(const localFile&) 18 class localFile : public DOS_File { 19 ^~~~~~~~~ 20../../include/dos_system.h:103:7: note: candidate expects 1 argument, 2 provided 21../../include/dos_system.h:103:7: note: candidate: localFile::localFile(localFile&&) 22../../include/dos_system.h:103:7: note: candidate expects 1 argument, 2 provided 23drive_local.cpp: In member function 'virtual bool localDrive::FileOpen(DOS_File**, char*, Bit32u)': 24drive_local.cpp:110:31: error: no matching function for call to 'localFile::localFile(char*&, FILE*&)' 25 *file=new localFile(name,hand); 26 ^ 27In file included from ../../include/dos_inc.h:24:0, 28 from drive_local.cpp:27: 29../../include/dos_system.h:106:2: note: candidate: localFile::localFile(localDrive*, const char*, FILE*) 30 localFile(localDrive *drive, const char* name, FILE * handle); 31 ^~~~~~~~~ 32../../include/dos_system.h:106:2: note: candidate expects 3 arguments, 2 provided 33../../include/dos_system.h:105:2: note: candidate: localFile::localFile() 34 localFile(); 35 ^~~~~~~~~ 36../../include/dos_system.h:105:2: note: candidate expects 0 arguments, 2 provided 37../../include/dos_system.h:103:7: note: candidate: localFile::localFile(const localFile&) 38 class localFile : public DOS_File { 39 ^~~~~~~~~ 40../../include/dos_system.h:103:7: note: candidate expects 1 argument, 2 provided 41../../include/dos_system.h:103:7: note: candidate: localFile::localFile(localFile&&) 42../../include/dos_system.h:103:7: note: candidate expects 1 argument, 2 provided 43drive_local.cpp: At global scope: 44drive_local.cpp:514:1: error: prototype for 'localFile::localFile(const char*, FILE*)' does not match any in class 'localFile' 45 localFile::localFile(const char* _name, FILE * handle) { 46 ^~~~~~~~~ 47In file included from ../../include/dos_inc.h:24:0, 48 from drive_local.cpp:27: 49../../include/dos_system.h:103:7: error: candidates are: localFile::localFile(localFile&&) 50 class localFile : public DOS_File { 51 ^~~~~~~~~ 52../../include/dos_system.h:103:7: error: localFile::localFile(const localFile&) 53../../include/dos_system.h:106:2: error: localFile::localFile(localDrive*, const char*, FILE*) 54 localFile(localDrive *drive, const char* name, FILE * handle); 55 ^~~~~~~~~ 56drive_local.cpp:513:1: error: localFile::localFile() 57 localFile::localFile() {} 58 ^~~~~~~~~ 59make[3]: *** [drive_local.o] Error 1 60make[3]: Leaving directory `/home/Administrator/r4019_sav_lin2/src/dos'
Yes, savestates now doesn't crash in Alien Carnage 😀 .
Obviously it doesn't work while trying to load during the start up/briefing/level loading screens, as the name of the program in dosbox title window itself changes from harry<some number> to harry5. Weird.
Diff of latest fixes/enhancements by bruenor41 against plain SVN r4019 for win32 build is attached.
The attachment bruenor41_savestate_r4019_win32_mingw.patch is no longer available
And the usual disclaimer, 'USE IT AT YOUR OWN RISK'.
Patch Instructions for new users:
1) copy the attached patch file to dosbox SVN r4019 home directory (that contains autogen.sh)
2) cd to dosbox SVN r4019 home directory in mingw/msys
3) execute command 'patch -p1 < bruenor41_savestate_r4019_win32_mingw.patch'
Diff of latest fixes/enhancements by bruenor41 against plain SVN r4019 for win32 build is attached.
Segmentation fault @ dos_files.cpp, line 1555. I compiled the binary myself but also tried the build from the first post (dosbox_r4019_SAV_Win32_bruenor_Alien_Carnage.7z) and it crashed as well.
Game: Raiden (CD-ROM version)
OS: Windows 10 64-bit
The variable file_drive had a value of 255 which obviously caused the segmentation fault when indexing the Drives array, file_name "EMMXXXX0". Something to do with EMS memory?
Last edited by zirkoni on 2017-12-09, 06:37. Edited 1 time in total.
I am trying to record footage of some really user-unfriendly games with no native save capability to be able to show the ending so I'm really hoping this will work for that use case. Thanks for all the hard work of everyone working on this feature.
Hi guys, i'm new in all of this, i wanna thanks you guys for all the work that you've done here. I was wondering if there is a version which i can try to compile on Mac.. and ask you for help because it fails when i try to build it on linux and even on windows. I don't know what im doing wrong..
Im not sure, i think that im doing it right using all that is necessary.
I got this when i try to compile it normally
1nullmodem.cpp:151:21: error: ordered comparison between pointer and zero 2 ('TCPClientSocket *' and 'int') 3 setCD(clientsocket > 0); // CD on if connection established
As per the devs' comments in this thread, change from "setCD(clientsocket > 0);" to "setCD(clientsocket != 0);"
P.S.: This thread is about DOSBox with 'savestates'. For general questions about compilation, search this forum for answers (you will most likely find something). Also check out the guide mentioned in my previous post. If still there is any issue, please open a thread in the appropriate subforum with complete details.
Last edited by gandhig on 2018-01-19, 04:23. Edited 1 time in total.
I'm sorry, i didn't see the solution and i thought it was a problem with this build which have savestates. I asked it here because i found this issue only in this version and the others work fine, my bad, thanks.
if you have some time, could you please create a Build with Zenju's xBRZ 1.6?
Many people would be grateful, It has superior amazing graphics working perfectly.
Few days ago he released on his website "DOSBox_0.74+xBRZ_1.6+Save_States", but for some reason those save states don't get written to disk and get lost as DosBox quits.
I tried to compile myself but as a newbie got stuck in too many errors