Post subject: ZSNES: Conversion of older movie files
Joined: 4/6/2004
Posts: 74
Location: California
I've been enjoying some of Saturn's ZSNES 0.989c movies recently, but would really like to be able to watch the longer ones using the Windows version of ZSNES. In the mean time, I use VDM sound and it works for the most part under win xp, but there are a few problems. The sound is sometimes fast/slow in relation to the action, but sometimes when task-switching to windows for a while and coming back, the sound buffer gets corrupted and starts continually repeating short segments of sound, which is not amusing when in the middle/late parts of a long movie. Anyway, I know that versions of ZSNES after 0.989c had buggy movie support, but with the newer builds of ZSNES coming down the pipeline, I've been hoping that the bug-fixed/enhanced movie support would somehow allow such a conversion to be possible. Nach, do you think this will be possible, or are there too many little differences (timing, emulation, etc.) between the two versions? Out of curiosity, since I have a bit of programming skill, I thought I'd try to make a basic converter to the new format. I used the older, pre-compiled test-version that Nach mentioned in this post. Long story short, although I did get it to load a converted file, it didn't even come close to playing correctly. The contents seem to be in order, but no luck and I figure it's just timing differences or perhaps some bugs in that version.. :-\
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
It is possible to have it run old movies, but the timing could mess up because of how many changes we had in ZSNES since then.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Joined: 4/6/2004
Posts: 74
Location: California
I did try it again with the new r4 and fixed some bugs, but the movies still don't play correctly.. not even from the very beginning, which was a problem before. Ah well, I guess it's just not going to work. Thanks very much for taking time away from coding to comment. :)
Active player (410)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
IMO, it is really hopeless.
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Paulygon wrote:
I did try it again with the new r4 and fixed some bugs, but the movies still don't play correctly.. not even from the very beginning, which was a problem before. Ah well, I guess it's just not going to work. Thanks very much for taking time away from coding to comment. :)
We broke old ZMV support. We'll fix it after we get the new support worked out. Try the latest official build to see how it works.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Joined: 4/6/2004
Posts: 74
Location: California
Cool, glad to hear it. The .989c format used for the movies in question have the raw 21 byte controller structure for each frame, with a header byte and 5 ints for each controller data (the actual data stored for each controller appears to be raw ZSNES controller variables (with the 0x8000 flag and raw snes controller bits in the high word)). I take it by that you mean the "r5" hosted on your site? I tried that, fixed another bug, and now it works slightly better, though I think that may have more to do with the bugfix. Testing with some different segments of Saturn's Chrono Trigger movies, I get varying results.. some play for a few thousand frames before desyncing and others desync in much shorter time periods. Those are likely the result of emulation differences, but I want to do some more debugging before coming to any conclusions.
Joined: 12/17/2004
Posts: 99
Location: Karlsruhe, Germany
Paulygon wrote:
Cool, glad to hear it. The .989c format used for the movies in question have the raw 21 byte controller structure for each frame, with a header byte and 5 ints for each controller data (the actual data stored for each controller appears to be raw ZSNES controller variables (with the 0x8000 flag and raw snes controller bits in the high word)). I take it by that you mean the "r5" hosted on your site? I tried that, fixed another bug, and now it works slightly better, though I think that may have more to do with the bugfix. Testing with some different segments of Saturn's Chrono Trigger movies, I get varying results.. some play for a few thousand frames before desyncing and others desync in much shorter time periods. Those are likely the result of emulation differences, but I want to do some more debugging before coming to any conclusions.
Well, but if they play for some thousand frames, it might be possible to hex-fix those. Please upload some sources from your conversion tool. I would really like to give some old runs of Saturn a try with the new zsnes code ... cu Fabian
Joined: 4/6/2004
Posts: 74
Location: California
Like I said, some work for that long and some don't, but it's reasonable to assume that it would desync many more times per file. And that's just an individual file of the Chrono Trigger movie (segmented into 8 parts). Also, some don't seem to work at all because of savestate version differences (like the .zm1 and .zm2 that start out at the End of Time) or exhibit graphical/sound problems (maybe temporary) like in the .zm3 that starts out in 12000 BC. If you're still interested, I don't mind uploading my code, but it's incomplete. It's a basic Windows application written in Delphi, although it's simple enough that it should convert to C with little difficulty. I'll take some time to clean it up later, posting back here (maybe an edit) when it's ready to download.
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Okay, my latest beta plays old movies again, we still have some issues with old ZSTs though.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Joined: 4/6/2004
Posts: 74
Location: California
Aha, thanks. I've tried it out with a few of the old movies and it seems like they behave exactly as the processed versions produced by my tool. Meaning, they desync in the same places, only they're usually about 80-90% smaller. :) It would be interesting to see if fixing those ZST issues (if possible) would improve the playback of these movies. Otherwise, the only way to get them to work perfectly would be to retrofit the .989c core into a modern windows (or whatever) gui framework, which of course is not going to happen. :-} On a whim, I decided to try running the old movies through the earliest zsnes windows (1.00 and 1.01) and some of them actually worked, amazingly enough. I guess changes in the emulation core were small enough not to affect certain games, or as least as much as they did with others. Of the old movies I tried under 1.00 and 1.01, here's how they fared: Saturn's movies: * Chrono Trigger: 7 of 8 segments played perfectly, one (first) desynced maybe 20-30 minutes into the movie (battle against the Dragon Tank). * Final Fantasy 3: This very long movie (55h 47m 41s by frame count) didn't work, desyncing early (opening in Narshe). * Secret of Evermore: Neither of the 2 movies worked, both desyncing pretty early in the jungle not long after the player gets control (although in different spots). * Seiken Densetsu 3 English translation: None of the 3 movies worked. In fact, they seemed to desync in the same spots as if played by the latest version (early in the introductory gameplay segments). * Terranigma: This single-segment movie worked perfectly all the way through. Culden's movies: * Breath of Fire 2: This quite long single-segment movie (37h 39m 55s by frame count) also worked perfectly all the way through.
caitsith2
He/Him
Player (47)
Joined: 3/26/2004
Posts: 194
Think you could post those 1.00/1.01 versions? I can't seem to get them anywhere.
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Okay I fixed the ZST issues, it's in CVS. My old movies now playback, although a few of them desync from all the changes since I made them. caitsith2: I have a load of ZSNES version from way back when if you want them. _Demo_ also has the source for every single ZSNES version released and quite a few which weren't released. BTW, there's some messages for you on my forum which you never checked. I also had some info regarding some of the GSF sound files you ripped.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Joined: 4/6/2004
Posts: 74
Location: California
Aha, can't wait to try it. I'd compile it myself, myself, but I'm not sure exactly how to do it and the website seems to be down at the moment. I have msvc 2003 and a local copy of the latest source from CVS, plus I know that NASM is also needed (which I should have before long). Anything else needed, pitfalls in compiling, etc.?
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
It's all explained in zsnes\docs\install.txt
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Joined: 4/6/2004
Posts: 74
Location: California
D'oh, don't know how I missed that.. x_x
Player (209)
Joined: 2/18/2005
Posts: 1451
to Paulygon: thank you for testing my and culdens movies on v1.000. to caitsith2: I just added a windows version of ZSNES v1.000 on http://www.freewebs.com/saturnsmovies/zsnesmovies.htm but as Paulygon analyzed it desyncs in some movies. I remember you wanted to watch the Terranigma movie so luckyly at least this should work on this version if Paulygon is right. Haven't tested it yet. EDIT: Testet Terranigma, works 100% perfect! to Nach: First thank you very much for your great job to implant rerecord and give ZSNES a new movie recording area. Second, If you say _Demo_ owns source codes of all ZSNES versions why not just ask him for the source of ZSNES v0.989c to upload it somewhere so that Paulygon or whoever could just convert it into a windows port of this emulator at least for playbacking old movies (before v1.000). I myself would also really like to have an emulator which can playback my movies without sync errors because many people asked me for a windows version since DOS don't work on the newer systems perfectly. I asked pagefault before, but I guess he is to busy since he wanted to contact _Demo_ himself before.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
There are three issues involved here. _Demo_ has sources numbered via his own numbering scheme not the ZSNES version release numbers, since he has many more source archives then the versions released. So he'd have to spend some time seeind which one is exactly the version you'd want. Then you'd have to port it to Windows, two people together can probably do it in a month or less. It's still a bit of work though. Then there's the issue if _Demo_ would even want to give his sources out. I told him why I wanted some old source, and he knows I work on ZSNES so he gave me some old source, but I have no idea if he would want anyone else to have it. I personally don't see why he'd care if all the latest versions are open source, but who knows.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Player (209)
Joined: 2/18/2005
Posts: 1451
Nach wrote:
Then you'd have to port it to Windows, two people together can probably do it in a month or less. It's still a bit of work though.
OK no problem, if it really takes a month then of course it's definitely not worth the time. I'm a little surprised by that because pagefault told me that it could be done really fast if you have a complete source so that you only have to copy it into a windows port preperated code or so. I thought it's a work of 5 minutes but of course I have absolutely no clue how it works. Anyway thank you for your reply.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Perhaps it could be done fast if you're skilled enough, all I know is it took _Demo_ a while to port it to Windows the first time, to make the *nix port also took a month with four people. And even then it took quite a while for bugs to be ironed out of both ports. Even now I don't think the *nix port has all the bugs ironed out of the SDL only code. 5 minutes is definitly not the case. It's a 5 hour minimum to have something somewhat workable.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.