Post subject: Adding 2nd controller to SMV?
Editor, Expert player (2315)
Joined: 5/15/2007
Posts: 3856
Location: Germany
This is a 1-player movie on snes9x 1.51 v6 http://dehacked.2y.net/microstorage.php/info/575083967/earthbound_tas2.smv I'd like to add the second controller port, but apparently it will mean changing the whole file structure. Any help will be appreciated.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3599)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
Perhaps this would be of help? http://code.google.com/p/tastools/wiki/SNES9XAI I think it pre-dates 1.51 but it might be able to help, or the way it is coded could be adapted.
It's hard to look this good. My TAS projects
Emulator Coder, Skilled player (1141)
Joined: 5/1/2010
Posts: 1217
This seems to work for converting from 1 player to 2 players (joypads only): - Read bytes 0x1C-0x1F of the file. This is 32-bit controller data offset (little-endian) - Copy that amount of bytes, changing byte 0x14 from 0x01 to 0x03 - Until end of file: - Read 2 bytes - If these bytes are 0xFF 0xFF, write 0xFF 0xFF 0xFF 0xFF - Otherwise, write those 2 bytes followed by 0x00 0x00 - Repeat That method is very hacky but seems to work (modulo game potentially desyncing due to number of controllers changing).