Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Removed second release post. Please see first release Post
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Post subject: Help me fix a bug!
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Found an issue with my program. Since it doesn't read the MD5 hash, it never writes it. This will be a problem for playback. I need help in parsing the three Hashes. Otherwise, things will not work correctly. I know to start reading bytes at, offset 0x071 for MD5 Hash, Offset 0x0E5 for IROM Hash and 0x0e9 for COEF Hash but how can I get them into an ASCII format?
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4045
You can convert to hexadecimal or to base64 if you need [a bunch of bytes] to be in a human-readable format.
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Dur! If the Hex Value is read as a string, then I got the MD5 hash. The SFV for IROM and COEF is also written in Hex. The DSP Files (IROM, COEF) will be noted as "Offical" or "Dolphin" Based on the Hex Value I get. On the positive, I have some Gamecube Controller data being read correctly. I still need to handle just about everything. But at least you can see the Analog Stick, L and R Trigger, and C Stick values (0-255)
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Active player (477)
Joined: 2/1/2014
Posts: 928
hegyak wrote:
Dur! If the Hex Value is read as a string, then I got the MD5 hash. The SFV for IROM and COEF is also written in Hex. The DSP Files (IROM, COEF) will be noted as "Offical" or "Dolphin" Based on the Hex Value I get. On the positive, I have some Gamecube Controller data being read correctly. I still need to handle just about everything. But at least you can see the Analog Stick, L and R Trigger, and C Stick values (0-255)
Very cool! Excited to see how much farther you can take the editor!
Post subject: Re: Help me fix a bug!
RachelB
She/Her
Player (129)
Joined: 12/3/2011
Posts: 1579
hegyak wrote:
Found an issue with my program. Since it doesn't read the MD5 hash, it never writes it. This will be a problem for playback.
You should really read the entire header and write it back, including parts that are expected to be entirely 0, so nothing will be lost if anything is added to the header in the future.
Post subject: Version 1.4 released!
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
1.4 released. Fixes some bugs like not writing MD5 hash values or IROM/COEF hash values. You can set them too. Also added the start of reading Gamecube input data. So far, the Analog stick, the C Stick and L/R analog values are being read. Actual button data is not done yet. Saving controller data is NOT ready yet.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
I have yet another odd question. The L and R triggers have an analog value, and if that value is 255, the L and R buttons are pushed. What is the Minimum value required to make the L and R buttons trigger? Is it only 255? Edit: I can now read a single Gamecube Controller data for a selected frame. Now to setup up multiple controller reading. Writing will come after I verify reading.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Another question I have is the Change CD Marker. What controller(s) get that value? What happens if all connected controllers say, "Change Disc"? I think all connected controllers say Change Disc. Can anyone confirm this?
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
RachelB
She/Her
Player (129)
Joined: 12/3/2011
Posts: 1579
hegyak wrote:
I have yet another odd question. The L and R triggers have an analog value, and if that value is 255, the L and R buttons are pushed. What is the Minimum value required to make the L and R buttons trigger? Is it only 255? Edit: I can now read a single Gamecube Controller data for a selected frame. Now to setup up multiple controller reading. Writing will come after I verify reading.
Just 255 i think.
hegyak wrote:
Another question I have is the Change CD Marker. What controller(s) get that value? What happens if all connected controllers say, "Change Disc"? I think all connected controllers say Change Disc. Can anyone confirm this?
No, just the first one to be polled after the disk change is triggered. If all of them have the disk change bit set, then it will attempt to change the disk once for each controller. Which will be annoying if the disk cannot be found automatically because it could prompt the user to change disk multiple times.
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Version 1.6 is out. A bug fix or two and writing Gamecube controller data for all four controllers is ready.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Player (146)
Joined: 7/16/2009
Posts: 686
Have you considered using a change number (1.0.6) instead of the minor version number (1.6)?
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Scepheo wrote:
Have you considered using a change number (1.0.6) instead of the minor version number (1.6)?
I am using the same system of numbering that DTM Reader and BizHawk use. Small bug fixes are Current Version.Minor version. While major changes or new features incriment the version number by 1 and minor becomes 0. I started at 1.3 so there's no confusion with DTM Reader.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Active player (426)
Joined: 9/21/2009
Posts: 1047
Location: California
How do you find a frame's offset in a Wii .dtm? If I recall, GC is frame# ---> hex*8+1024
RachelB
She/Her
Player (129)
Joined: 12/3/2011
Posts: 1579
sonicpacker wrote:
How do you find a frame's offset in a Wii .dtm? If I recall, GC is frame# ---> hex*8+1024
Write a program to parse the file. The length of the data for each frame is variable.
Active player (426)
Joined: 9/21/2009
Posts: 1047
Location: California
RachelB wrote:
sonicpacker wrote:
How do you find a frame's offset in a Wii .dtm? If I recall, GC is frame# ---> hex*8+1024
Write a program to parse the file. The length of the data for each frame is variable.
For a short movie, is there a ballpark formula? I can still sort of read input if I get into the general area of the dtm in HxD. I did it previously with an SMG2 TAS but I can't remember how I got to it, lol.
RachelB
She/Her
Player (129)
Joined: 12/3/2011
Posts: 1579
Depends on the game. Open up the dtm and see. Some games change reporting mode constantly, others don't. The format is 1 byte indicating the size of the data, followed by the data. Some games may use one reporting mode on the health and safety screen, and then change it, and never again, which would make it easy to calculate. You'll have to see on a case by case basis though. You could also just hack dolphin to display the current byte, and play the movie back and see. Edit: actually i'll just write a quick program to calculate it, won't take long.
RachelB
She/Her
Player (129)
Joined: 12/3/2011
Posts: 1579
Here https://dl.dropboxusercontent.com/u/11111638/p/frame%20calc.zip Only works with wiimotes, if you have a gc controller connected it will not work.
Active player (426)
Joined: 9/21/2009
Posts: 1047
Location: California
RachelB wrote:
Here https://dl.dropboxusercontent.com/u/11111638/p/frame%20calc.zip Only works with wiimotes, if you have a gc controller connected it will not work.
Wow, wasn't expecting that. Thanks for your time, I'll check it out right now.
RachelB
She/Her
Player (129)
Joined: 12/3/2011
Posts: 1579
It's like 30 lines of code. Only took like 5 minutes :p
keylie
He/Him
Editor, Emulator Coder, Expert player (2843)
Joined: 3/17/2013
Posts: 392
Thanks for providing this tool! There is a slight unimplemented feature: you cannot save inputs on the second GC controller.
bihan
He/Him
Player (61)
Joined: 8/19/2012
Posts: 70
Location: Chicago, IL
Is there any way to see all the input from the .dtm in one column or something? And add no-input frames? I need to add some input in the middle of the movie.
Player (146)
Joined: 7/16/2009
Posts: 686
bihan wrote:
Is there any way to see all the input from the .dtm in one column or something? And add no-input frames? I need to add some input in the middle of the movie.
I'm pretty sure there isn't, however, I've been working on a movie file editor of my own, and it should do what you want it to. You can find it here.