Author Topic: Early variant of the MO3 format?  (Read 12016 times)

saga

  • Posts: 2748
Early variant of the MO3 format?
« on: 13 Mar '17 - 12:52 »
An OpenMPT user reported a problem with a specific MO3 file from a game (including download link to the file):
https://forum.openmpt.org/index.php?topic=5795.msg44044;topicseen#msg44044
It seems to be an MO3 v0 file, but UNMO3/XMPlay cannot handle it. Using my own MO3 decoder, the first  thing I notice is that the decompressed length of the music data does not coincide with the claimed size (it's shorter). This might indicate that a slightly different compression scheme is used. Ignoring the decompression issue and assuming that the data was decompressed correctly, the next issue would be that the decompressed header looks mostly right, but not entirely. For example, num instruments is 0x6b0b and num samples is 0x0a65. Maybe it's supposed to be 0x0b instruments and 0x0a samples. Since I cannot think of anything else those 0x65 and 0x6b bytes would belong to, I think this confirms that the decompression was not done correctly.
So, long story short: Ian, do you recall if there was an early version of the MO3 encoder with a slightly different compression scheme? The user said the music plays as intended in the game, so I assume there must be some old BASS version that can handle this variant of MO3 v0, too.

Ian @ un4seen

  • Administrator
  • Posts: 26090
Re: Early variant of the MO3 format?
« Reply #1 on: 14 Mar '17 - 14:44 »
I don't think I still have the very earliest MO3 sources, but I'm pretty sure the structure is the same in all v0-4 MO3 files. Perhaps this MO3 file has been encrypted/modified slightly (and it's decrypted by the game) so that it can't be "stolen".

saga

  • Posts: 2748
Re: Early variant of the MO3 format?
« Reply #2 on: 16 Mar '17 - 10:52 »
Thanks for the info. I guess we'll have to wait until they confirm which game the MO3 file is from. Reading the post again, they say that the game is from 2004-2005, so it probably doesn't even use a "very early" BASS/MO3 version. The earliest BASS version I still have is from February 2000 and it definitely doesn't load the file. :)

saga

  • Posts: 2748
Re: Early variant of the MO3 format?
« Reply #3 on: 17 Mar '17 - 15:53 »
Turns out that the solution to the problem was even easier: https://forum.openmpt.org/index.php?topic=5795.msg44053#msg44053 :)