Save States - Proof of concept

Here you can discuss the development of patches.

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-25 @ 11:46

The same named method one line above in the constructor works

Are you overloading? Or maybe i need a cast?
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-25 @ 11:48

This is the whole thing. There are some warnings, maybe i need to fix those somehow first?
paulo@AIVAS:~/Desktop/dosbox/dosbox-0.74$ ./configure && make
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking SDL version only being 1.2.X... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of unsigned char... 1
checking size of unsigned short... 2
checking size of unsigned int... 4
checking size of unsigned long... 8
checking size of unsigned long long... 8
checking size of int *... 8
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for pwd.h... yes
checking if environ can be included... yes
checking if environ can be linked... yes
checking if dirent includes d_type... yes
checking for powf in libm... yes
checking if compiler allows __attribute__... yes
checking if compiler allows __attribute__((always_inline)) ... yes
checking if compiler allows __attribute__((fastcall)) ... no
checking if compiler allows __builtin_expect... yes
checking for ALSA CFLAGS...
checking for ALSA LDFLAGS... -lasound -lm -ldl -lpthread
checking for libasound headers version >= 0.9.0... found.
checking for snd_ctl_open in -lasound... yes
checking whether byte ordering is bigendian... no
checking for target cpu type... x86-64 bit compatible
checking whether x86 dynamic cpu core will be enabled... no
checking whether recompiling cpu core will be enabled... yes
checking whether fpu emulation will be enabled... yes
checking whether x86 assembly fpu core will be enabled... no
checking whether to enable unaligned memory access... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_get_io_ptr in -lpng... yes
checking SDL_net.h usability... yes
checking SDL_net.h presence... yes
checking for SDL_net.h... yes
checking for SDLNet_Init in -lSDL_net... yes
checking for main in -lX11... yes
checking X11/XKBlib.h usability... yes
checking X11/XKBlib.h presence... yes
checking for X11/XKBlib.h... yes
checking for XKBlib support... yes
checking for main in -lGL... yes
checking for main in -lopengl32... no
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking whether opengl display output will be enabled... yes
checking SDL_sound.h usability... yes
checking SDL_sound.h presence... yes
checking for SDL_sound.h... yes
checking for Sound_Init in -lSDL_sound... yes
checking for Sound_Seek in -lSDL_sound... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mprotect... yes
checking for setpriority support... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/cpu/Makefile
config.status: creating src/cpu/core_full/Makefile
config.status: creating src/cpu/core_normal/Makefile
config.status: creating src/cpu/core_dyn_x86/Makefile
config.status: creating src/cpu/core_dynrec/Makefile
config.status: creating src/debug/Makefile
config.status: creating src/dos/Makefile
config.status: creating src/fpu/Makefile
config.status: creating src/gui/Makefile
config.status: creating src/hardware/Makefile
config.status: creating src/hardware/serialport/Makefile
config.status: creating src/ints/Makefile
config.status: creating src/libs/Makefile
config.status: creating src/libs/zmbv/Makefile
config.status: creating src/libs/gui_tk/Makefile
config.status: creating src/misc/Makefile
config.status: creating src/shell/Makefile
config.status: creating src/platform/Makefile
config.status: creating src/platform/visualc/Makefile
config.status: creating visualc_net/Makefile
config.status: creating include/Makefile
config.status: creating docs/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make all-recursive
make[1]: Entering directory `/home/paulo/Desktop/dosbox/dosbox-0.74'
Making all in src
make[2]: Entering directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src'
Making all in cpu
make[3]: Entering directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu'
Making all in core_full
make[4]: Entering directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu/core_full'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu/core_full'
Making all in core_normal
make[4]: Entering directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu/core_normal'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu/core_normal'
Making all in core_dyn_x86
make[4]: Entering directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu/core_dyn_x86'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu/core_dyn_x86'
Making all in core_dynrec
make[4]: Entering directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu/core_dynrec'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu/core_dynrec'
make[4]: Entering directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT callback.o -MD -MP -MF .deps/callback.Tpo -c -o callback.o callback.cpp
callback.cpp: In function ‘Bitu CALLBACK_SetupExtra(Bitu, Bitu, PhysPt, bool)’:
callback.cpp:472: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘Bitu’
mv -f .deps/callback.Tpo .deps/callback.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT cpu.o -MD -MP -MF .deps/cpu.Tpo -c -o cpu.o cpu.cpp
cpu.cpp: In function ‘bool CPU_SwitchTask(Bitu, TSwitchType, Bitu)’:
cpu.cpp:443: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
cpu.cpp:637: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘Bitu’
cpu.cpp: In function ‘void CPU_Interrupt(Bitu, Bitu, Bitu)’:
cpu.cpp:899: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
cpu.cpp:931: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
cpu.cpp:931: warning: format ‘%X’ expects type ‘unsigned int’, but argument 3 has type ‘Bitu’
cpu.cpp: In function ‘void CPU_IRET(bool, Bitu)’:
cpu.cpp:1103: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
cpu.cpp: In function ‘void CPU_JMP(bool, Bitu, Bitu, Bitu)’:
cpu.cpp:1285: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
cpu.cpp: In function ‘void CPU_CALL(bool, Bitu, Bitu, Bitu)’:
cpu.cpp:1560: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
cpu.cpp: In function ‘void CPU_RET(bool, Bitu, Bitu)’:
cpu.cpp:1632: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
cpu.cpp:1691: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
cpu.cpp: In function ‘bool CPU_LTR(Bitu)’:
cpu.cpp:1820: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 has type ‘Bitu’
mv -f .deps/cpu.Tpo .deps/cpu.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT flags.o -MD -MP -MF .deps/flags.Tpo -c -o flags.o flags.cpp
mv -f .deps/flags.Tpo .deps/flags.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT modrm.o -MD -MP -MF .deps/modrm.Tpo -c -o modrm.o modrm.cpp
mv -f .deps/modrm.Tpo .deps/modrm.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT core_full.o -MD -MP -MF .deps/core_full.Tpo -c -o core_full.o core_full.cpp
mv -f .deps/core_full.Tpo .deps/core_full.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT paging.o -MD -MP -MF .deps/paging.Tpo -c -o paging.o paging.cpp
paging.cpp: In constructor ‘<unnamed>::SerializePaging::SerializePaging()’:
paging.cpp:1070: error: no matching function for call to ‘<unnamed>::SerializePaging::registerPOD(<anonymous struct>&)’
make[4]: *** [paging.o] Error 1
make[4]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74'
make: *** [all] Error 2
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-25 @ 11:51

I'm also wondering if the "recompiling cpu core" is the same as dynamic on x86-64 ? Am i going to end up without dynamic core after all this?
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby ZenJu » 2010-7-25 @ 12:15

The same named method one line above in the constructor works


Template arguments may not reference an unnamed type. Again MSVC is a bit more lax here.

Giving this struct a name should fix it:

static struct Blah
{
Bitu used;
PF_Entry entries[PF_QUEUESIZE];
} pf_queue;
User avatar
ZenJu
Newbie
 
Posts: 36
Joined: 2010-7-04 @ 12:05

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-25 @ 13:52

mv -f .deps/core_dyn_x86.Tpo .deps/core_dyn_x86.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT core_dynrec.o -MD -MP -MF .deps/core_dynrec.Tpo -c -o core_dynrec.o core_dynrec.cpp
In file included from core_dynrec.cpp:140:
core_dynrec/cache.h: In constructor ‘CodePageHandlerDynRec::CodePageHandlerDynRec()’:
core_dynrec/cache.h:97: error: no matching function for call to ‘PageHandler::PageHandler()’
../../include/paging.h:87: note: candidates are: PageHandler::PageHandler(const PageHandler&)
../../include/paging.h:62: note: PageHandler::PageHandler(Bitu)
../../include/paging.h: In member function ‘void CodePageHandlerDynRec::SetupAt(Bitu, PageHandler*)’:
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/cache.h:110: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/cache.h:110: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/cache.h:111: error: within this context
core_dynrec/cache.h: In function ‘void cache_closeblock()’:
core_dynrec/cache.h:588: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘Bitu’
core_dynrec/cache.h:590: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘Bitu’
core_dynrec/cache.h:590: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘Bitu’
In file included from core_dynrec/decoder.h:22,
from core_dynrec.cpp:160:
../../include/paging.h: In function ‘bool MakeCodePage(Bitu, CodePageHandlerDynRec*&)’:
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/decoder_basic.h:151: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/decoder_basic.h:157: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/decoder_basic.h:162: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/decoder_basic.h:168: error: within this context
In file included from core_dynrec/decoder.h:26,
from core_dynrec.cpp:160:
core_dynrec/dyn_fpu.h: In function ‘void dyn_fpu_esc3()’:
core_dynrec/dyn_fpu.h:419: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘Bitu’
core_dynrec/dyn_fpu.h:419: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘Bitu’
../../include/paging.h: In function ‘CacheBlockDynRec* LinkBlocks(BlockReturn)’:
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec.cpp:168: error: within this context
make[4]: *** [core_dynrec.o] Error 1
make[4]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74'
make: *** [all] Error 2

gosh i hate c++
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby ykhwong » 2010-7-25 @ 14:09

Beta 8: Yet another maintenance release:
- Some more code review
- cleared keyboard buffer after loading a state.

Where are the more code reviews?

Which fixes did MinGW require?

Take a look at my patch file that includes both your changes for save-states and my modifications for the compilation. You might see the following in it.
- Added "save_state.cpp, save_state.h" at the end of "dosbox_LDADD=" in /dosbox/src/Makefile.am for specific compilers to notice the newly added files.
- As you mentioned about the template arguments, some compilers including MinGW/MSYS seem to be more strict than MSVC.
I did not fix the existing "static struct" lines of paging.cpp for the solution, but I've just changed the "registerPOD(pf_queue);" to "registerPOD(pf_queue.used); registerPOD(pf_queue.entries);" in the namespace.
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Re: Save States - Proof of concept

Postby ZenJu » 2010-7-25 @ 14:57

Just uploaded a new version of the sourcecode: Compiles fine on Ubuntu 10.4. 32Bit. This should fix a few issues.
User avatar
ZenJu
Newbie
 
Posts: 36
Joined: 2010-7-04 @ 12:05

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-25 @ 15:04

I'm using ubuntu 10.4 (with updates) 64 bit

In file included from core_dynrec.cpp:140:
core_dynrec/cache.h: In constructor ‘CodePageHandlerDynRec::CodePageHandlerDynRec()’:
core_dynrec/cache.h:97: error: no matching function for call to ‘PageHandler::PageHandler()’
../../include/paging.h:87: note: candidates are: PageHandler::PageHandler(const PageHandler&)
../../include/paging.h:62: note: PageHandler::PageHandler(Bitu)
../../include/paging.h: In member function ‘void CodePageHandlerDynRec::SetupAt(Bitu, PageHandler*)’:
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/cache.h:110: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/cache.h:110: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/cache.h:111: error: within this context
core_dynrec/cache.h: In function ‘void cache_closeblock()’:
core_dynrec/cache.h:588: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘Bitu’
core_dynrec/cache.h:590: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘Bitu’
core_dynrec/cache.h:590: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘Bitu’
In file included from core_dynrec/decoder.h:22,
from core_dynrec.cpp:160:
../../include/paging.h: In function ‘bool MakeCodePage(Bitu, CodePageHandlerDynRec*&)’:
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/decoder_basic.h:151: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/decoder_basic.h:157: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/decoder_basic.h:162: error: within this context
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec/decoder_basic.h:168: error: within this context
In file included from core_dynrec/decoder.h:26,
from core_dynrec.cpp:160:
core_dynrec/dyn_fpu.h: In function ‘void dyn_fpu_esc3()’:
core_dynrec/dyn_fpu.h:419: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘Bitu’
core_dynrec/dyn_fpu.h:419: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘Bitu’
../../include/paging.h: In function ‘CacheBlockDynRec* LinkBlocks(BlockReturn)’:
../../include/paging.h:90: error: ‘Bitu PageHandler::flags’ is private
core_dynrec.cpp:168: error: within this context
make[4]: *** [core_dynrec.o] Error 1
make[4]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src/cpu'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74'
make: *** [all] Error 2


I just need to change from private to protected or public ?
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby ZenJu » 2010-7-25 @ 15:15

I did a little refactoring, just to get some compiler aid when trying to understand the overall structure. Thereby I made the flags variable private and offered a get-method for it. Additonally "PageHandler" received a constructor that takes a flag-argument:

core_dynrec/cache.h:97: error: no matching function for call to ‘PageHandler::PageHandler()’


CodePageHandlerDynRec() : PageHandler(0)

...should fix the issue on line 96. All the other stuff is analog. Accesses work via "getFlags()/setFlags()"
User avatar
ZenJu
Newbie
 
Posts: 36
Joined: 2010-7-04 @ 12:05

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-25 @ 15:48

Obviously the get and set methods do nothing very sophisticated . Can i make it public without side effects (ie subclass overriding setFlags or something).
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-25 @ 15:52

So many warnings...
save_state.cpp: In member function ‘std::string SaveState::RawBytes::get() const’:
save_state.cpp:84: error: no matching function for call to ‘std::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::string)’
/usr/include/c++/4.4/bits/basic_string.tcc:496: note: candidates are: void std::basic_string<_CharT, _Traits, _Alloc>::swap(std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
save_state.cpp: In member function ‘void SaveState::RawBytes::compress() const’:
save_state.cpp:94: error: no matching function for call to ‘std::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::string)’
/usr/include/c++/4.4/bits/basic_string.tcc:496: note: candidates are: void std::basic_string<_CharT, _Traits, _Alloc>::swap(std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
make[3]: *** [dosbox] Error 1
make[3]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/paulo/Desktop/dosbox/dosbox-0.74/src'
make[1]: *** [all-recursive] Error 1
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-25 @ 16:08

it's not a constructor.
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby ZenJu » 2010-7-25 @ 20:47

Can i make it public without side effects

It was public before, so yes, this is no problem.
User avatar
ZenJu
Newbie
 
Posts: 36
Joined: 2010-7-04 @ 12:05

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-27 @ 19:51

How do i disambiguate the candidate functions in c++?

For that matter what is the right one?
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby ZenJu » 2010-7-27 @ 20:19

If you refer to the std::swap error: Mirroring objects should fix the issue. E.g. "save_state.cpp:84"

Replace

bytes.swap(Util::decompress(bytes));

by

Util::decompress(bytes).swap(bytes);

The error message is a "little" chatty, but says it all:

save_state.cpp:84: error: no matching function for call to ‘std::string::swap(std::string)’
note: candidates are:
std::string::swap(string&)

-> a temporary cannot implicitly be converted to an r-value
User avatar
ZenJu
Newbie
 
Posts: 36
Joined: 2010-7-04 @ 12:05

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-27 @ 20:37

Perfectly understandable.

Actually, no, i'm lying. So it's fake object orientation? Lovely.
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby Serious Callers Only » 2010-7-27 @ 20:41

There was another, similar problem and then it built.
Serious Callers Only
Member
 
Posts: 349
Joined: 2003-4-26 @ 21:34

Re: Save States - Proof of concept

Postby Manwe » 2010-10-13 @ 07:22

Does DOSbox holds the save-state in memory or saves it to a hard disk?
User avatar
Manwe
Newbie
 
Posts: 5
Joined: 2009-11-02 @ 10:33
Location: Moscow

Re: Save States - Proof of concept

Postby jal » 2010-10-13 @ 07:32

Manwe wrote:Does DOSbox holds the save-state in memory or saves it to a hard disk?


DOSBox does not have save states: this thread is, as its title says, about an experimental patch. And if you take the time to actually read the thread, you'll find your answer concerning this patch (and why it is that way).


JAL
User avatar
jal
Member
 
Posts: 494
Joined: 2004-1-02 @ 15:30
Location: Amersfoort, Netherlands

Re: Save States - Proof of concept

Postby Manwe » 2010-10-13 @ 11:30

Thanks for your answer, JAL, but I already read the thread, tested "an experimental patch" (which I simply called "dosbox"), found that saved states aren't working after re-lunching Dosbox, sought a dump file around the Dosbox's "capture" folder, ect. I just asked a question to be insure for I missed something.
Since your answer is not so short as I expected, I guess the right answer should be simply "not at HDD". Thanks anyway.
User avatar
Manwe
Newbie
 
Posts: 5
Joined: 2009-11-02 @ 10:33
Location: Moscow

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests