Emulator Resources / Common Problems

This page is part of the emulator resources page collection. Back to: << Emulator Resources

The movie plays incorrectly (desync)

See DesyncHelp.

Playing FDS files in FCEU

A special ROM named disksys.rom is required to play FDS files (files ending in .fds).

It should be about 8K in size. If it is not named disksys.rom, it is the wrong file. Do not rename any files.

Place disksys.rom in your FCEU folder. Then, run the FDS file in FCEU.

Do not use so-called "FDS hacks". They do not work.

See also: What is FDS?.

Snes9x ROM Loading Error

For making movies on this site, we recommend using our improved version of Snes9x, if you are using Windows.

Independent solutions in order of best to worst:

1. Drag and drop the ROM onto the SNES9x executable.
2. Download and run SNES9x v1.42, load a ROM, and exit the emulator. Then run v1.43 and load a ROM as you would normally.
3. Download and unzip SNES9x v1.43 to a certain directory, then download v1.42 and place only its executable file into v1.43's directory.

For more information, please see this link on the message boards.

Snes9x movie limitations

Note: If you use our improved version, these limits effectively go away. 5 controllers can play for about 1.5 months. 1 controller can play for about 5 times as long.

Some people have seen snes9x complaining "snapshot not from this movie" of their quicksaves when their movie is > 27 minutes long.

For others, the threshold might be longer, but the effect same.

This happens when your movie data is greater than 1'000'000 bytes. The snes9x save format stores block lengths using 6 digits only.

The maximum length of the movie is as follows:

For 5 controllers 0:27:46
For 4 controllers 0:34:43
For 3 controllers 0:46:17
For 2 controllers 1:09:26
For 1 controller 2:18:53

The next release of snes9x increases these limits to:

For 5 controllers 4:37:46
For 4 controllers 5:47:13
For 3 controllers 7:42:57
For 2 controllers 11:34:26
For 1 controller 23:08:53

If you are recording a 1-player movie and you have accidentally selected 5 controllers when you began, you can fix your movie by running this program (C++ source code):

#include <cstdio>

using namespace std;

typedef unsigned long uint32;
typedef unsigned short uint16;
typedef unsigned char uint8;

static inline uint32 Read32(const uint8*& ptr)
{
    uint32 v=(ptr[0] | (ptr[1]<<8) | (ptr[2]<<16) | (ptr[3]<<24));
    ptr += 4;
    return v;
}

int main(void)
{
    /* Edit these filenames to suit your situation */
    FILE *i = fopen("gradius3.smv",       "rb"); /* Original */
    FILE *o = fopen("gradius3.smv-fixed", "wb"); /* File to be created */

    uint8 Header[32];
    fread(Header,32,1,i);

    const uint8* ptr = Header;
    Read32(ptr); // magic
    Read32(ptr); // version
    Read32(ptr); // movieid
    Read32(ptr); // rerecord count
    uint32 nframes = Read32(ptr); // max frame

    const uint8 newmask = 1;

    uint8 oldmask = *ptr;  *(uint8*)ptr = newmask;
    ++ptr;
    uint8 opts    = *ptr;
    ++ptr;
    ptr += 2;

    Read32(ptr); // savestate offset
    uint32 CtrlOffset = Read32(ptr);

    fwrite(Header,32,1,o);

    for(uint32 pos=32; pos<CtrlOffset; )
    {
        char Buf[1024];
        unsigned max = CtrlOffset - pos;
        unsigned size = sizeof Buf;
        if(size > max) size = max;

        fread(Buf, 1, size, i);
        fwrite(Buf, 1, size, o);
        pos += size;
    }

    for(uint32 f=0; f<=nframes; ++f)
        for(unsigned n=0; n<5; ++n)
        {
            uint16 d = 0;
            if(oldmask & (1 << n)) fread(&d, 2, 1, i);
            if(newmask & (1 << n)) fwrite(&d, 2, 1, o);
        }

    fclose(i);
    fclose(o);
}
This fix enables you increase the limits.

Note that the limitation exists only for movie snapshots; not for the actual movie file.

Famtasia ROM Loading Error

Note: For making NES movies, we recommend using FCE Ultra instead of Famtasia.

left When Famtasia says "This file is maybe illegal image" as shown in the image at left and refuses to load your ROM, it's because the ROM is garbled.

The most common reason for this is the "DiskDude!" advertisement tag in the ROM header.

The .NES file format specification states that those bytes should be zero, so Famtasia expects them to be. You can zero those 9 bytes with a binary editor if this is the problem for you.

Using a hex-editor

The recommended way to do the fixing is to use a hex-editor. Use Google or some other search engine to find one for you.

When you do, you should do as follows:

If the ROM header looks like this:

  00000000 4e 45 53 1a 08 00 21 44 69 73 6b 44 75 64 65 21 |NES...!DiskDude!|
It must be changed to look like this:

  00000000 4e 45 53 1a 08 00 21 00 00 00 00 00 00 00 00 00 |NES...!.........|
Note: The important bit here are the numbers (marked in bold). They must be changed to 00 00 00 00 00 00 00 00 00.

That's all. Do not change the 7 first bytes. One byte = two digits in hexadecimal display.

C++ program

Here's the source code of a C++ program that can do the job for you:

#include <cstdio>
#include <string>
#include <dirent.h>
using namespace std;
static void FixROM(const string& s)
{
    char Buf[16];

    if(s.size() < 4 || s.substr(s.size()-4) != ".nes") return;

    FILE *fp = fopen(s.c_str(), "rb+");
    if(fp)
    {
        perror(s.c_str());
        return;
    }

    fseek(fp, 0, SEEK_END);
    long size = ftell(fp);
    rewind(fp);

    fread(Buf, 16, 1, fp);

    if(memcmp(Buf+7, "DiskDude!", 9))
    {
        printf("Fixing %s (removing DiskDude signature)\n", s.c_str());
        memset(Buf+7, 0, 9);
        fseek(fp, 7, SEEK_SET);
        fwrite(Buf+7, 9, 1, fp);
    }

    int size_shouldbe = ((size - 16) & ~1023) + 16;
    if(Buf[6] & 4) size_shouldbe += 512;

    if(size_shouldbe != size)
    {
        printf("Fixing %s (size is %X, should be %X)\n", s.c_str(), size, size_shouldbe);
        ftruncate(fileno(fp), size_shouldbe);
    }

    fclose(fp);
}

int main(void)
{
    DIR *d = opendir(".");
    while(dirent *ent = readdir(d))
    {
        FixROM(ent->d_name);
    }
    closedir(d);
}


Get Firefox!EmulatorResources/CommonProblems last edited by FractalFusion on 2008-09-21 11:04:12
Page info and history | Latest diff | List referrers