Detection of Saved With Info for files Extracted with Old unmo3 Versions

Started by Slender, July 05, 2019, 22:24:06

Previous topic - Next topic

Slender

Perhaps may not be appropriate for this forum? This is somewhat related to an earlier bug report of mine, https://bugs.openmpt.org/view.php?id=1132. I noticed that IT files generated by old versions of unmo3 appear to report unknown in the last saved with field, similar to the module in that bug report. TO reproduce, run the depack script in this music disk, which has unmo3 version 0.3 bundled with it. http://armagon.org/mods/buried/musicdisk/BuriED%20-%20Warfare.zip. Is it possible to detect those versions of unmo3? Or is there basically not much that can be done to detect them?

manx

Maybe.


   const bool possiblyUNMO3 = fileHeader.cmwt == 0x0214 && fileHeader.cwtv == 0x0214 && fileHeader.highlight_major == 0 && fileHeader.highlight_minor == 0
      && fileHeader.pwd == 0 && fileHeader.reserved == 0 && (fileHeader.flags & (ITFileHeader::useMIDIPitchController | ITFileHeader::reqEmbeddedMIDIConfig)) == 0;


This version of unmo3 sets fileHeader.cwtv = 0, which causes us to skip all unmo3 detection logic.

I am not familiar enough with the IT format to come to any final conclusion here though.

Saga Musix?

LPChip

This is a wild guess here, and Saga Musix is probably gonna shoot me for this, so take this with a grain of salt (unless I got it spot on, then yay!)

If I remember correctly, IT file does have compression but not using the MO3 format, and that was added later. I wouldn't be surprised if this bit is set for backwards compatibility.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

manx

Sorry, LPChip, but you are completely missing the point here ???

This has nothing to do with IT sample compression, or with MO3 sample compression (which does not even exist in IT files, but is native to MO3 files). The problem concerns the tracker that OpenMPT detects as having saved the IT file in question. It gets detected as unkown, if this particular old version of unmo3 wrote the IT file (decompressing it from a MO3 file).

LPChip

Thanks for the heads up... It would've been shocking if I actually had gotten it right... :nuts: Oh well.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

On first sight it does indeed seem like the file from bug report linked above was uncompressed with the same (or similarly old) UNMO3 version. The sample frequencies are all a couple of Hz off compared to the 8-bit version, which is a big hint that this IT file used to be an MO3 file (early MO3 format revisions didn't allow for the sample frequency in IT files to be stored accurately, it was an approximation similar to XM). I will have a more thorough look later or tomorrow, but I'm relatively certain that your observation is spot-on, and we can update our special case for v0.00 files to say UNMO3 instead of Unknown.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Slender

If you do end up updating that special case, it would possibly be safer to just say unmo3 rather than trying to guess the version, unmo3 1.x also wrote 0s, as demonstrated by this disk. http://www.armagon.org/mods/infernal%20mods%20-%20a%20tribute%20to%20death%20(compilation)/Infernal%20Mods.zip

Saga Musix

The files posted in this thread and also in that bug report are now all detected as UNMO3-ed files.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.