Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
At long last I restarted work on my TASeditor, and new version can be found here: http://savefile.com/files/339041 In fact, it's not old TasEdit, but brand new one, I just felt like starting form scratch ^__^ It introduces new (still unfinished though) interface... Now it can... ...open VBM, SMV, FCM, FMV ...save as FCM (tested with FCM and FMV movies, both replayed successfully to the end (Air, Air-no-death(savestate) - FCM, Gradius by morimoto - FMV)) Working with program: - You can move tracks using drag'n'drop on tracks panels to the left (it resets selections though) - You can change setting for tracks (right mouse button, ignore menu and click on next track panel to select multiple tracks) - Left mouse button creates selection on frames panel, to create new selection click outside of current one - for buttons : double click on selection inverts states of selected buttons - for integer values (for example FCM special) : double click sets value from toolbar into selected cells - hold left mouse button on selection to move selected block, right mouse button does the same but clears the place where block was - right mouse button brings up menu, here you can: -Insert frames, new frames will be put before first selected frame (frame is considered "selected" if it has at least one selected button - Delete selected frames (same here) - Duplicate frames (and here too) - Copy or paste selected block to one of two buffers (pasting will override data in corresponding block starting from upper-left corner of selection) - HZ+-, VZ+- adjust vertical and horisontal zoom Save dialog: here you can change some header data and what track is used by every button ^__^ That's all, I think, I am sorry, but you can't edit data from keyboard for now, I have to find some way to implement it... Old message: After having trained on VBM and SMV convertors I decided to try to write universal, plugin-based movie editor. I want to know what do you want to see there, and how must some things be done to be more convenient for you. I also described some technical aspects, so that programmers who may be will want to write plugins could also give their suggestions. Current ideas: Program has two tabs: one for converting and one for editing. 1) Editing Any movie file (i would really like to support all those formats: fmv fcm vba smv gmv zmv m64 txt) can be opened here, edited and saved (also as another file, even in other format). Perhaps it should look like list of frames (columns : frame_number A B L R < v > ^ S s), buttons like duplicate, insert empty frame, insert combination(for fighting games for example, combos can be stored in special files), switch set to enable and disable every joypad button in selected frames... I need your ideas here... 2) Converting Here you can choose input file, it's format (if not autodetected) and output format. of course smv>vbm conversion is not any useful, but fcm>fmv is. If files have different headers, user should be requested to fill some fields that can not be calculated. 3) Text format Text format is one for all emulators, it will make one file for every controler, all files will have same header, but controller number will be added to file name. If several files are selected as input, multi-controller output file will be created. Current idea of txt format:
[HEADER]
header|s4=VBM☻  // s4 means: string, 4 bytes
frames|u4=21332  // u4 means longword
...
author|s32=LazyZefiris
[FRAGMENTS]
savestate|256=AA34D2...4F // name|original start offset=hex data
[DATA]
0|:123  // original frame number | keypresses | length (123 frames in this case)
123|S // :1 is not needed for 1 frame combination
124|:6
130|S:2
132|:14
146|v
147|A
148|:10
...
214423|>:4
When converting to text file you can optionally add marker file with frame numbers and comments to be added to corresponding frames. While reading TXT file you can optionally enable writing marker file with all your comments and frame numbers. When TXT is read, all the text after // is ignored (/// is read as single /, //// as // etc). If line begins with // it is ignored and not counted as frame with no muttons pressed. Also all the data before | in DATA section is ignored 4) Movie in memory Every file format should be loaded into memory into next structure:
TMovie : record 
  filename : PChar; // original filename
  headers : longword;
  header : array of record 
    name : PChar; // name of header entry
    tp : byte; // type: 0 = signed, 1 = unsigned, 2 = flags, 3 = string
    l : integer; // length of data
    Sdata : pchar; // if value is string
    Idata : longword; // if value is numeric
  end;
  frames : longword; // movie length
  datastart : longword; // data start offset in original file
  controllers : byte; // number of controllers
  controller : array of record // up to 4 controllers
    data : array of longword; // up to 32 bits for every frame.
  end;
  fragments: longword; // number of unconverted fragments
  fragment : array of record
    name : pchar; // name for fragment (conversion purposes)
    size : longword; // size of fragment
    start : longword; // where it was originally in file
    data : array of byte;
  end;
  error : byte; // >0 if there were errors while working with rom
