Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: CMV file format questions. . .  (Read 496 times)

Ostsol

  • Bay Watcher
    • View Profile
CMV file format questions. . .
« on: November 25, 2007, 12:33:00 pm »

I started looking at the CMV file format and have noted a few things:

  • Each frame of animation is stored in 4000 byte blocks
  • Frames are stored in ZLIB compressed blocks of up to 200 frames
  • The first compressed block starts at 12824 in the file, unless there is sound
  • If there is sound, the block starts 200 bytes later
  • That 200 byte block seems to store sound filenames padded by bytes of ASCII code 0xCC.
  • The rest up until the four bytes before the first block is exactly 12.5 KB of ASCII code 0xFF

My questions:

  • Other than the file header, is there anything important in the first 20 bytes of the file?  I've noticed that it changes only when there's sound in the movie.
  • Is the padding between each sound filename just junk?  Are the filenames simply evenly spaced within that 200 byte block?
  • What is the purpose of that 12.5 KB block of 0xFFs?
Logged
Ostsol

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: CMV file format questions. . .
« Reply #1 on: November 26, 2007, 12:24:00 am »

Here's what I decoded awhile back in April.
http://www.dwarffortresswiki.net/index.php/User:Jifodus/CMV_file_format

Edit: I'll clarify the 0xCC here since it isn't on that page, that's the "unused memory" marker byte that MSVC uses.

[ November 26, 2007: Message edited by: Jifodus ]

Logged

Ostsol

  • Bay Watcher
    • View Profile
Re: CMV file format questions. . .
« Reply #2 on: November 26, 2007, 08:46:00 am »

Thanks!  That helps alot.  :)
Logged
Ostsol

Rick

  • Bay Watcher
  • Engineer
    • View Profile
Re: CMV file format questions. . .
« Reply #3 on: November 27, 2007, 07:14:00 pm »

quote:
Originally posted by Jifodus:
<STRONG>I'll clarify the 0xCC here since it isn't on that page, that's the "unused memo</STRONG>
int 3
Logged