| View previous topic :: View next topic |
| Author |
Message |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-09-24 23:54:09 Post subject: TAS Movie Editor (.NET 2.0) |
|
|
Howdy all,
Well, this project kinda came about while I was fartin around with a Shadowrun wip. Turns out I screwed up and had to go back to near the beginning to redo something that was required for later on. Though I really only had to backtrack about 5 minutes (maybe a couple hours worth of work), it kind of swelled into a much larger project, so the run was abandoned (also, turns out the game desyncs if you splice data ... booooo).
This program was written in C#2K5 (.NET 2.0 framework required), so it's not really portable (sorry Linux users, I'm just not good enough to write portable applications). It's designed to be modular (both structurally and UI-wise) so it's relatively easy to make new features available to all supported formats.
Currently, the application supports FCEU, Famtasia, SNES9x, Mupen64, Gens, and VirtualBoyAdvance input movies.
You can add/remove/update frames, splice movies, copy-paste blocks of data from the current movie, or save/load blocks of data to be used later. Metadata (Author/Description) can be updated on save, and various other miscellaneous features exists.
If you have any suggestions to make this better, please post a message to this thread. This is a community project, so no idea is deemed bad or stupid. I'm trying to write the ultimate TAS companion tool, and the only way to do that is to ensure that as many useful features are available as possible.
The application and source are both available from SourceForge at http://sourceforge.net/projects/tas-editor
Enjoy :)
Edit (11/18/06): Topic chaged from "TAS Movie Splicer"
Edit (02/02/07): Removed feature chart, since all supported formats are pretty much good to go (other than M64 :P)
Last edited by Maximus on 2007-02-03 17:42:23; edited 21 times in total |
|
| Back to top |
|
 |
CtrlAltDestroy Active player
Joined: 2005-02-23 06:15:27 Posts: 506
|
Posted: 2006-09-25 04:48:28 Post subject: |
|
|
Dang, I don't have the proper NET framework to run this!
Anyway, keep going. Please add FCM (FMV?) support. |
|
| Back to top |
|
 |
pirate_sephiroth Active player
 Joined: 2006-02-28 09:56:10 Posts: 964 Location: Milky Way -> Earth -> Brazil
|
Posted: 2006-09-25 05:24:44 Post subject: |
|
|
hmm... cee tick-tack-toe
try one of these:
http://www.ttee.com/down3/qiba/dotnetfx2.0.exe
http://updates.ya1.ru/dotnet/dotnetfx2.0.exe _________________ The full of the crime street. Here comes the Robocop! March forward courageously to be blind to the damage of enemy.(dragonxyk)
☞☠☜ |
|
| Back to top |
|
 |
LagDotCom Active member
 Joined: 2006-03-07 09:50:48 Posts: 400 Location: UK
