Dosbox SVN r4019 + savestates Build (Alpha)

Here you can discuss the development of patches.

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
You do not have the required permissions to view the files attached to this post.
bruenor41
Newbie
 
Posts: 16
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: 348
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: 16
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: 348
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.
You do not have the required permissions to view the files attached to this post.
bruenor41
Newbie
 
Posts: 16
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: 348
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: 105
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: 348
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


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'
You do not have the required permissions to view the files attached to this post.
User avatar
gandhig
Member
 
Posts: 348
Joined: 2014-2-12 @ 08:35

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby zirkoni » 2017-12-07 @ 16:22

gandhig wrote: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.
User avatar
zirkoni
Member
 
Posts: 168
Joined: 2014-7-17 @ 08:54

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby bruenor41 » 2017-12-07 @ 20:33

Thank you, I can check it in next days.

EDIT:
Ok, I think I fixed that (I hope). Will post patch and linux binaries later.

To fix that, update dos_files.cpp add line :
if( strcmp( Files[lcv]->GetName(), "EMMXXXX0" ) == 0 ) break;//raiden needs this
below
if( strcmp( Files[lcv]->GetName(), "AUX" ) == 0 ) break;

and
if( strcmp( Files[lcv]->GetName(), "EMMXXXX0" ) == 0 ) file_valid = 0xfe;//raiden needs this
below
if( strcmp( Files[lcv]->GetName(), "AUX" ) == 0 ) file_valid = 0xfe;

you need create new save state
bruenor41
Newbie
 
Posts: 16
Joined: 2013-4-22 @ 08:58

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby zirkoni » 2017-12-11 @ 15:15

Yes, save states work in Raiden now. :cool:
Thanks.
User avatar
zirkoni
Member
 
Posts: 168
Joined: 2014-7-17 @ 08:54

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby BenMcLean » 2018-1-16 @ 00:04

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.
BenMcLean
Newbie
 
Posts: 2
Joined: 2015-11-05 @ 22:06

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby gandhig » 2018-1-16 @ 05:20

Please do use builds(3rd or 4th in the first post) that have enhancements/fixes by bruenor41.

I will have to edit(if possible, (EDIT:done)) the sequence of the builds, later.

Which are the games that you intend to record?

P.S. AFAIK, only bruenor41 is working on this feature, presently.

EDIT: Sequence of the builds in the first post has been modified to reflect bruenor41's enhanced builds at the top.
Last edited by gandhig on 2018-1-19 @ 17:58, edited 1 time in total.
User avatar
gandhig
Member
 
Posts: 348
Joined: 2014-2-12 @ 08:35

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby Mr_Irony » 2018-1-17 @ 15:59

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..
Mr_Irony
Newbie
 
Posts: 5
Joined: 2018-1-13 @ 18:53

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby gandhig » 2018-1-18 @ 01:27

I haven't tried compiling on Mac. But compilation shouldn't be problematic under Linux or Windows.

Please provide more details about your compilation environment, steps and errors.

Are you following any guide for compilation?
User avatar
gandhig
Member
 
Posts: 348
Joined: 2014-2-12 @ 08:35

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby Mr_Irony » 2018-1-18 @ 14:15

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
Code: Select all
nullmodem.cpp:151:21: error: ordered comparison between pointer and zero
      ('TCPClientSocket *' and 'int')
        setCD(clientsocket > 0); // CD on if connection established


and that
Code: Select all
make[4]: *** [nullmodem.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


This happens when i try to compile it on mac and linux, on windows with mingw i've got a different error.

I would try to compile it with emscripten, is it possible right? I'm getting error even on that..
Mr_Irony
Newbie
 
Posts: 5
Joined: 2018-1-13 @ 18:53

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby gandhig » 2018-1-18 @ 15:26

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-1-19 @ 04:23, edited 1 time in total.
User avatar
gandhig
Member
 
Posts: 348
Joined: 2014-2-12 @ 08:35

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby Mr_Irony » 2018-1-18 @ 16:10

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.
Mr_Irony
Newbie
 
Posts: 5
Joined: 2018-1-13 @ 18:53

Re: Dosbox SVN r4019 + savestates Build (Alpha)

Postby ice700 » 2018-2-22 @ 11:46

well done gandhig! Works very well!

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
ice700
Newbie
 
Posts: 2
Joined: 2018-2-22 @ 11:32

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 0 guests