Commit Graph

123 Commits

Author SHA1 Message Date
adelikat 12ea262de9 Movies - if in read+write mode and loading a post-movie savestate, the movie will now correctly go into movie finished mode, rather than stay in recording mode and cause desyncs 2012-09-16 14:57:57 +00:00
adelikat ac6cf7a18d Movies - fix a logical flaw in a case in movie finished mode. While in movie finished mode, a timeline check should still be done (if in read-only mode) before loading a state from a different timeline (even if that savestate is a post-movie savestate). This matches behavior in FCEUX 2.1.6 (all versions of FCEUX and BizHawk until now have this bug) 2012-09-16 14:12:42 +00:00
adelikat f9bc7fd15e Movies/Paths - add a backup movie path to Paths config and have Movie backups use that path 2012-09-13 00:44:17 +00:00
adelikat 80012d29c6 TAStudio - store whether or not a frame was a lag frame along with the state for green zoning, show lag frames in red based on this flag rather than something recorded into the movie file, also fixed a bug I introduced in the last commit 2012-09-03 21:28:10 +00:00
adelikat ac91ed67a6 Movies - refactor & cleanup the MovieLog class 2012-09-03 20:55:05 +00:00
adelikat 6142e2a8f1 Movies - a bit more cleanup 2012-09-03 20:26:51 +00:00
adelikat 1b20175a81 Movies - final round of refactoring, also removed all code relating to the StopOnFrame variable. The fast foraward button on TAStudio now loses some functionality, but the code that did it needed an overhaul 2012-09-03 20:17:57 +00:00
adelikat 8f408737da Movie refactoring - round 2 2012-09-03 19:42:53 +00:00
adelikat 27f4663125 Movies - round 1 of code cleanup (no functional changes) 2012-09-03 15:05:09 +00:00
adelikat 7bc1e88d1d TAStudio - Rewind button - fix logic when movie is finished or inactive 2012-08-28 03:18:53 +00:00
adelikat 7ad3ea9ef5 Movie - clean up some code that has gotten crusty in the frame loop and refactored it, fixed logical errors at the end of a movie regarding playback, rewind, and loadstate. Movies now go correctly into finished or play mode under various circumstances. Removed the stop on frame code because it was breaking things, this will be a regression in functionality in tastudio until it is rethought. 2012-08-25 23:31:54 +00:00
adelikat 5486acbbbc Movies - fix a regression that happened at some point where the movie is not truncated on a loadstate that triggers record mode (instead it would keep the entire movie in the savestate and record over each frame, this would leave garbage data that could lead to potential desyncs) 2012-08-25 22:18:54 +00:00
adelikat 514c3200d7 remove more tastudio instances in movie class, TAStudio - re-hook up double click event 2012-08-18 00:04:12 +00:00
adelikat c9ddbd6d89 TAStudio - implement Cut function, fixes to insert, and delete, minor cleanup of movie object 2012-08-17 23:56:37 +00:00
adelikat 952892b5df TAStudio - implement Truncate Movie 2012-08-17 03:24:33 +00:00
adelikat d7e05ceb32 TAStudio - implement clear frame, pause emulator on TAStudio load 2012-08-17 02:26:47 +00:00
adelikat 9baf1b8f28 TAStudio - implement clone frame feature, and some UI and Movie object cleanup 2012-08-17 02:18:25 +00:00
brandman211 1bedd81666 That optimization for movie length calculation in the PlayMovie dialog now accounts for files with new line characters of all sizes. 2012-07-25 08:01:02 +00:00
adelikat 4d91471bab Record movie dialog - use filesystem safe name of game when choosing a default name. Fix regression that made default filename not populate in the savefile dialog. 2012-06-25 00:06:07 +00:00
phillip.grimsrud a6ced95e07 1. Fixed tastudio memory leak. This was accomplished by dropping the oldest saved stats after hitting a size limit (1 GB).
2. Changed StopOnEnd to StopOnFrame. This expands the functionality so that you can tell the emulator to run and then stop at a predetermined point.
3. Expanded the functionality of RewindToFrame to handle more cases. Now you can go back or even forward to a frame and it handles the execution and greenzone appropriately.
4. Due to the change in structure some code was changed to check the index of the first and last saved states in the greenzone rather than relying on the size of the saved state list.
5. Changed the list of saved states in the movie log from a list of byte[] to a list of structures (the structure has an int for the index and byte[] for the state).
6. Saved an init state in the movie log. This is used to go back to the beginning if the beginning of the movie is no longer in the list of saved states.
7. Expanded the AddState and SetFrameAt logic in the movie log to account for the fact that the size of the saved state list is now capped.
8. Fixed a bug in the log interpretation for SMS.
9. Fixed a bug in the sms virtual controller, buttons 1 and 2 were hooked to the wrong objects.
10. Fixed the tastudio listview to show lag as pink.
2012-06-18 01:36:38 +00:00
phillip.grimsrud cb4c45eb70 1. Upgraded insert and delete functions in tastudio to support multiple selection.
2. Fixed issues with the light blue current frame pointer in tastudio
3. Removed a totally useless index that was being kept seperately in the movie log.
4. Moved the tastudio update after the check to see if the rest of the saved state list is valid.
5. Changed some function/variable names related to the movie log for clarity.
2012-06-07 04:47:54 +00:00
phillip.grimsrud c7db5fd543 1. Fixed an issue that prevented going into the movie finished state properly.
2. Relegated a memory leak to tastudio.
2012-06-03 04:04:13 +00:00
phillip.grimsrud d6479e5613 These changes are TAStudio related.
1. Added a list of save states to the movie log.
2. Added corresponding support functions for the save states.
3. Added double click to the list view to load a previous frame.
4. Added a context menu to the list view with insert and delete.
5. Fixed some issues with the green zone of valid state history.
6. Fixed an input bug that I had unwittingly created, as well as issues with the nes log format.
2012-06-01 05:49:26 +00:00
phillip.grimsrud fc0ec832ae These changes are for TAStudio upgrades. If I've broken other stuff please yell at me.
1. Hooked up Fast Forward, Fast Forward to End
2. Made a placeholder for Turbo Fast Forward.
3. Fixed rewind to not stomp on the previous frame with new input.
4. Fixed rewind to stop at the beginning of the movie instead of freaking out.
5. TAStudio now shows data from the most recent frame.
6. CommitFrame is called even if not recording so played back frames also show up in TAStudio.
7. Play mode only stops at the end of the movie if you tell it to. Your emulator normally continues to play with no input after the end of the movie.
8. TAStudio is now updated after a rewind (even though the rewind doesn't play a new frame).
9. Split the tools update into before and after updates.
10. Going into read-only mode adjusts the movie mode.
11. Implemented New, Open, Save, and Save As for TAStudio.
12. Fixed an issue where frames past the end of the log would default to the input from the last frame of the log.
13. Fixed a problem where you couldn't rewind to frame 0.
14. Fixed a scrolling issue in the TAStudio list view.
15. Fixed an issue with the TAStudio virtual NES controller not matching up with the log.
16. Fixed an issue where the NES reset button would get held in when rewinding.
17. Added/Modified a couple of button graphics.
2012-05-28 00:44:27 +00:00
adelikat 75b5ec9223 redo revision 2168, this method also fixes the issue of loading a non-movie state while a movie is loaded, but also doesn't break the parsing of the savestate frame value in CheckTimeLines 2012-04-22 13:38:12 +00:00
adelikat 3bae8da0b6 Adjustment to height settings of osd messages, code clean up in movie.cs 2012-04-16 12:17:25 +00:00
zeromus 35fbe354c1 add threaded display manager to allow heavy OSD/compositing/filtering to happen on another thread. add a lua layer accessible via GDI+ which can be automatically composited and the simplest possible demo of it. add some filtering infrastructure and a hq2x filter set ported to c# but need to work on a minimal selector gui before its usable. separate OSD from RenderPanel so that gdi+ presentation mode now gets full OSD support. the OSD is now a little uglier because its drawn entirely differently and could use some finetuning 2012-04-16 08:18:41 +00:00
rolanmen1 fd6a1a88da Emulator Won't Crash When User Loads A State That Is Not Embedded To A Movie 2012-04-05 01:42:24 +00:00
andres.delikat 50e357f345 Lua - start work to implement lua.get/setrerecordingcounting functions 2012-03-29 03:09:46 +00:00
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