|
Posted: 2006-09-25 11:33:07 Post subject: |
|
|
I wrote a similar program to this for VBM files. It catalogues parts of the run into sections and assigns version numbers to them, so I can easily see how rooms/levels are improving and so on. Then I can tell it to compile a VBM of all the newest versions. _________________ In Progress Klonoa: Empire of Dreams 100%
Thinking About Bruce Lee - Return of the Legend
mmbossman wrote:
shitstorm of horrible crap |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-09-26 13:07:50 Post subject: |
|
|
hrm, seems i'm retarded and didn't do my due-dilligence prior to starting this project, but it seems that zefiris wrote something similar. A quick question to those who have used his app is does our functionality overlap? I tried his editor and I don't think so, but I only tested it quickly.
I kinda wanna finish this project just for the fun of it, but if it's un-necessary, i guess this thread can be closed. _________________ TAS Movie Editor v0-12
http://sourceforge.net/projects/tas-editor |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-09-27 04:13:00 Post subject: |
|
|
well, i didn't hear back from anyone, so i did a little more work on this. I've updated the main post with the new link.
The changes are as follows:
v0-2
- UI::various event handlers put in place to keep the program from crashing
- UI::implemented jumping to a frame (doesn't calculate accurately 100% of the time though)
- UI::implemented refreshing (if you want to skip to a specific page, or change the results per page)
- UI::checks if the loaded file is a valid SMV (currently checks against version since signature read is wonky)
- UI::movie options now set from file
- SMV::added metadata read
- SMV::fixed input anomalies
- SMV::spliced file frame counts are now updated when written _________________ TAS Movie Editor v0-12
http://sourceforge.net/projects/tas-editor |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-10-02 12:44:48 Post subject: |
|
|
I'm hoping to have another version of this out soon (not sure if anyone's using it, but I like writing software so unless I hear any negative feedback, I'll keep working on this).
The next version should allow for overwriting a range in a target movie instead of just inserting at a given point in the target.
Looking down the road, I'd like for this to eventually encompass as many formats as possible, but what other features would users like to see? Frame editing? Bookmarking? A diff engine? Should metadata be editable? Should rerecords update (target += (source-target)?
I've got no problems writing this, but coming up with fun and useful ideas is where I need help ;)
PS. I think I'll tackle FCM next ... is there any need for FMV? Should there be integrated FMV->FCM conversion? |
|
| Back to top |
|
 |
Bag of Magic Food Active player
 Joined: 2004-05-29 07:39:50 Posts: 4852
|
Posted: 2006-10-02 17:44:47 Post subject: |
|
|
That might not be a bad idea. I've got a friend who's still a fan of Famtasia, and it would be nice to be able to at least try to convert movies in an all-in-one editor. _________________ put yourself in my rocketpack if that poochie is one outrageous dude |
|
| Back to top |
|
 |
Guybrush Active player
 Joined: 2005-11-13 21:42:22 Posts: 1179 Location: Koski Tl, Finland
|
Posted: 2006-10-02 19:15:20 Post subject: |
|
|
Maximus wrote:
IPS. I think I'll tackle FCM next ... is there any need for FMV? Should there be integrated FMV->FCM conversion?
If I recall correctly, .fcm is compressed while .fmv isn't. So it might be easier to fiddle around with .fmv |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-10-02 19:59:16 Post subject: |
|
|
From what i've seen as far as the format docs are concerned, it doesn't look like FCM is compressed, but the headers are different between blip's patched version and the unpatched versions. I'm assuming compatibility with both would be required, but I think the prior is more important than the latter.
The FMV format is much more straightforward though, so it might make more sense to implement that first, as it'll be required for conversion to FCM later.
I thought about just creating a nesmock frontend, but since I'm writing classes to encapsulate the movie data anyways, it might not be too difficult to just write my own conversion engine.
Once I'm happy with the structure of the application, I'll release the source as well :) _________________ TAS Movie Editor v0-12
http://sourceforge.net/projects/tas-editor |
|
| Back to top |
|
 |
nitsuja Coder
 Joined: 2004-12-21 02:32:54 Posts: 2297
|
Posted: 2006-10-02 20:28:45 Post subject: |
|
|
| The input data for FCM is compressed; it's run-length encoded. Which makes manual editing so difficult that it's easier to convert the FCM to an FMV and edit that (then convert it back) than it is to edit the FCM. If this tool works on FCMs natively, that's one more reason to use it. |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
|
| Back to top |
|
 |
Truncated Active player
 Joined: 2004-04-17 21:01:46 Posts: 2439 Location: Sweden
