almostmatt1 Posted June 7 Dunno if this would be more appropriate in "General" but I figure no group spends more time with demo files than speedrunners so hopefully this is okay here. I am writing a TAS tool that reads demo files and analyses their existing inputs, but I don’t have a clear understanding of the demo header and how its length changes, particularly when it comes to UMAPINFO. I need to work this out to accurately know where to begin looking for movement information. I understand how the byte values correspond to player movement and inputs and understand how to locate the demo end marker, but the header stuff is giving me some trouble.This very helpful thread has some useful information, and also links to useful information elsewhere. From what I can gather, the value of the first byte indicates the game version and the game version corresponds to a certain fixed-length (unless it's mbf21, apparently) header. So for example: - If the first byte value is 109, the demo is vanilla format, so the header is 13 bytes long, so the first byte containing movement information is the 14th byte. - If the first byte value is 202, the demo is Boom format, so the header is 109 bytes long, so the first byte containing movement information is the 110th byte. So far so good, and I've written some code that appears to accurately deal with this. My problem is where Keyboard_Doomer wrote the following in the aforementioned thread: “Demos that make use of UMAPINFO have 27 extra bytes before the standard header - that means the header size is 40 (27+13) bytes for vanilla complevels and 136 (27+109) bytes for Boom and beyond.” If I could detect whether this is the case in a particular demo file I would be able to easily adjust for this, but I don’t know how to detect whether this is the case. Further I honestly don’t really know what it means for “Demos to make use of UMAPINFO” and have been unable to locate any information about this, including on the umapinfo repo. Also I've tried looking through krafs demo analyzer tool code for clues, but I don't know ruby and haven't been able to work it out from there (having covid brain at the minute doesn't help). Could someone please explain what it means for a demo file to “make use of UMAPINFO”, what kind of information is stored, and what information within the demo file itself exists to notify a source port that this information is present? 3 Quote Share this post Link to post
almostmatt1 Posted June 7 Well. 3 minutes after posting this, I read this from the same thread I linked: If the value of the first byte is... "255 - depends on the signature that starts from the next byte: ... -> "PR+UM" - PrBoom+ with UMAPINFO, check byte 27 (i.e. 28th byte) for the "true" compatibility" Cool. Great. My brain is very smooth. Apologies for the spam. 3 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.