Jump to content

PvtLewis

New Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

4 Neutral

About PvtLewis

  • Rank
    Combat Commando
  1. There is a version number near the beginning of the file, but it is not intended to be incremented upon each release. With the current patch, VJ will refuse to load files with version number greater than 1. Data is stored in chunks with type/size fields at the beginning of each chunk. New releases of VJ can use default values for new types that aren't found in a file, while old releases of VJ will skip over new types of data. But if things change too much, it may be cumbersome to handle everything correctly. In that case you can increment the version number and be done with it.
  2. There is no real need for it, but the debian system that I am using only has Qt4 installed. All I did was include QtGui for Qt4 if the version is less than 5, like this: #if QT_VERSION >= 0x050000 #include <QtWidgets> #else #include <QtGui> #endif I tried to make the save state file format flexible enough to handle slight variations between releases. No guarantee this will work in practice... The same save state files should be usable on both big endian/little endian machines, but this has not been tested.
  3. Update: I finally realized that SDL audio is running in its own thread. This new patch adds a hack to sync dump/load of the state to the audio thread. Now it seems that the chance of audio being broken on load has been drastically reduced. virtualjaguar-savestates-2-20150927.diff.txt Also, with this patch RAM contents are randomized as in stock Virtual Jaguar.
  4. For now if you compile it with the patch, just change the two "#if 1" to "#if 0" in jaguar.cpp It should not be hard to add an option to the config file. The whole first 8MB of jagMemSpace is saved in the state file. Maybe only the first 2MB of actual RAM is necessary, but if everything is zeroed at startup then state files can be compressed to about 1-1.5MB I just checked, and if you zero everything at startup, then randomize the 2MB of RAM, it only adds a few hundred KB to the state file.
  5. Thanks to Shamus et al. I was not sure where to send this, so I will post it here. Attached is a patch against the current git version. Tested only on Linux/x86-64/Qt4. virtualjaguar-savestates.diff.txt There is a new 'Tools' menu, with Dump/Load and the option to choose from 10 save slots per game. Notes: Sometimes the audio will be screwed up after loading the save state. Try loading the state several times, by holding down the load button/key for a second or two. The escape key toggles full screen mode. (It was F9 ...) F5/F8 are mapped to Dump/Load. Fixed sample buffer overrun in DSPSampleCallback. Should compile with either Qt4 or Qt5. Stopped randomizing RAM contents on startup, in order to better compress the state file.
×
×
  • Create New...