public NSMBRom(Filesystem fs) throws AlreadyEditingException
    {
        super(fs);

        Overlay ov0 = arm9ovs[0];
        ov0.decompress();
        File ovFile = ov0.getFile();

        switch (gamecode)
        {
            case "A2DE":
                region = Region.US;
                break;
            case "A2DP":
                region = Region.EU;
                break;
            case "A2DJ":
                region = Region.JP;
                break;
            case "A2DK":
                region = Region.KR;
                break;
            default:
                throw new RuntimeException("This is not a NSMB ROM! :(");
        }

        tables = new BinaryTable[Table.values().length];
        for (Table t : Table.values())
        {
            int offs = tableOffsets[t.ordinal()][region.ordinal()];
            int entrySize = tableEntrySizes[t.ordinal()];
            int len = tableLengths[t.ordinal()];
            InlineFile tf = new InlineFile(ovFile, offs, len * entrySize, t.toString());
            tables[t.ordinal()] = new BinaryTable(tf, entrySize);
        }

        files = new InlineFile[EmbeddedFile.values().length];
        for (EmbeddedFile f : EmbeddedFile.values())
        {
            int offs = embeddedFileOffsets[f.ordinal()][region.ordinal()];
            int len = embeddedFileLengths[f.ordinal()];
            files[f.ordinal()] = new InlineFile(ovFile, offs, len, f.toString());
        }
    }