Commit Graph

94 Commits

Author SHA1 Message Date
adelikat 3bfe716952 Fix drag and drop importing so it doesn't crash during null emulator. Also fixed the movie sram clearing function to not crash on null emulator. 2012-03-03 18:11:07 +00:00
brandman211 79d12b9181 -Refactored NES and PCE button orders.
-Realized that FixMnemonic is useless as GetControllersAsMnemonic() + WriteMovie() = Fixed.
-Finished the NES / PCE importers, now without string builders (Thanks zeromus)!
-Converted ImportMMV to this same method.

TODO:
-Decide how's the best way to handle the mnemonic header and implement it. Apparently, anything other than a predefined header and a | is considered as a comment, so I might do something like:

comment Mnemonic format:
[0|UDLRsSBA]
2012-02-19 07:09:24 +00:00
brandman211 213b347779 -Fixed the infinite loop caused by Movie.FixMnemonic. That was dumb.
-Removed the FCEUX handling from SubtitleList.AddSubtitle; it didn't work at all, which is good because we no longer support FM2 natively anyway!
-Added MovieImport.AddSubtitle, which parses FM2 subtitles and forwards them to the .TAS movie object.
--For the color, I used 16777215 as it seems the subtitles use decimal instead of hexadecimal...why?
--Even though I used this color, which is definitely the equivalent of FFFFFF (white), the subtitles show up as black. I don't think this has anything to do with the importer, but it's worth looking into.
2012-02-15 19:31:11 +00:00
brandman211 145830d5a4 -Began working on the importer.
--Created ImportFile to decide what function to use for each filetype.
---It currently automatically writes to a .TAS file, but that option will eventually only be applied when specified in the GUI, hopefully completely external from this class.
--Made IsValidMovieExtension work.
--Created LoadText to do the majority of the work that both .FM2 and .MC2 need to be done.
--.MC2 seems to work perfectly, not that it was a hard conversion!
--.FM2 seems to convert most headers correct, except for subtitles, which replaces the beginning portions of each subtitle's text with 0 0 120 4294967295. Not sure what that's about, though this sure feels like deja vu...
--I still need to switch around the order of the buttons the frames are added, but I need to find out what way I can do this without reinventing the wheel.
-Added the FixMnemonic function to Movie.cs. It currently does nothing, but my goal is to have it correct the mnemonic for all frames in a movie file based on the position of the characters.
--As of right now, ImportFile uses this.
-MainForm.IsValidMovieExtension only checks whether or not its .TAS or not now.