|
Posted: 2006-10-03 20:19:01 Post subject: |
|
|
I've always wanted a good graphical movie editor that can handle several formats, but all attempts so far have been aborted.
I haven't tried this one yet, but maybe I should. Just for now, I can give my views for what features are wanted.
>Frame editing?
Yes, of course. Empty frame insertion and frame deletion are also a must.
>Bookmarking? A diff engine?
What would these two features do more exactly? Would the bookmarks be saved in the SMV file, or lost when you close the program?
I can imagine a diff engine being neat, but now how I would use it. I wouldn't make it a top priority.
>Should metadata be editable?
Yes please.
>Should rerecords update (target += (source-target)?
If you're making it in parts, this makes sense. If you're just splicing in a part from a file which you recorded from your old movie file, the rerecord amount will effectively be doubled. You can make it deselectable via option, but it's not a critical matter to keep the re-record number correct.
>PS. I think I'll tackle FCM next ... is there any need for FMV? Should there be integrated FMV->FCM conversion?
What nitsuja said. I imagine FCM, GMV, VBM, M64 are next in decending order of importantness (judging from the number of movies we have for each system). |
|
| Back to top |
|
 |
Comicalflop Active player
 Joined: 2006-06-13 21:25:15 Posts: 2668 Location: Massachussetts, USA
|
Posted: 2006-10-04 06:43:07 Post subject: |
|
|
I just downloaded this and it looks extremely helpful- the other hex editors I've looked at seem really confusing, this one is plain and simple- select the odl movie, select the new movie, and typw what you want inserted where. _________________ Working on Mischief Makers, currently at 4-08.
Testing for Gunstar Super Heroes.
☣ Homepage ☣ |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-10-04 23:54:53 Post subject: |
|
|
Well, I'm making some progress here. SMV support is almost completely done (just need to add multiple controller support). The next version should also contain frame insertion/deletion methods and preliminary FCM support.
I re-wrote a good chunk of it so as to ensure it's as easy as possible to add new formats as I go, and to keep the codebase clean and organized. Any ideas are welcome, as always .. but I mainly want to know if it's working :) _________________ TAS Movie Editor v0-12
http://sourceforge.net/projects/tas-editor |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-10-05 00:32:10 Post subject: |
|
|
Truncated wrote:
>Bookmarking? A diff engine?
What would these two features do more exactly? Would the bookmarks be saved in the SMV file, or lost when you close the program?
I didn't really put much thought into how exactly they'd work, just that they'd be cool :P I can't really fart around with the file formats, since they'd only work in my app and not the native emulator.
Bookmarking I was thinking could allow you to add labels to frames (ie. instead of Frame 19384 it could be "Start of Crazy Combo"). I could collect this in an xml file I guess, but it's prolly not a very useful feature.
I guess a difference engine could just be used to see what input had changed between 2 versions of a movie. Also not exceedingly useful, but sorta cool. |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-10-07 05:22:02 Post subject: |
|
|
Ugh. The FCM format is kicking my ass. I've gone through both the source for fceu and nesmock, and though the code is rather lean and elegant, I can't really wrap my head around it :( Unlike some other emulators, this isn't just reading bytes ala ControllerDataOffset + (position * Bytes_Per_Controller)
This is an exerpt from the nesmock source (I'm assuming it's okay to post this)
while(CtrlLength > 0)
{
bool Type = data[pos] >> 7;
unsigned NDelta = (data[pos] >> 5) & 3;
unsigned Data = data[pos] & 0x1F;
++pos; --CtrlLength;
unsigned delta = 0;
switch(NDelta)
{
case 0: break;
case 1: delta |= data[pos++]; break;
case 2: delta |= data[pos++];
delta |= data[pos++] << 8; break;
case 3: delta |= data[pos++];
delta |= data[pos++] << 8;
delta |= data[pos++] << 16; break;
}
for(;;)
{
/* Save the controlled data */
for(unsigned ctrl=0; ctrl<4; ++ctrl)
Cdata[frame].Ctrl[ctrl] = joop[ctrl];
if(!delta)break;
++frame;
--delta;
}
.
.
.
}
I'm not really sure how this delta concept works. There are some smart cookies out there so I'm hoping someone can shed some light on this :)
Edit: Thanks Bisqwit. It's a lil clearer now :) |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-10-10 07:05:13 Post subject: |
|
|
Hope everyone's enjoying this so far. I'm starting to implement native FCM support (harder than I would have imagined) and hope to have it working by the next version. Also added some new features. I'm using my Shadowrun wip as a proving grounds for this as it turns out I screwed up quite a few things, and everytime I go back to fix something, it ends up being a candidate for a new feature :)
Not sure if the WIP will ever be completed, though if I'd but as much time into it as this editor, the movie would likely be done by now ... oh well.
Changes since the last version are as follows:
v0-3
- UI::Added shortcut keys to menu items
- UI::Initial layout for FMV & FCM support
- UI::Added Resume position to Copy methods
- UI::Added Add/Remove Frames (Remove works ... Add is still wonky)
- UI::Added Movie Input Compare module (preliminary)
- FCM::Preliminary support introduced (reads header data :P)
- SMV::Movie Input Compare enabled
- SMV::Cleaned up properties
- SMV::Encapsulated write methods (moved out from copy class)
- SMV::Three splicing methods are now available:
- FromSourceStart::Source.Beginning -> Source.TargetFrame + Target.ResumeFrame -> Target.ToEnd
- FromRange::Target.Beginning -> Target.InsertPosition + Source.TargetFrame + Source.ResumeFrame + Target.ResumeFrame
- FromSourceEnd::Target.Beginning -> Target.TargetFrame + Source.TargetFrame + Source.ToEnd _________________ TAS Movie Editor v0-12
http://sourceforge.net/projects/tas-editor |
|
| Back to top |
|
 |
