Commit Graph

83 Commits

Author SHA1 Message Date
adelikat dde1169325 Capture BoardName parameter into movies. Also fix NES imports to set platform to NES for FDS movies, and instead set the BoardName to FDS 2013-08-24 20:11:41 +00:00
goyuken 04bbf8482c move all of the movie mnemonic reading\writing stuff to one new file 2013-07-14 14:53:32 +00:00
adelikat 7199b64a95 More multiclient refactoring 2013-04-15 02:14:14 +00:00
brandman211 a346389c2f -Controller type for GBA.
-Cleanup (adelikat inspired me to always use braces).
2012-12-06 05:19:08 +00:00
zeromus 562eeb18bd give movies the ability to write to any stream; decouple saving of movie from the import process, and make the bulk movie importer use new movie ability to write directly to output instead of copying (sometimes on top of itself in case source .fm2 was already in movie directory); make drag&dropped movies import to oldmovie.fm2.bkm.autoimported.bkm to prevent it from clobbering a legit movie you may have had there already 2012-12-02 20:35:51 +00:00
brandman211 3b80905514 Added MovieOrigin to .ZMV...I knew I had to have forgotten something unimportant. 2012-10-07 04:58:12 +00:00
brandman211 d54b6d2f36 -Resets are imported. I don't think they count as frames.
--I think SNESHawk has a problem with processing resets!
-The author is imported. ImportZMV is probably, in effect, complete!
2012-10-06 22:36:50 +00:00
brandman211 9199012b5f Finally figured out ZMV input...wasn't fun at all. Still need to figure out commands (Reset) and author data, but I removed the INTERIM flag check because this is functional enough to be included in the next release. 2012-10-06 20:28:32 +00:00
zeromus a00081386d fix some things related to sgb movies 2012-10-05 18:20:27 +00:00
brandman211 515fd82b32 Fixed the savestate size calculation. 2012-10-05 01:10:58 +00:00
brandman211 35bd1539f8 -Added entries for all of the .sha256 records to the header.
-Added support for the following .lsmv records: projectid, port1, port2, starttime.second, starttime.subsecond
2012-10-04 06:50:47 +00:00
brandman211 ae1f987061 -Removed the magic strings from MovieImport.
-Fixed some headers for ImportVBM.
-Treated .VBM SGB movies as GB movies with an extra comment.
-Confirmed that real SGB movies from LSNES import properly.
-Noticed glitchy graphics during SGB movie playback...will investigate.
2012-10-04 06:14:21 +00:00
brandman211 14126723c0 -Detecting subframes and delayed resets in ImportLSMV now results in a warning instead of an error.
-ImportLSMV can now import GB(C) movies created with LSNES's gambatte core.
--It doesn't sync perfectly because of the subframes, but it does for a while, so the conversion is sane.
--GB(C) .LSMV files currently always have SRAM files packaged with it, which is a bug with LSNES.
---Ilari told me that a fix for now would be to ignore 0 byte SRAM files, so that's what I did.
---There are some cases in which the spurious SRAM files aren't 0 bytes, but that's on Ilari to fix, so I'll let this case fail. Yay, I contributed to LSNES!
2012-09-27 06:23:05 +00:00
brandman211 eb9f37d6bd -Fixed up warningMsg code for various importers.
-Made what seems to be progress with ImportZMV...still not functioning though.
2012-09-21 09:11:30 +00:00
brandman211 2d0d57f81d -Discovered that the infinite loop in ImportZMV is the result of RLE reading in a huge and impossible frame number.
-Made ImportZMV only work on interim versions. I don't think I will be able to get it done in time for 1.1.0.
2012-09-21 07:33:34 +00:00
brandman211 755794baa8 Attempted to handle events, which clearly failed as the program freezes for some reason. The logic seems solid, though...I'll come back to it. 2012-09-19 06:40:16 +00:00
brandman211 4ebca847d0 ImportZMV
-Fixed the controllers used code. The docs had the reserved byte and the controller flags backwards.
-Properly advanced past the savestate bytes. I was reading the wrong size.
2012-09-19 01:52:54 +00:00
brandman211 3d9d8607c3 Handled commands for ImportVMV, making resets translate properly. 2012-09-17 07:22:35 +00:00
brandman211 bdd74e356c -ImportSMV
--Fixed "controller in use" handling.
---Applied the same logic to ImportVBM, refactored ImportVMV to match.
--Prevented more than 2 controllers from crashing the controller types check for 1.51 and up.
-ImportZMV
--Showed warning messages for both mouses if enabled.
--Marked the controllers used just like I mentioned previously, though it seems to show that no controllers are plugged in...
--Went past the savestate data.
2012-09-17 04:16:27 +00:00
brandman211 5682f8dbe2 -Added CRC header items for formats that don't store any other reference to the ROM file.
--Added Checksum / GameCode for ImportVBM because those seem more relevant.
-ImportVMV has problems with resets. Not a high priority, but still something worth looking into.
-Parsed the header for ImportZMV. The remainder looks pretty ugly...
2012-09-15 18:46:41 +00:00
brandman211 e7b5f57a01 Fixed .SMV >= 1.51 extra ROM info by appropriately shrinking the size of the metadata. 2012-09-15 09:48:13 +00:00
brandman211 dbe985d3b9 -TODOs:
--It doesn't seem like I have to worry about PCECD anymore.
--I also don't think I can validate the CRC32 for .SMV because I don't have the original ROM bytes. This was probably used to compare a ROM loaded by Snes9x with the movie. I added it to the movie header in case a core could utilize it.
--I don't think the "start data" of a .VBM is important. After looking at the docs again, it's clear that it's just another term for either the movie's savestate or SRAM, and that the related note about controller data is just an approximation.
-Added Platforms for Import functions that were missing them.
-Merged the ImportSMV functions all into one; most of the stuff is the same.
-Implemented .SMV 1.51 handling. My Arcade's Revenge run synced and beat the first level!
--This also seems to work for 1.52; 3295S finished Act 2.
--1.53 seems identical as well...3587S syncs all the way through.
-Next comes ImportZMV.
2012-09-15 09:38:20 +00:00
brandman211 feb503c502 -ImportSMV143
--Added platform name.
--Handled input.
---The input seems reasonable, but the frame counts were originally off by 2. Because the docs say "The controller data contains <number_of_frames + 1> frames," I connected the two and discarded the first frame read. I also noticed that Snes9x first accepts input at frame 0 whereas BizHawk does at frame 1, so that makes up for the other frame. I think this is correct.
--Apparently, Snes9x adds garbage bytes to the metadata when you play a movie. The stuff we want, however, is before a NULL character. As such, I refurbished RemoveNull into NullTerminated, which takes a string and returns everything before the first NULL character. Now the author will be displayed properly no matter what.
-Removed an unncessary dependence to Global.Emulator.SystemId in Get/SetControllersAsMnemonic which made it so that importing a movie without loading a game resulted in blank frames.
-ImportVBM now actually appends the frames it parses. Looks pretty good.
--Note that BizHawk cannot currently do anything with the platform (GB, GBC, GBA, SGB), nor are any of the "other" buttons handleable.
2012-09-14 22:15:42 +00:00
brandman211 17567b4952 Fixed the author / game name handling. Now all that should be left is the actual input for SMV143. 2012-09-14 17:36:49 +00:00
brandman211 c949276815 -Parsed the gameName from the extra ROM info.
--I think the proper way to obtain this is through the metadata, which I still don't know how to handle.
-Fixed the savestate offset.
-Parsed out the CRC32 of the ROM, though I haven't done anything to validate this, which is probably a good idea.
2012-09-14 01:53:04 +00:00
brandman211 1c4b218289 Progress with ImportSMV143. 2012-09-13 19:33:55 +00:00
brandman211 9da5393ce3 -.LSMV: \r is considered off. Empty lines should be ignored. 2012-09-13 10:26:44 +00:00
brandman211 7f2a18b3af -.LSMV importer.
--Handled authors, gametype, systemid, coreversion, rom.sha256, moviesram.*, savestate, and subtitles.
--Skipped port1, port2, controlsversion, projectid, saveframe, lagcounter, pollcounters, hostmemory, screenshot, sram.*, rrdata, starttime.*, savetime.*, and prefix.
---I don't think any of these are useful for us, at least not at this stage.
---The other *.sha256 files will be useful if / when BS-X, Sufami turbo, and SGB are implemented.
--Handled flags.
---Handled resets.
---Disallowed subframes and delayed resets.
-.LSMV is good enough for now. .SMV and .ZMV coming next.
2012-09-13 10:21:25 +00:00
brandman211 c3fcbc5987 .LSMV importer now handles gamename and rerecords. 2012-09-13 02:45:08 +00:00
brandman211 ae4dfbc00e -Imported .LSMV buttons.
--Haven't done anything with the flags because I don't know what they are supposed to do yet.
--Speedy Gonzales v2 doesn't sync after being converted, but I don't think that's my fault.
-Flags and other data will be parsed soon.
2012-09-12 05:59:09 +00:00
brandman211 8a24de458f -Added the SNES formats to the Import dialog.
-Figured out how to get files from the .LSMV archive. Will write the input parser shortly.
2012-09-12 04:11:35 +00:00
brandman211 f11a790e34 -Added ImportLSMV, ImportZMV. Neither do anything substantial yet.
-Added .int to the Rom Files list.
2012-09-10 21:35:56 +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
brandman211 5ce6050cb4 -As frames and subtitles actually occur more than once, I put them on the top of the big if / else if block for ImportText so that it doesn't have to do unnecessary ToLower() and StartsWith("name") calls.
-Put frames and subtitles into functions because vec\ gives good advice.
2012-07-04 07:34:52 +00:00
brandman211 c06a44c495 ImportText now only allows version 3 for .FM2 files. 2012-07-04 06:41:57 +00:00
brandman211 62e9143fdd -Made the boolean parsing more consistent.
-Subtitle parsing now allows excessive whitespace.
2012-07-03 22:24:24 +00:00
brandman211 1aa8030cf4 ImportText now works case-insensitively and trims whitespace. 2012-07-03 16:47:08 +00:00
brandman211 24a27d543a Fixed the case (should have detected "guid", not "GUID") for parsing the guid, preventing an extra space from showing up in converted FM2 files. 2012-07-03 16:04:17 +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
adelikat ab2e804300 Change default movie extension to .bkm 2012-03-31 00:38:39 +00:00
brandman211 45430c8ca7 ImportMCM now supports NES movies.
-No info on the control bytes, so I'm not dealing with them right now.
-It seems like there's an extra byte for at the beginning of input for NES that doesn't exist for PCE.
--I think it might be the "1 byte for power-on and reset" that the docs refer to, though I'm not sure why this would exist for NES and not PCE...because NES supports control commands and PCE doesn't?
--Perhaps this will become more apparent if I write the importers for SMS, GG, GB, and GBA. I'll need access to a Linux machine to do these, though.
2012-03-15 04:22:37 +00:00
brandman211 172115dcca Reformatted ImportMCM. Now to add the additional consoles. 2012-03-15 02:23:01 +00:00
brandman211 4c47676c02 -Added warning messages for:
--FDS commands in ImportFMV.
--Bad ROM checksums in ImportText. TaoTao: There's nothing wrong with using warningMsg; it just is limited to showing the first warning message that occurs.
-ImportNMV
--Nintendulator's Four Score recording is seemingly broken.

TODO: ImportMCM clean-up / expansion, Intellivision research.
2012-03-14 20:08:00 +00:00
brandman211 f53088c7be -Used masks to simplify ImportFMV.
-Finished ImportVMV:
--I'm not sure what the following comment means: "For the other control bytes, if a key from 1P to 4P (whichever one) is entirely ON, the following 4 bytes becomes the controller data." I'm going to assume this is a bad translation that is the equivalent of my 4 controllers = 4 bytes comment.
--Nesmock has a block of code that seems to handle, or at least account for, commands (Lines 207 - 239 of virtuanes.hh). I don't do anything about this, but it doesn't seem like Nesmock does much of anything about it either. I'll ignore this for now.

TODO: ImportNMV, clean up ImportMCM, and perhaps support other platforms for .MCM, although everyone thinks it's a waste...I like writing importers! I'm afraid of writing cores!
2012-03-13 02:37:59 +00:00
brandman211 8938290e36 -Fixed FourScore handling for .FCM.
-Made it so that .tas is appended to the file path instead of changing the extension to it.
-Added default emu/MovieOrigin comments to the importers that don't have explicit ones.
-ImportVMV header / added blank frames
-Moved the MnemonicsGenerator declarations outside of the loops.

TODO: Finish ImportVMV (I don't think the provided documentation explains how the input works...) and figure out if my re-record count is off by one or if TASVideos.org is.
2012-03-12 20:35:10 +00:00
brandman211 05f73ab436 Made it so that the Reset flag gets reset (Hehe) every frame, regardless of whether a warning message has been hit already or not. This fixes the ImportFM2 and ImportFCM functions that were broken in the last commit. Thanks TaoTao! 2012-03-11 13:27:11 +00:00
taotao54321 f117e4fce8 ImportMCM() bugfix 2012-03-11 13:21:16 +00:00
brandman211 79944b2d26 -Applied micro500's flag ANDing syntax to all of my functions...I concede that this is a much simpler way to do this.
-Fixed ImportFMV's movie title; before, I mistook it for the game name.
-Made "comment" and "SyncHack" constants.
-Moved the "ControllerDefinition"s outside of all of the loops.
-ImportGMV:
--Emulation Version => Movie Version.
--Added the PAL header.
--Made it so that the 6-button error is a warning; considering that the code already properly handles the controller properly and all that needs to be done is have Bizhawk actually support that kind of input, I don't feel there's a reason to go so far as to kill the conversion in this case.
--Reformatting.
---Notably, I added a player loop to simplify the frame data.
--It seems that 1937M uses a 6-button recording and 1731M has 2-player input...bizarre. Anyway, this means that ImportGMV should be good now.

TODO: ImportVMV, ImportNMV, ImportMCM, ImportSMV, Atari core? :)
2012-03-11 12:24:56 +00:00