TODO:
-Fix the FM2 subtitles.
-Shift around the FM2 buttons.
--After completed, test a .FM2 file that should sync and see if it works, with and without FixMnemonic being used.
-Make FixMnemonic actually do something.
-Refactor code? I originally thought it'd be best to treat Movie.LoadText just like any other importer, but I think at this point it might just be best to keep these things completely separate.
-Consider the possibility of working with the binary file importers.
--Yes adelikat, I am somewhat interested, especially considering how useful it would be to have a working .FCM importer so I can compare old runs when TASing. I already was hoping to learn about .VBM and .SMV for my ButtonCount.lua script. By the way, might this be bundled with bizhawk as it is with FCEUX 2.1.6? :)
2012-02-15 06:54:09 +00:00
andres.delikat fbc365c4d2 Fix loading of post movie savestates (savestates made while in movie finished mode). Complete fix When in read-only. While in read+write it throws a loadstate error. This isn't ideal but at least prevents possible movie corruption. 2011-09-29 01:46:35 +00:00
andres.delikat 6bbab41b0c PCE - Implement PCECD system id in core and in game info. Also set cancel property of LogWindow winform 2011-09-24 17:05:34 +00:00
andres.delikat edb40f4087 Movies - fix bug where rerecord count value was getting added as a comment on load 2011-09-24 16:09:40 +00:00
andres.delikat a827bb7838 Remove a debug oncreen message in movie savestates 2011-09-18 17:10:10 +00:00
andres.delikat a30a5290ca clear saveRam when loading a movie. Add movie name to saveram default path generation so that movies do not interfere with users saveram files 2011-09-17 14:23:23 +00:00
andres.delikat 5eba8bc7f3 Movies - fix problem with NES loadstate & timeline checks that caused the Frame value to not parse properly. Also add messages to the catch statement in the event of parse failure. 2011-09-10 02:08:16 +00:00
andres.delikat 45609f4e88 Movies - fixed major bug in rerecording logic. Loadstate was truncating movie input based on global.emulator.frame BEFORE loading that value! Thus loading a state (in record mode) from an event later than the current frame count was truncating the input, then loading the actual savestate. Movie loadstate now truncates based on the state's frame count 2011-09-07 01:18:58 +00:00
andres.delikat a787fe3c60 Movies - Fix a major logic flaw in the CheckTimeLines() logic. Should compare from 0 - state frame count, not 0 - length of state input log 2011-09-07 00:40:42 +00:00
andres.delikat 984abbb869 Refix bind savestates to movies option 2011-09-05 00:50:50 +00:00
andres.delikat bf76e1e7e0 Refix recording movies from "Now" so that the StartsFromSavestate flag gets properly stored into the movie file 2011-09-04 19:04:00 +00:00
andres.delikat a84f881c5c Movies - Remove UserMovie and change all references to it to Global.MovieSession.Movie, fix error in CheckTime Line logic, read-only savestates should now work 2011-09-03 18:07:30 +00:00
andres.delikat 276c759d88 Fixed Loadstate stream issues, rerecording is now possible again 2011-08-20 19:27:00 +00:00
kylethomson 2243c7dcad Fixed Multitrack-load crash.
Also, read-only can't be toggled while no movie active. 
Same for multitrack.
2011-08-17 02:06:50 +00:00
andres.delikat 64e38e83c8 Movie Loadstate - GUID checking in read-only mode + fix a crash bug 2011-07-31 17:35:02 +00:00
andres.delikat 3481943b74 Overhaul movie savestate logic - cleaned up a lot of code, implemented GUID, Future Event, and Timeline checks to read-only situations. Prevented loading of state if an error occurs. Still TODO - GUID checks in read+write mode 2011-07-31 16:41:27 +00:00
andres.delikat ce3bb25409 Movie object cleanup, movie savestate handling cleanup, save GUID into movie savestates 2011-07-31 01:15:14 +00:00
andres.delikat 60a4ea4426 Refactor movie code - a Loaded property, removed a lot of code that was a work around for this needed feature, movie can not write to disk unless this property is true 2011-07-30 23:59:31 +00:00
andres.delikat 2e68314e01 Movies that start from savestate now supported. Record Movie dialog "Record from Now" option implemented. ResetFrameCounter() added to IEmulator and implemented in all existing cores 2011-07-30 20:49:36 +00:00
zeromus 5580295085 movie input refactoring 2011-07-24 23:14:16 +00:00
andres.delikat 72699b4ad7 another round of refactoring the Movie object 2011-07-17 17:52:39 +00:00
andres.delikat e6b2c794d4 Refactor the movie object, replacing Getfunctions with public properties, renaming of some functions, removing a duplicate function, other misc things 2011-07-17 14:39:15 +00:00
zeromus 2c683dc90a dont crash on exit while writing inputlog 2011-07-13 01:45:40 +00:00
andres.delikat a228e05f38 Lots of little fixups to movie code, disable Disable Message config in Message Config as I won't be implmenting that before release 2011-07-13 01:29:13 +00:00
andres.delikat 29510ddd58 Fix saving of header data from record movie dialog, small fix for inputlog header data 2011-07-06 01:53:15 +00:00
andres.delikat 945577dadd Movie code clean up - document PreLoadText(), put movie truncation in LoadLogFromSavestateText() since it was rudely removed from what is now CommitFrame() 2011-07-05 23:33:13 +00:00
andres.delikat 68d0ff94eb Refactor movie writing code. MovieHeader, MovieLog, and SubtitleList all have their own write methods now instead of the Movie object doing all of the work. Conceptually these 3 objects should be autonomous and the Movie object is simply an object that manages a collection of these objects. 2011-07-05 23:16:54 +00:00
andres.delikat b6bd94242f Subtitle & Comment editors - clear out old comments & subs before saving the new list 2011-07-04 13:37:51 +00:00
andres.delikat 88f14d07d8 Fixes to comment loading/editing/saving 2011-07-04 13:31:34 +00:00
andres.delikat a95ffcf2f9 Hooked up comment editor/viewer to play movie and context menu, various tweaks to movie code, more progress implemented comment loading/editing/saving 2011-07-04 02:50:38 +00:00
andres.delikat 384a4a61b6 Start movie comments editor 2011-07-04 01:57:18 +00:00
andres.delikat f886b65015 Write subtitles to movie files 2011-07-04 00:49:37 +00:00
zeromus 0aa234282e phase 1 of fixing up controller logic. tell me how terribly ive broken the movie code. might want to fix it before moving on to phase 2 or decide to revert. 2011-06-27 05:31:46 +00:00
andres.delikat d3f4da39a3 Subtitle viewer implemented for play movie dialog, context menu for edit/viewing subtitles (depending on read only status). Still TODO: save changes when in edit mode 2011-06-26 21:11:12 +00:00
andres.delikat 3a15dd6bb9 Basic subtitle loading and rendering. Still lots of todos but basic functionality now exists 2011-06-26 16:39:48 +00:00
andres.delikat 61e82793e9 Start movie subtitle system 2011-06-26 14:36:41 +00:00
andres.delikat f5014946db status strip - pause icon implemented, movie icon put in but hidden and unimplmeented. Dump Error warning icon put in and disabled, needs to be implemented 2011-06-19 20:50:46 +00:00
andres.delikat c6a5c7e9b6 change references of Global.Game.Name to Global.Game.FileSystemSafeName for situations that use it to build paths 2011-06-18 21:39:53 +00:00
andres.delikat b95264e9bf Make movie class handle automatically backing up a movie before the first time it alters it, add flag to MultiClient to toggle the movie backup feature 2011-06-18 19:16:05 +00:00
andres.delikat 67f726eae6 Movie backup function added to movie class, currently only hooked to a context menu item of main form 2011-06-18 18:27:51 +00:00
kylethomson c228699255 Getting closer. 2011-06-17 02:43:22 +00:00
andres.delikat 9e7510894e Don't reference usermovie in the movie class 2011-06-17 01:50:51 +00:00
kylethomson e9942dc101 Multitrack overwrite works. Now to fix playback. 2011-06-16 03:56:40 +00:00
kylethomson 882562c452 Multitrack for PCE done, if my idea works. Now to hook up hotkeys. 2011-06-16 02:29:45 +00:00
kylethomson a4fe9754c0 Look at where the error is - This is what I need to access. 2011-06-16 01:35:42 +00:00
andres.delikat f36da18f97 Small fixups to movie & tastudio code 2011-06-12 18:31:42 +00:00
andres.delikat 59173e4e44 Some virtual pad progress, virtual pad dumps input into movie file when recording, currently doesn't feed it to the core though (lol). Virtualpad object set up for a nes controller 2011-06-12 14:42:50 +00:00