Maximus Active player
 Joined: 2005-10-03 00:56:14 Posts: 514 Location: Toronto, Ontario
|
Posted: 2006-10-16 02:39:00 Post subject: |
|
|
Need more help :( I've got initial FCM input parsing down, but it's terminating the loop far too early. Code is below:
public FCMControllerData(ref byte[] byteArray, int controllerDataOffset, int controllerDataLength)
{
controllerData = new ArrayList();
int position = controllerDataOffset;
int frameCount = 0;
int[] joop = {0,0,0,0};
while (controllerDataLength > 0)
{
int updateType = byteArray[position] >> 7;
int NDelta = (byteArray[position] >> 5 ) & 3;
int delta = 0;
int data = byteArray[position] & 0x1F;
++position; --controllerDataLength;
switch (NDelta)
{
case 0:
break;
case 1:
delta |= byteArray[position++];
break;
case 2:
delta |= byteArray[position++];
delta |= byteArray[position++] << 8;
break;
case 3:
delta |= byteArray[position++];
delta |= byteArray[position++] << 8;
delta |= byteArray[position++] <<16> 0)
while(delta > 0)
{
// Save the controlled data
controllerData.Add(parseControllerData(joop));
++frameCount;
--delta;
}
if (controllerDataLength > NDelta)
controllerDataLength -= NDelta;
else
controllerDataLength = 0;
if (updateType == 0) // Controller data
{
int ctrlno = (data >> 3);
joop[ctrlno] ^= (1 << (data & 7));
if (ctrlno == 0) { controller1 = true; }
if (ctrlno == 1) { controller2 = true; }
if (ctrlno == 2) { controller3 = true; }
if (ctrlno == 3) { controller4 = true; }
}
}
}
The problem seems to be with the initial decrement of the controllerDataLength (byte read in from fcm at 0x14). Bisqwit's been helpful, but i'm mildly retarded so I can't seem to figure this out. I can't take the decrement out or the array will read itself out of bounds.
Any ideas are welcome. Once I can get this working, a new version should be available :)
EDIT: Turns out the problem was that i'm retarded and wasn't reading enough info in from the header (1 byte vs. 4 bytes). Problem solved. Thanks everyone.
Last edited by Maximus on 2006-10-16 16:34:12; edited 1 time in total |
|
| Back to top |
|
 |
SXL Active member
 Joined: 2005-02-07 02:37:44 Posts: 452
|
Posted: 2006-10-16 10:48:12 Post subject: |
|
|
optimised code, stuff like byteshifts (<<) and mixed table accesses with incrementation ( a = b[c++] ), etc., isn't a very readable thing, thus preventing cooperative work... _________________ I never sleep, 'cause sleep is the cousin of death - NAS |
|
| Back to top |
|
 |
|