Post subject: Copying inputs from a .dtm (dolphin TAS file) to another?
Active player (440)
Joined: 2/29/2012
Posts: 192
I started a TAS of 007 Agent Under Fire for gamecube. I got a ways through level 1 then found an improvement near the beginning just before the first load spot. Can someone explain how to take the inputs from one .dtm and paste them in another using a hex editor? Pretty positive the inputs will sync fine because everything resets completely load spots in this game and there are 0 differences in inventory between the two .dtm's at that moment. If someone can do it for me that would be even better because I'm not familiar with hexing at all. I can supply both .dtm's and the exact frame that needs to be pasted over.
Emulator Coder, Skilled player (1113)
Joined: 5/1/2010
Posts: 1217
alec kermit wrote:
I started a TAS of 007 Agent Under Fire for gamecube.
That will be fun to encode... Three magic letters: DTK.
alec kermit wrote:
Can explain how to take the inputs from one .dtm and paste them in another using a hex editor.
The DTM header is 256 bytes large and each controller frame is 8 bytes (in order, starting from the first). After doing copypaste on the data, you need to adjust VI count (8 bytes at 0x000D) and frame count (8 bytes at 0x0015). The DTM file format specifications has more information.
Active player (440)
Joined: 2/29/2012
Posts: 192
Ilari wrote:
alec kermit wrote:
I started a TAS of 007 Agent Under Fire for gamecube.
That will be fun to encode... Three magic letters: DTK.
alec kermit wrote:
Can explain how to take the inputs from one .dtm and paste them in another using a hex editor.
The DTM header is 256 bytes large and each controller frame is 8 bytes (in order, starting from the first). After doing copypaste on the data, you need to adjust VI count (8 bytes at 0x000D) and frame count (8 bytes at 0x0015). The DTM file format specifications has more information.
I'm understanding this, but I'm not savvy with a hex editor. I've set the editor to 8 bytes per line and have found the first input line but how do I find line 2165 (the one I need to replace) without tapping the down arrow key 2165 times lol? Also what is DTK?
Emulator Coder, Skilled player (1113)
Joined: 5/1/2010
Posts: 1217
alec kermit wrote:
I'm understanding this, but I'm not savvy with a hex editor. I've set the editor to 8 bytes per line and have found the first input line but how do I find line 2165 (the one I need to replace) without tapping down 2165 times
Use the scrollbar to scroll using mouse? Or use PgDn/PgUp?
alec kermit wrote:
Also what is DTK?
Way for game to do music similar to CD audio in certain other systems. Causes extra fun when encoding...
Active player (440)
Joined: 2/29/2012
Posts: 192
Ilari wrote:
alec kermit wrote:
I'm understanding this, but I'm not savvy with a hex editor. I've set the editor to 8 bytes per line and have found the first input line but how do I find line 2165 (the one I need to replace) without tapping down 2165 times
Use the scrollbar to scroll using mouse? Or use PgDn/PgUp?
Hah yes but how do I keep track of the amount lines I've moved down? I don't see any kind of line counter, the "offset" displayer thing in the bottom left progresses by two and has letters mixed in (using HxD). Need to know how many lines I've gone down. Also how do I find 0x000D and 0x0015? I don't know how to search for that. At 8 bytes per line shown is "offset (h)" 000000D0 00 CA 46 A3 4D 00 00 00 the 8 bytes I need to replace?
Joined: 10/31/2006
Posts: 134
alec kermit wrote:
Also how do I find 0x000D and 0x0015? I don't know how to search for that. At 8 bytes per line shown is "offset (h)" 000000D0 00 CA 46 A3 4D 00 00 00 the 8 bytes I need to replace?
Both 000D and 0015 are circled here, look at the column header, add to the row header. Alternatively, click on search, GOTO, and type 000D or whatever, and it will move you to where you want to be. As for finding line numbers, not recommended to go by lines number nor do I recommend changing to 8 bytes per line, 16 makes it much easier to find a specific adress as pictured above. header is 256 bytes, all you need to find is 256 equivalent in hexadecimal to find the end of the header. Windows calculator (in programmer mode) can convert decimal number into hexadecimal. 256 = 0x100 (0x100 is the same as 0x0000100, leading 0 means nothing, just like decimal). So in this case, you wanna go to offset 00000100. Didnt count but this should be line 17 in 16 bytes per row (16x16 = 256). Although what is above is just to help you learn, most likely not needed. If you need to edit frame 1789 (made up number, I dont know the frame you need to change) and each frame is 8bytes, just multiply 1788 by 8 and add the 256 from the header. 1788*8+256 = 14560, convert that into HEX = 0x38E0 and use GOTO to get there quickly, or just page down until you get there using the method I mentionned above the picture. This should be the starting point of frame 1789 Just another tips: Hex number uses letters as a way to have more then 10 digits to make numbers up. A B C D E F actually means 10 11 12 13 14 15. So 0x010 (16) is the number right after 0x00F (15). The 0x notation is just to show the number after is an hexadecimal one.
Active player (440)
Joined: 2/29/2012
Posts: 192
Thanks for the help guys, I was able to figure it out eventually and edited it :). I went from not knowing what a byte was to finding just the right frames to overwrite in... well I won't say how many hours it took.