Post subject: Wrong file format
Former player
Joined: 8/15/2004
Posts: 422
Location: Minnesota
I was trying to play nitsuja's Sparkster on his newest version of snes9x, but I get the error "file is wrong format". I searched around the forum and found that nitsuja had the same problem before:
nitsuja wrote:
In fact, I have a question for Truncated and maybe Omni: how were you able to get Zeldafix version 3 to even play the movie file? Mine gets a "wrong format" error message because the save state in the movie doesn't match up with the new format. Which movie file are you talking about?
He then stated:
nitsuja wrote:
I got it to work btw, I think it didn't open because my download was corrupted or something, redownloaded it and it was fine. I'm getting a little tired with all the desync and version confusion, so the next version I put up will be compatible with both WIP and Final, able to play and record both versions of movies depending on if you check a "Use WIP1 timing" checkbox, and with all the possibly-desync-causing options layed out directly in the play and record movie dialogs.
So, I redownloaded it, but to no avail. The movie file for Sparkster doesn't even show up with any information when in the movie play window. Does anyone have a solution for this?
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
That movie works for me on that version of the emulator. Here are the relevant MD5 checksums:
snes9x.exe:         a5aa04bc7d110e02a2de8dee5f87e04a
Sparkster (U).smv:  b207b415c6f012af6120ce4ff77777c4
EDIT: Actually, it looks like the zip file of the movie that is hosted on the site is corrupted. It should expand to an about 140 kb file. Try this movie file: http://dehacked.2y.net/microstorage.php/info/284/ EDIT2: Hmm, it seems that many other submissions are doing this as well - they download as invalid zip files. It could be that it only fails in MSIE, though, or it's a browser cache thing...
Former player
Joined: 8/15/2004
Posts: 422
Location: Minnesota
That seemed to do it. Thanks. EDIT: Okay, now the same thing is happening with the new Super Demo World movie. Is this happening to anyone else?
Player (206)
Joined: 5/29/2004
Posts: 5712
Nope.
put yourself in my rocketpack if that poochie is one outrageous dude
Joined: 11/2/2005
Posts: 198
no
A life without cheese is a life without life.
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
Yes, it's also happening for me. In fact, I downloaded the Super Demo World movie file twice and got a different zip file each time. One of them is 27,756 bytes, and the other one is 27,960 bytes. The 27,756 byte one is not valid, and that is the one that I get most of the time, but very occasionally I end up getting the 27,960 byte one, which works. Maybe Bisqwit has some idea of what's wrong with downloading movie files from his site? I have never had this problem before, but now it is happening for ALL of the movie file downloads I try.
Former player
Joined: 8/15/2004
Posts: 422
Location: Minnesota
Hmm.. I'm only getting the 27,960 byte version whenever I download it, but, for me, that's the one that's not working.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
I'd like to get more information on this error. It works for me every time I download the file(s) with wget. Any suspicious headers, error messages, ..? File content in wrong format (which format)? Happens on which browser(s)? It may be caused by mod_deflate.
Player (52)
Joined: 10/6/2005
Posts: 138
Location: Oregon
Ouzo wrote:
That seemed to do it. Thanks. EDIT: Okay, now the same thing is happening with the new Super Demo World movie. Is this happening to anyone else?
Yes. 27,756 bytes. "The Compressed (zipped) Folder is invalid or corrupted."
JXQ
Experienced player (761)
Joined: 5/6/2005
Posts: 3132
I'm downloading the SDW file using Firefox, and I consistently get 27,960 bytes for the size of the file. And it works for me, extracting with WinRAR, and plays without desync. I've never heard of such a strange error before. Sorry I can't help more!
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
Bisqwit wrote:
I'd like to get more information on this error. It works for me every time I download the file(s) with wget. Any suspicious headers, error messages, ..? File content in wrong format (which format)? Happens on which browser(s)?
OK, I tried some more and here are the results: - On Internet Explore, it always downloads an invalid zip. It saves it with a filename like this: foda-kickmaster[1].fcm.zip - On Mozilla browsers, if I right-click and choose save as, it downloads an invalid zip with a filename like this: foda-kickmaster.zip - On Mozilla browsers, if I left-click instead, it downloads a valid zip file with a filename like this: foda-kickmaster.fcm.zip - No error messages or warnings in any case - I ran a file-compare of the two zip files in a hex editing program, and it did not find any significant similarities between the two files (no 32 consecutive bytes in one zip were the same as any 32 consecutive bytes in the other) - All of the invalid zip files I get by any means are exactly identical in all of their bytes - The invalid zip file is some number of bytes smaller than the valid zip file (but not always the same number, depending on the movie)
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
It seems I have tracked the origin of the problem. When a browser receives an invalid ZIP file, it is actually a GZIP-compressed ZIP file. gunzip it, and then you can unzip it too. What causes it is of course mod_deflate, since it's the only part of the site that may cause gzip-compression. It is intended to save bandwidth. So why is it broken? I suspect it's a problem in the browsers. They claim they can decompress stuff in transmission, but when it's a downloadable file, they forget to decompress it before saving. Some browsers. So how to fix it? DeHackEd, help! This is my /etc/apache2/mods-available/deflate.conf:
<Location />
  # Insert filter
  SetOutputFilter DEFLATE
  SetInputFilter DEFLATE

  # Netscape 4.x has some problems...
  BrowserMatch ^Mozilla/4 gzip-only-text/html

  # Netscape 4.06-4.08 have some more problems
  BrowserMatch ^Mozilla/4\.0[678] no-gzip

  # MSIE masquerades as Netscape, but it is fine
  # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

  # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
  # the above regex won't work. You can use the following
  # workaround to get the desired effect:
  BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

  # Don't compress images
  SetEnvIfNoCase Request_URI \
  \.(?:gif|jpe?g|png)$ no-gzip dont-vary

  # Make sure proxies don't deliver the wrong content
  Header append Vary User-Agent env=!dont-vary
