Commit Graph

58 Commits

Author SHA1 Message Date
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
brandman211 be60ee206a -More tweaking of ImportGMV.
-Fixed InputAdapters with regards to the Genesis 3-Button Controller. It previously did not have a flag placeholder.

Potential issues that I don't have the time to investigate right now:
-When importing 1937M, I get the error "6 button controllers are not supported." Is this a false positive?
-The result of importing 1731M seems sane, but has 2-player input. This run is classified as "One player in a multiplayer game". Is this input normal?
2012-03-09 15:30:09 +00:00
taotao54321 888ce23bee ImportText(): interpret "romChecksum" entry in FM2 2012-03-09 13:26:06 +00:00
taotao54321 dae469543e ImportMCM(): forgot to close input stream 2012-03-09 12:18:16 +00:00
taotao54321 adceb81e91 ImportFCM(): emits "Platform" entry 2012-03-09 11:49:43 +00:00
taotao54321 363fa25200 ImportFCM(): fixed to interpret reset commands correctly.
It emited an incorrect result for "Zanac (U)" movie (734M).
Control update bytes are not toggle-form, unlike controller update bytes.
2012-03-09 11:38:29 +00:00
taotao54321 869f900d11 MovieImport: modified EMULATIONORIGIN value to "emuOrigin" from "emuVersion".
On previous versions, converted files had two "emuVersion" entries. That seems not right.
2012-03-09 09:30:33 +00:00
taotao54321 da9c95c38e Implemented ImportMCM() 2012-03-09 09:24:47 +00:00
brandman211 28e621527c Cleaned up my baby while respecting micro500's style choices. 2012-03-07 02:48:19 +00:00
brandman211 e7e8402af0 -Made the GUID for ImportVBM uniform with the other cases.
--Because there are way more bytes used to represent the other GUIDs than this one, I just appended -0000-0000-0000-000000000000 to this per zeromus' request.
-Got rid of the hex part of the BytesToString function. We apparently have BizHawk.Util.BytesToHexString.
-Converted BytesToString to r.ReadStringFixedAscii, an extension method. I've determined that extension methods are cool and that I should use them more often.
2012-03-06 05:27:50 +00:00
brandman211 c9b5f9989a -Added EMULATIONORIGIN and MOVIEORIGIN as constants ImportMovie instead of using magic strings.
-Fixed some error and warning messages:
--Made it so that the first .FCM warning is shown instead of the last.
--Added an error for .FCM files that aren't version 2.
--Did the same for ImportVBM, but with version 1.
-Cleaned up comments / code throughout.
-Fixed the file format for GBx; it had an extra bar which made reading Player 1 impossible.
-Seemingly finished ImportVBM.
--The results seem same. I have no way of testing whether they sync up or not.
--As I can't actually handle additional controllers, I just skip the bytes for them.
--As I can't actually handle the miscellaneous buttons and commands (Ex. L, R, Reset), I just give warnings whenever they come up in the file.

TODO: ImportGMV, ImportVMV, ImportNMV, and maybe ImportSMV...I'm going to need a new assignment soon! :)
2012-03-06 03:41:11 +00:00
pjgat09 e3ba08fefd Implemented the GMV importer. An error is returned for 6 button controllers, and third player input is currently thrown away. 2012-03-05 22:45:52 +00:00
brandman211 2c95e08392 ImportFCM fixed. All I did wrong was do the update before the delta bytes instead of the other way around. Thanks adelikat for telling me about QuickHex, who's documentation solved this instantly! 2012-03-05 17:36:52 +00:00
brandman211 89c6483e10 Worked on ImportFCM a little bit. I think I understand the delta bytes now and are handling them correctly. However, although this might press the right buttons, it does it at the wrong time and with the wrong duration. I'll need to investigate this further. 2012-03-05 17:20:30 +00:00
brandman211 d12590497e -Fixed the value to & with the update to determine the difference between a Control and Controller.
-Set the buttons to the opposite state when they are updated.
--Presumably, this is how this works.
-Read the delta bytes.

TODO: Figure out where in the world the writing of frames actually comes into play. Bisqwit gave me some insight on this.
2012-03-04 00:30:48 +00:00
brandman211 b07fa3b7c2 -Fixed the value to & with the update to determine the difference between a Control and Controller.
-Set the buttons to the opposite state when they are updated.
--Presumably, this is how this works.
-Read the delta bytes.

TODO: Figure out where in the world the writing of frames actually comes into play.
2012-03-02 15:59:34 +00:00
brandman211 bedbf1d5e1 -.Close()'d everything.
-Added a FourScore header and applied it to ImportFile and ImportFCM.
--Not sure if there's any equivalent header for FMV/FCM.
-Seemingly have the update bytes being read properly.

TODO: Make ImportFCM actually utilize the update bytes to write frames.
2012-03-02 04:15:15 +00:00
brandman211 39246b2ca5 -Added the beginning of ImportNMV and ImportVMV.
-Added PAL handling to ImportText.
-Finished the header and metadata of ImportFCM.

TODO:
-Input handling for ImportFCM.
-Find out what the format for the FDS data is on FMV, as it occurs to me that I already handle FDS data in ImportText by giving warnings, so I might as well do the same thing in this case.
-Figure out whether or not I should be using "using" for the BinaryReader objects, as it seems like they do in fact have .Close() methods.
2012-03-01 09:16:14 +00:00
brandman211 a60698c03e Finished enough of ImportFMV for now.
-There's "FDS data" stored in the frames of FDS recording. I have no idea how to handle this. If we do in fact support these features, they should be utilized in the TODO section provided.
-99M syncs with this...isn't this a problem? Wouldn't this imply that bizhawk is as inaccurate as Famtasia? I'm pretty sure this run didn't sync when I tried it on my now broken NESBot.

TODO: I guess I'll try to move on to ImportFCM now. Although I heard this is a difficult format to work with, my favorite console is the NES, and this'd be useful for console verification if the NESBot Lua script gets adapted for bizhawk, so I think I'll give it a shot.
2012-02-29 04:47:30 +00:00
brandman211 c4029509fc -Made ImportMMV more functional.
-Seemingly programmed the header handling for ImportFMV correctly.

TODO:
-ImportFMV frame data handling.
2012-02-28 23:11:19 +00:00
brandman211 0b69b4c17c -Ported the documentation for .MMV to ImportMMV in the form of comments. I think this makes things a lot simpler, and adding these comments before coding might be a good approach for future importers. That way, I merely need to understand what needs to be done and fill in the blanks.
-Added RemoveNull to get rid of the null characters in the author and game names for .MMV.
-Formatted the MD5 for .MMV.

TODO:
-Write ImportFMV. I think I understand how these formats work well enough to try this now.
2012-02-28 10:59:16 +00:00
brandman211 97d92887b6 -Refactored some of the stuff that I wrote for ImportText.
-Realized that the the ImportMMV function probably still works, but that Grunt's Sonic run merely desyncs. If I move the second pause button one frame later, it will make it past the title screen.

TODO: Comment / clean / and understand ImportMMV before moving on to ImportFMV.
2012-02-27 18:52:08 +00:00
brandman211 f2a60888ce -Commented / refactored code.
-Fixed the Platform for PCE.
-Added emuOrigin and MovieOrigin to store the original emulation and movie versions in a comment.
2012-02-25 03:04:22 +00:00
brandman211 e40ca4c18d -ImportFile now has access to errorMsg, which will show a message box and not play the movie when assigned, and warningMsg, which will simply add a message to RenderPanel and move on as usual.
-Made it so that any of the exceptions thrown from the Import* functions get converted into a string and stored in errorMsg. Now I can investigate what's wrong with ImportFCM.
2012-02-24 07:48:06 +00:00
brandman211 5aaa5ccda1 -Set up the ImportFMV function to build my importer off of.
-Realized that there's already a function that decides which SMV function to import with (ImportSMV, duh), so now that's used for it. Outputs a movie with messed up headers except for the Re-record count, which works fine.
-Added format URLs for all of the movie formats except for SMV 1.52, which doesn't seem to have a documentation page yet.
2012-02-24 05:18:59 +00:00
brandman211 91ea63c09e -Made the errorMsg in ImportFile display.
--Moved the command message in ImportText to this.
-Converted ImportVBM to use a MnemonicsGenerator.
--This should work, but I can't test as I still don't know for sure as the import fails and displays "Not a valid VBM platform type."
--I iterated through the buttons using a list and left-shifting. I applied this method to ConvertMMV, which works.

TODO:
-Comment MovieImport.cs.
-Fix the exception that is thrown for Gameboy games.
-Get ImportVBM to actually work, scanning through the input to see if it seems sane.
-Figure out why pressing Pause on GameGear results in a "P" instead of a "p", and whether or not this is a factor in runs syncing.
2012-02-24 04:44:40 +00:00