-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.
-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!
-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.
--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.
--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...
--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.
--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.
--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.
--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.
--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.
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.
-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.
--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.
-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!
-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.
-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? :)