</Location>

DeflateCompressionLevel 2
For comparison, this was my /etc/apache/gzip.conf (mod_gzip, which I used in Apache 1.3, is not available in Apache 2.0, which I use now):
  <IfModule mod_gzip.c>
  mod_gzip_on                   Yes
  mod_gzip_can_negotiate        No
  mod_gzip_static_suffix        .gz
  AddEncoding              gzip .gz
  mod_gzip_update_static        No
  mod_gzip_command_version      '/mod_gzip_status'
mod_gzip_temp_dir             /tmp
  mod_gzip_keep_workfiles       No
  mod_gzip_minimum_file_size    500
  mod_gzip_maximum_file_size    800000
  mod_gzip_maximum_inmem_size   200000
  mod_gzip_min_http             1000
  mod_gzip_handle_methods        GET POST
  mod_gzip_item_exclude         reqheader  "User-agent: Mozilla/4.0[678]"
  mod_gzip_item_include         file       \.htm$
  mod_gzip_item_include         file       \.html$
  mod_gzip_item_include         file       \.js$
  mod_gzip_item_include         file       \.css$
  mod_gzip_item_include         file       \.php.*
  mod_gzip_item_include         file       \.xml$
  mod_gzip_item_include         file       \.pl$
  mod_gzip_item_include         handler    ^cgi-script$
  mod_gzip_item_include         mime       ^text/.*
  mod_gzip_item_include         mime       ^httpd/unix-directory$
  mod_gzip_item_include         mime       ^application/x-javascript$
  mod_gzip_item_exclude         file    pushrefresh
  mod_gzip_item_exclude         file    spamref
  mod_gzip_item_exclude         mime       ^image/
  mod_gzip_dechunk              Yes
  LogFormat                     "%h %l %u %t \"%V %r\" %<s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n -< Out:%{mod_gzip_output_size}n = %{mod_gzip_compression_ratio}n pct." common_with_mod_gzip_info2
  mod_gzip_add_header_count     Yes
  mod_gzip_send_vary            Yes
  </IfModule>