Dosbox SVN r4019 + savestates Build (Alpha)

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby bruenor41 » 2017-10-03 @ 12:21

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
Attachments
dosbox_savestates_r4019.zip
(2.56 MiB) Downloaded 11 times
bruenor41
Newbie
 
Posts: 11
Joined: 2013-4-22 @ 08:58

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby gandhig » 2017-10-05 @ 18:35

Thanks bruenor41. Is this a general fix/improvement or specific to this game only?

I will update the build in the first post this weekend.
User avatar
gandhig
Member
 
Posts: 329
Joined: 2014-2-12 @ 08:35

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby bruenor41 » 2017-10-06 @ 04:27

This is fix for specific situation, which happens in alien carnage, but it is written like a general fix, so possible it fixes other games.
bruenor41
Newbie
 
Posts: 11
Joined: 2013-4-22 @ 08:58

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby gandhig » 2017-10-08 @ 19:33

@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?

Code: Select all
make[3]: Entering directory `/home/Administrator/r4019_sav_lin2/src/dos'
g++ -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
drive_local.cpp: In member function 'virtual bool localDrive::FileCreate(DOS_File**, char*, Bit16u)':
drive_local.cpp:58:31: error: no matching function for call to 'localFile::localFile(char*&, FILE*&)'
  *file=new localFile(name,hand);
                               ^
In file included from ../../include/dos_inc.h:24:0,
                 from drive_local.cpp:27:
../../include/dos_system.h:106:2: note: candidate: localFile::localFile(localDrive*, const char*, FILE*)
  localFile(localDrive *drive, const char* name, FILE * handle);
  ^~~~~~~~~
../../include/dos_system.h:106:2: note:   candidate expects 3 arguments, 2 provided
../../include/dos_system.h:105:2: note: candidate: localFile::localFile()
  localFile();
  ^~~~~~~~~
../../include/dos_system.h:105:2: note:   candidate expects 0 arguments, 2 provided
../../include/dos_system.h:103:7: note: candidate: localFile::localFile(const localFile&)
 class localFile : public DOS_File {
       ^~~~~~~~~
../../include/dos_system.h:103:7: note:   candidate expects 1 argument, 2 provided
../../include/dos_system.h:103:7: note: candidate: localFile::localFile(localFile&&)
../../include/dos_system.h:103:7: note:   candidate expects 1 argument, 2 provided
drive_local.cpp: In member function 'virtual bool localDrive::FileOpen(DOS_File**, char*, Bit32u)':
drive_local.cpp:110:31: error: no matching function for call to 'localFile::localFile(char*&, FILE*&)'
  *file=new localFile(name,hand);
                               ^
In file included from ../../include/dos_inc.h:24:0,
                 from drive_local.cpp:27:
../../include/dos_system.h:106:2: note: candidate: localFile::localFile(localDrive*, const char*, FILE*)
  localFile(localDrive *drive, const char* name, FILE * handle);
  ^~~~~~~~~
../../include/dos_system.h:106:2: note:   candidate expects 3 arguments, 2 provided
../../include/dos_system.h:105:2: note: candidate: localFile::localFile()
  localFile();
  ^~~~~~~~~
../../include/dos_system.h:105:2: note:   candidate expects 0 arguments, 2 provided
../../include/dos_system.h:103:7: note: candidate: localFile::localFile(const localFile&)
 class localFile : public DOS_File {
       ^~~~~~~~~
../../include/dos_system.h:103:7: note:   candidate expects 1 argument, 2 provided
../../include/dos_system.h:103:7: note: candidate: localFile::localFile(localFile&&)
../../include/dos_system.h:103:7: note:   candidate expects 1 argument, 2 provided
drive_local.cpp: At global scope:
drive_local.cpp:514:1: error: prototype for 'localFile::localFile(const char*, FILE*)' does not match any in class 'localFile'
 localFile::localFile(const char* _name, FILE * handle) {
 ^~~~~~~~~
In file included from ../../include/dos_inc.h:24:0,
                 from drive_local.cpp:27:
../../include/dos_system.h:103:7: error: candidates are: localFile::localFile(localFile&&)
 class localFile : public DOS_File {
       ^~~~~~~~~
../../include/dos_system.h:103:7: error:                 localFile::localFile(const localFile&)
../../include/dos_system.h:106:2: error:                 localFile::localFile(localDrive*, const char*, FILE*)
  localFile(localDrive *drive, const char* name, FILE * handle);
  ^~~~~~~~~
drive_local.cpp:513:1: error:                 localFile::localFile()
 localFile::localFile() {}
 ^~~~~~~~~
make[3]: *** [drive_local.o] Error 1
make[3]: Leaving directory `/home/Administrator/r4019_sav_lin2/src/dos'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Administrator/r4019_sav_lin2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Administrator/r4019_sav_lin2'
make: *** [all] Error 2
Last edited by gandhig on 2017-10-11 @ 13:26, edited 1 time in total.
User avatar
gandhig
Member
 
Posts: 329
Joined: 2014-2-12 @ 08:35

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby bruenor41 » 2017-10-08 @ 19:41

Updated sources and added linux build.
Attachments
dosbox.zip
linux build
(836.66 KiB) Downloaded 6 times
r4019_savestates.zip
Updated sources
(3.24 MiB) Downloaded 12 times
bruenor41
Newbie
 
Posts: 11
Joined: 2013-4-22 @ 08:58

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby gandhig » 2017-10-11 @ 13:25

Yes, savestates now doesn't crash in Alien Carnage :happy: .
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.

Win32 build added in first post.
User avatar
gandhig
Member
 
Posts: 329
Joined: 2014-2-12 @ 08:35

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby SedrynTyros » 2017-11-01 @ 13:31

Any chance of getting an updated diff with the latest improvements?
User avatar
SedrynTyros
Member
 
Posts: 103
Joined: 2012-7-24 @ 21:44

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby gandhig » 2017-11-01 @ 18:34

Do you mean the latest improvements/fixes of bruenor41 applied to r4019 or latest DOSBox SVN?

In any case you may have to wait till the end of weekend, unless someone is willing to do it.
User avatar
gandhig
Member
 
Posts: 329
Joined: 2014-2-12 @ 08:35

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby gandhig » 2017-11-06 @ 18:28

Diff of latest fixes/enhancements by bruenor41 against plain SVN r4019 for win32 build is attached.

bruenor41_savestate_r4019_win32_mingw.patch
Diff against DOSBox SVN r4019 for savestate patch (Win32 MinGW) based on patches from ZenJu & tikalat with ykhwong's slot load/save code and further fixes/enhancements by bruenor41 (posted on 09-Oct-17)
(422.27 KiB) Downloaded 4 times


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'
User avatar
gandhig
Member
 
Posts: 329
Joined: 2014-2-12 @ 08:35

Previous

Return to DOSBox Development

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests