Post Reply 
WP34s and 31s: Updating the emulator while preserving all data
01-25-2015, 06:02 PM
Post: #1
WP34s and 31s: Updating the emulator while preserving all data
I just saw the new versions of wp34sgui.exe and wp31sgui.exe and now I would like to update my previous versions. Simply replacing the files would result in an "Erased" message the first time the new version will be started. Since the 34s emulator holds some useful programs I would like to do an update without losing programs, data and settings. How can this be done? On a hardware 34s you simply SAVE everything, update the device and the previous state is automatically restored afterwards.

Dieter
Find all posts by this user
Quote this message in a reply
01-25-2015, 06:23 PM (This post was last modified: 01-25-2015 07:05 PM by BarryMead.)
Post: #2
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 06:02 PM)Dieter Wrote:  I would like to do an update without losing programs, data and settings. How can this be done? On a hardware 34s you simply SAVE everything, update the device and the previous state is automatically restored afterwards.

Dieter
That is quite easy. Before installing the update, copy the file wp34s.dat from the wp34s-vers/trunk/windows/bin directory to a safe place where it won't get overwritten by the update.

After the update replace the wp34s.dat file back to it's original directory with the one you put in a safe place, then start the emulator.

It should retain the original programs and memory contents as before the update without the erased message. I have done this through many version changes with no ill effects. There is always the possibility that a new version of the emulator will partition or arrange memory differently causing an incompatibility with the saved memory file, but so-far I have not seen that happen.

Also the wp31s.dat file is stored in the wp34s-vers/branches/wp31s/windows/bin directory. Similarly save the wp31s.dat file to a safe place and restore it after the update back to its original directory.

I personally keep a "Catalog" of wp34s.dat files renamed in a safe place to describe the collection of programs they contain. That makes it easy to reload a whole family of programs with a simple file copy.

Good luck, Barry
Find all posts by this user
Quote this message in a reply
01-25-2015, 07:06 PM
Post: #3
RE: WP34s and 31s: Updating the emulator while preserving all data
As Berry has already pointed out, there shouldn't be a loss of your data when you just replace the wp3?sgui.exe file. The only way to lose your work would be either a bad checksum in the wp34s.dat file or an incompatible change to the memory layout. We try to avoid the latter and we've managed it within a mayor version (V3) quite well.

If you are in doubt or if there is an "Erased" message on startup, you can still recover the programs from the "safe copy" of wp34s.dat with help of Neil's disassembler. This will give you a source text of your programs which can be edited and compiled back into the RAM image.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-25-2015, 07:42 PM
Post: #4
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 06:23 PM)BarryMead Wrote:  That is quite easy. Before installing the update, copy the file wp34s.dat from the wp34s-vers/trunk/windows/bin directory to a safe place where it won't get overwritten by the update.

After the update replace the wp34s.dat file back to it's original directory with the one you put in a safe place, then start the emulator.

Thank you very much, Barry and Marcus. I did it that way and it worked fine.

(01-25-2015 06:23 PM)BarryMead Wrote:  I personally keep a "Catalog" of wp34s.dat files renamed in a safe place to describe the collection of programs they contain. That makes it easy to reload a whole family of programs with a simple file copy.

Now if there was a simple way to save and load .dat files from within the emulator. This could work as a kind of mass storage.

Dieter
Find all posts by this user
Quote this message in a reply
01-25-2015, 07:59 PM (This post was last modified: 01-25-2015 07:59 PM by rprosperi.)
Post: #5
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 06:23 PM)BarryMead Wrote:  That is quite easy. Before installing the update, copy the file wp34s.dat from the wp34s-vers/trunk/windows/bin directory to a safe place where it won't get overwritten by the update.

After the update replace the wp34s.dat file back to it's original directory with the one you put in a safe place, then start the emulator.

Good timing here! Was going to post a similar question but thought I had created my own mess. Barry's answer confuses me further with the stated file locations deep into some install path.

Maybe I've had the 34S emulator installed improperly all along? I don't recall my setup process some years ago, but I have all the emulator files (.exe, .dll. .bmp. .pdf, .dat, .ini, etc.) in a single folder, and when updates come out I just replace the .exe and it seems to work fine (latest installed is ver 3678 from last July).

By coincidence, yesterday I ran across the new version and opened the zip, and like you Dieter, was a bit confused about what to update with what.

So, for setups like this (all prior verison files in one folder) what is the recommended update procedure? The newer QT-based version comes with files in a variety of folders (skins, images, program, etc) but no installer per se.

I can manually copy/move files as needed, so not complaining about lack of installer, just confused due to new apparant structure.

Should I create a wholly new folder tree with the same structure as the zip and then just overwrite with my existing .dat file?

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
01-25-2015, 08:23 PM
Post: #6
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 07:59 PM)rprosperi Wrote:  ... I have all the emulator files (.exe, .dll. .bmp. .pdf, .dat, .ini, etc.) in a single folder, and when updates come out I just replace the .exe and it seems to work fine ...

Please allow me quoting from the WP 31S User Manual, p. 131 of 149:

"If you own or operate a Windows-PC, you may download
http://sourceforge.net/p/wp34s/code/HEAD...31sgui.exe
Download the files emulator.dll, wp31s_medium.bmp,
4 Medium 31s.skin of the same build number as well. Then just start the exe file by double clicking.
"

For the WP 34S, it's the same procedure but the corresponding files are in another branch: http://sourceforge.net/p/wp34s/code/HEAD...34sgui.exe

So, for the usual updates, just download of those four what was changed since the last time you downloaded. Usually, that's only wp3xgui.exe, sometimes also emulator.dll.

HTH
d:-)
Find all posts by this user
Quote this message in a reply
01-25-2015, 08:51 PM
Post: #7
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 07:42 PM)Dieter Wrote:  Now if there was a simple way to save and load .dat files from within the emulator. This could work as a kind of mass storage.

Dieter
A while back I requested this feature as part of the emulator, and there was some talk of implementing it, but those who make the decisions, decided that it was easy enough to save and restore wp34s.dat files
so the feature was never added.
Find all posts by this user
Quote this message in a reply
01-25-2015, 08:56 PM (This post was last modified: 01-25-2015 09:03 PM by BarryMead.)
Post: #8
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 07:59 PM)rprosperi Wrote:  Maybe I've had the 34S emulator installed improperly all along? I don't recall my setup process some years ago, but I have all the emulator files (.exe, .dll. .bmp. .pdf, .dat, .ini, etc.) in a single folder, and when updates come out I just replace the .exe and it seems to work fine (latest installed is ver 3678 from last July).
It depends on how you installed what software as to what directory it goes in. If you only download the
QT emulator by Pascal Meheut, then the files go into a directory named wp-34s right below where the
zip file was unpacked, and the emulator exe is named WP-34s.exe. But if you grab the entire source tree with the command:
svn checkout svn://svn.code.sf.net/p/wp34s/code wp34s

Then the files go into a directory named wp34s which I personally rename to wp34s-XXXX where XXXX
is the svn version of the checked out tree. Below this directory is the trunk/windows/bin structure that
I discussed in my original posting. The NON-QT emulator is named wp34sgui.exe so I assumed Dieter was referring to the NON-QT emulator in his original question.
Sorry if this confused anyone.
Find all posts by this user
Quote this message in a reply
01-25-2015, 09:24 PM
Post: #9
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 08:51 PM)BarryMead Wrote:  A while back I requested this feature as part of the emulator, and there was some talk of implementing it, but those who make the decisions, decided that it was easy enough to save and restore wp34s.dat files
so the feature was never added.

Hm... does the 34s emulator (the "classic" one running wp34sgui.exe) require a file named wp34s.dat? Is this filename hard-coded within the emulator or is it possible to state a different file as a parameter, so that e.g. wp34sgui.exe datefunctions.dat would be possible?

If not, a small Windows batch or script file could do the trick.

Dieter
Find all posts by this user
Quote this message in a reply
01-25-2015, 10:18 PM
Post: #10
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 08:23 PM)walter b Wrote:  So, for the usual updates, just download of those four what was changed since the last time you downloaded. Usually, that's only wp3xgui.exe, sometimes also emulator.dll.

(01-25-2015 08:56 PM)BarryMead Wrote:  But if you grab the entire source tree with the command:
svn checkout svn://svn.code.sf.net/p/wp34s/code wp34s, Then the files go into a directory named wp34s which I personally rename to wp34s-XXXX where XXXX
is the svn version of the checked out tree. Below this directory is the trunk/windows/bin structure that
I discussed in my original posting.

Thank you Walter and Barry.

This clarifies my confusion, so I can continue as I've been doing.

My own specific contribution to the WP34s project is to never, ever, touch the code. Even looking too closely can sometimes hurt it's feelings, and there's no room for that. I will not be SVN-ing at all. The world is safe.

Thanks!

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
01-25-2015, 10:24 PM
Post: #11
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 09:24 PM)Dieter Wrote:  Hm... does the 34s emulator (the "classic" one running wp34sgui.exe) require a file named wp34s.dat? Is this filename hard-coded within the emulator or is it possible to state a different file as a parameter, so that e.g. wp34sgui.exe datefunctions.dat would be possible?

If not, a small Windows batch or script file could do the trick.

The file name is hard coded but not the path. So you can change the default directory in the icon on the desktop to switch to a different configuration.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-25-2015, 10:38 PM
Post: #12
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 10:24 PM)Marcus von Cube Wrote:  The file name is hard coded but not the path. So you can change the default directory in the icon on the desktop to switch to a different configuration.

Sure – but this would require a separate directory for each and every .dat file. #-)

How about allowing a filename as a parameter that can be passed to wp34sgui.exe? If no parameter is given the emulator may simply default to wp34s.dat. This way everyone could use the emulator as usual, but it would open the door for simple configuration changes.

Dieter
Find all posts by this user
Quote this message in a reply
01-25-2015, 10:43 PM
Post: #13
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 10:38 PM)Dieter Wrote:  How about allowing a filename as a parameter that can be passed to wp34sgui.exe? If no parameter is given the emulator may simply default to wp34s.dat. This way everyone could use the emulator as usual, but it would open the door for simple configuration changes.

Sounds like a cool idea. Let me find the time to implement it...

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-25-2015, 11:07 PM (This post was last modified: 01-25-2015 11:09 PM by Dieter.)
Post: #14
RE: WP34s and 31s: Updating the emulator while preserving all data
(01-25-2015 10:43 PM)Marcus von Cube Wrote:  Sounds like a cool idea. Let me find the time to implement it...

Great – take your time. It would be perfect if extensions other than the very common ".dat" were allowed – imagine something like myprogram.34s. ;-) In this case a double click would be all that's required to start the emulator with that configuration file.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)