end;
The bad side of this format is that it uses dinamic arrays, and may be I won't be able to pass such records from dll to main program, then I shall have to make all arrays have fixed width, that means limited number of header lines, controllers, frames... expanding limits would mean more memory unneccessarily taken... 5) Plug-ins. Plugin for every format should have next functions(one plugin = one format): // IO: CheckHeader(fn: TMovie; var r: boolean); // checks if 'fn' is a supported file; Loadmovie(data: TMovie; files:integer; files:array of pchar; res:pchar); //res is reserved for whatever happens =) SaveMovie(data: TMovie; controllerID: integer; filename : pchar; res: pchar); // ControllerID is used when saving to one-controller file to point whict controler data to save // Editing: GetCode (s: PChar); //returns string that containg bit explanation ('ABLR' means bit 1 for A, bit 2 for B, bit 3 for L, bit 4 for R. 'xxxxyyyy' means first four bits for x and next four for y (for analog input) // Init Init(ext:PChar, Info:PChar); //returns supported extension and description // There also should be functions to retrieve header data from file, check if file header is correct (for autodetecting format)... Your questions and comments? 24.05.06: finishing writing VBM plugin capable of loading VBM file and saving it (input and output files are exactly the same). Next is trying to make convenient editor... EDIT: Big part of editor is ready, basic editing, adding and removing frames does work (although ading or removing frames in beginning of movie takes too much time and has to be optimized somehow... Now thinking about it.) Copying-Pasting fragments will be done through special "combo list" where you can store combinations, copied from movies, looks quite simple to use. I should finish first beta tomorrow if I have time...
Player (105)
Joined: 1/30/2005
Posts: 564
Location: Québec, Canada
You can have a few ideas here and here. It seems like the most wanted features are copying/pasting a bunch of frames at the same time, for example to copy a difficult combo in mortal kombat or any other fighting game without having to re-do it frame by frame. I think an important thing for the plugins would be a function that returns information about the supported types. For example, it should return the formats supported with the extensions, and have a separate function for each of these types. The idea of a plugin based program is wonderful. I think if some programmers here join the project (ideally the ones who program the different emulators, since they're more likely to know the file types and such), you'll be able to provide the community with this great tool in a very short period of time. Good luck with this project!
Post subject: Work in progress
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
Checked if plugins will work with dynamic arrays - by now it works perfectly. Now writing fully functional vbm plugin to start working on interface =) I hope everything will go well...
Joined: 12/14/2004
Posts: 261
Location: Mars
for the combos moves. I wish you to add a feature called "Shortcuts" in which combos can be simply (written and execute) For Example Doing Ken's HCF+P (Half circle front+Punch) should get a shortcut key like this, inputing HCF+P will exceute the move. This idea is taken from Final Burn Alpha Macros keys/shortcuts.
Radz.
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
shakespeare, why would that be desired? the tool is for editing, not creating. Of course, you can create from there, but why not create in the game then copy it on the editor?
Joined: 12/14/2004
Posts: 261
Location: Mars
FODA wrote:
shakespeare, why would that be desired? the tool is for editing, not creating. Of course, you can create from there, but why not create in the game then copy it on the editor?
You mean just for converting various files? not for editing thier moves? Forgive me.
Radz.
Post subject: Re: Starting new movie editor. Need suggestions ^^
Tub
Joined: 6/25/2005
Posts: 1377
I haven't really reviewed your code structures, but I'm pretty sure that this
5) Plug-ins. Plugin for every format should have next functions(one plugin = one format):
isn't needed. IMHO a simple description of the format (like you mentioned above) and a generic loader that can parse those descriptions is probably enough. Saves you the trouble of compiling seperate dll's and dublicating code.
of course smv>vbm conversion is not any useful
there's no reason for artifical limitations. If a user really wants to do such a conversion (e.g. for different releases of the same game), just let him. Sure, problems will arise when the consoles have a different amount of buttons, but don't make it more restrictive than you have to.
m00
Post subject: Re: Starting new movie editor. Need suggestions ^^
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Tub wrote:
there's no reason for artifical limitations. If a user really wants to do such a conversion (e.g. for different releases of the same game), just let him. Sure, problems will arise when the consoles have a different amount of buttons, but don't make it more restrictive than you have to.
Actually, this feature opens great new possibilities for bigame movies!
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
I bet fcm->smv could be done with some delays inserted between levels to convert existing SMB3 movies to run in Super Mario All-Stars. A suggestion about the editor: Make sure you have some way of representing analog input, or M64 editing won't work too well. Also, it seems like this is the 3rd or 4th independently started project of this nature, maybe there should be some code sharing or something...
Post subject: Re: Starting new movie editor. Need suggestions ^^
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
Tub wrote:
IMHO a simple description of the format (like you mentioned above) and a generic loader that can parse those descriptions is probably enough. Saves you the trouble of compiling seperate dll's and dublicating code.
Writing generic loader is much more troublesome than making separate dll files... And plugin system is much more universal )
of course smv>vbm conversion is not any useful
there's no reason for artifical limitations.
I said it is not useful, but I never said it won't be possible `^^ I will make some way do describe reqired conversions (some file should describe how missing header field are filler, and how a buttons should be remapped from 1 format to another) Analog input does not seem to be a problem )
Post subject: Very-very early beta =)
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
Here is TAS editor in its current state: http://www.savefile.com/files/3654191 Working features: - Opening file / saving to another format (no real conversion, but exporting to txt and importing back works fine) - Reloading file - Backup of original file Editing: - Duplicating frames - Removing frames - Copying frames to combo list - Inserting combination from list - Deleting combination from list - Editing key states for every frame Plugins: - VBA open/save - SMV open/save - TXT open/save - M64 open todo: - more plugins - combo lists saving/loading - conversions - plugins configuration known bugs: program often says there are "Access violation". If it happens, try to repeat actions you did, if it crashes again - report your actions and crash message here please ^^ how does selection work? most of the actions with frames (duplicating, removing, copying) are done with selected range - it's borders are shown above combo list. When you modify borders there, it is not displayed on frame list, but selection is applied. Range selecting using frame list looks obvious to me, ask if you don't understand how it works. I am taking little break, there are exams soon, you know... =)
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
I haven't downloaded it, but what are you making this with? I recommend .NET 2 if you aren't already using it (you can get VB .NET 2 or C .NET 2 Express editions completely free from Microsoft's website).
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
Delphi 7 , it's most convenient editor and language for me. I am not going to rewrite it on any other language.
Player (105)
Joined: 1/30/2005
Posts: 564
Location: Québec, Canada
TODO: Faster loading. It took me about 2 minutes to open my Illusion of Gaia any% run. I don't know what could make it go faster, but it's insanely long for now. Looks great though .. I'm impressed by how fast you came up with this beta, fully featured (almost). Great work!
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
It's not loading speed, it's displaying. I guess I will have to rewrite whole displaying and editing part. I have idea already. It will add some inconveniece, as you will not be able to scroll while selecting (that means to select big block you will have to enter start and end frame numbers). Thanks :)
Editor, Reviewer, Experienced player (979)
Joined: 4/17/2004
Posts: 3109
Location: Sweden
Things I noticed (I only tested briefly with VBM): - Very slow loading (as noted). - Contents of window are not shown while dragging the scrolling bar. - Selecting a few lines and selecting "duplicate lines" from the menu gave me 'Invalid pointer operation', but no crash and the program still seemed to perform the operation - Insert and duplicate line commands are also very slow - "Move up" and "Move down" commands doesn't seem to have any effect - There doesn't seem to be any way to change if a button is on or not (to remove a stray shot, for example). Space on selected column could do this. I think FMV and GMV support are the two most important features to implement. I'm surprised how good it is considering fast you threw it together.
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
move up / down is still not implemented; try using number buttons to edit cells contents. Here is how it works: If cell is just selected then pressing numeric key will replace its content; If cell is selected twice - key value will be added as next symbol, try and take a feel of it )
Player (105)
Joined: 1/30/2005
Posts: 564
Location: Québec, Canada
Some things I noticed: - Program ALWAYS asks if I want to save the movie file, even though I never touched anything. Adding a global variable "Edited" or something similar would do the trick. - Can't delete combos. Adding a right-click menu would do the trick here. You could also support the Delete key from the keyboard. Adding a Confirm message would also be cool since you don't want to delete anything by accident, right? - Program seems to have issues handling memory when closing. It sent me in an infinite error-box messages loop a few times when I selected Quit from the menu. That's all for now. Sorry to point problems out, but that's what beta testing is for! :) If you need any help/advice (which I doubt .. you seem like a good programmer), I've got some experience with Delphi myself. Two heads are better than one! :) Good luck with the rest! This is going to be a GREAT tool for TASers!
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
Halamantariel wrote:
Some things I noticed: - Program ALWAYS asks if I want to save the movie file, even though I never touched anything. Adding a global variable "Edited" or something similar would do the trick.
When whole editing will be done, I will add that variable )
Halamantariel wrote:
- Can't delete combos. Adding a right-click menu would do the trick here. You could also support the Delete key from the keyboard. Adding a Confirm message would also be cool since you don't want to delete anything by accident, right?
Did you look through menus and shorcuts?..
Halamantariel wrote:
That's all for now. Sorry to point problems out, but that's what beta testing is for! :)
That is right what I need - pointing problems out. I am writing program for everyone, so it should be convenient for everyone...
Halamantariel wrote:
Good luck with the rest! This is going to be a GREAT tool for TASers!
Thanks :)
Player (95)
Joined: 6/25/2005
Posts: 122
Another feature that you could add--a built in frame<->minute:second:frame conversion/calculator. When I'm analyzing Gens runs, I find myself doing a lot of mm:ss:ff subtractions by hand.
Post subject: Current changes
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
I am still not ready to upload new version, but here are thing changed: - Popup menu on combo list (Delete / View) - Asks to save only for modified files - Changing format via menu calls conversion function (i will release new version as conversion is done) - Movie is now displayed *much* faster in table - M64 movie now loads all frames from file and fixes number of recorded input lumps - Started working on conversion dialog, here is the main idea of how it is going to work: Every format has list of headers required to include in it's file. When you try to convert, you get list of required headers, for each of them you have three options: set it's value on your own, set it to some default value from plugin or get it from existing header (this option is set by default for those headers that have corresponding existing headers with same name). There are also frame conversion button that lets you change bits order in frame data. When everything is set up - your movie becomes one of new format, but old non-overlapping headers are not removed, so if you export your movie to TXT format - they all are exported. Of course they will be ignored when saving data to selected format. Also I found out that SMV file often have frame data after expected end of data. Currently it is being loaded as raw data to "smvlostdata" fragment. I think I will add option to load all data in file and recalculate frame number. In one MMX2 movie I found about 100000 of unused frames o_O. I also looked through manual on making dlls with memory allocation in them, and found ot that it would work better if I included borlndmm.dll, so next release will have one required dll to run (i will include it into archive of course)
Active player (328)
Joined: 2/23/2005
Posts: 786
If this editor will allow you to copy and paste frames into different movies, I'll be happy.
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
it already does... ^^ you can open first movie, select frames you want to copy, add that selection to list, then open second movie and insert it...
Post subject: New version ^^
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
New version: http://www.savefile.com/files.php?fid=8857699 Conversion is still not working, but: - fixed major bugs with memory, it now does not crash THAT often - added export-only SRT plugin (not configurable yet, output is for 60 fps movie, starting offset is 0) - m64 plugin now can save - combo list now can be stored in file I think TASedit can already be used to edit single player smv, vbm, m64 movies ^^ The only blocked feature for now is moving selected lines up or down... Next thing to do is add support for fmv, gmv and fcm files... May be I will release them as plugin pack soon :D
Joined: 2/13/2006
Posts: 39
Location: Finland
You asked for suggestions: I didn't try out the program, but judging from the earlier posts, the tool is made for Windows. Make the program cross-platform from the beginning. Really, although I propably won't ever make a single TAS, there are a few TASers, who I know, using Linux here. There is also Mac OS X. From my experience, cross-platform programming isn't too difficult. Just use universal libraries (there are even cross-platform libraries for creating guis). Making the program work on other operating systems will propably make plug-in system more complex, maybe it should be changed into general loader. And of course you will release the source, won't you?