Esempio n. 1
0
        public static ImprovedSoundMixer SearchImprovedSoundMixerLow()
        {
            PatchTableSt[] table = new PatchTableSt[] {
                new PatchTableSt {
                    name = "ImprovedSoundMixer", ver = "FE8J", addr = 0xD4234, data = new byte[] { 0xb1, 0x6c, 0x00, 0x03, 0x06, 0x00 }
                },
                new PatchTableSt {
                    name = "ImprovedSoundMixer", ver = "FE8U", addr = 0xd01d0, data = new byte[] { 0xb0, 0x6c, 0x00, 0x03, 0x18, 0x02 }
                },
            };

            string version = Program.ROM.RomInfo.VersionToFilename();

            foreach (PatchTableSt t in table)
            {
                if (t.ver != version)
                {
                    continue;
                }

                //チェック開始アドレス
                byte[] data = Program.ROM.getBinaryData(t.addr, t.data.Length);
                if (U.memcmp(t.data, data) != 0)
                {
                    continue;
                }
                if (t.name == "ImprovedSoundMixer")
                {
                    return(ImprovedSoundMixer.ImprovedSoundMixer);
                }
            }
            return(ImprovedSoundMixer.NO);
        }
Esempio n. 2
0
 static Escape_enum SearchEscapePatchLow()
 {
     {
         PatchTableSt[] table = new PatchTableSt[] {
             new PatchTableSt {
                 name = "escape_arrive", ver = "FE8U", addr = 0x187A8, data = new byte[] { 0x00, 0x4b, 0x18, 0x47 }
             },
         };
         PatchTableSt p = SearchPatch(table);
         if (p.name == "escape_arrive")
         {
             return(Escape_enum.EscapeArrivePath);
         }
     }
     {
         GrepPatchTableSt[] table = new GrepPatchTableSt[] {
             new GrepPatchTableSt {
                 name = "escape_menu", patch_dmp = "EscapeMenu/IsLoca0x13.dmp"
             },
         };
         GrepPatchTableSt p = GrepPatch(table);
         if (p.name == "escape_menu")
         {
             return(Escape_enum.EscapeMenuPath);
         }
     }
     return(Escape_enum.NO);
 }
Esempio n. 3
0
 //武器魔法を同時に利用できるパッチの判別.
 public static bool SearchMeleeAndMagicFixPatch()
 {
     PatchTableSt[] table = new PatchTableSt[] {
         new PatchTableSt {
             name = "GIRLS", ver = "FE8J", addr = 0x18752, data = new byte[] { 0x18 }
         },
         new PatchTableSt {
             name = "FE8NMAGIC", ver = "FE8J", addr = 0x2a542, data = new byte[] { 0x30, 0x1C }
         },
         new PatchTableSt {
             name = "MeleeAndMagicFix", ver = "FE8J", addr = 0x1876C, data = new byte[] { 0x00, 0xB5, 0xFE, 0xF7 }
         },
         new PatchTableSt {
             name = "MeleeAndMagicFix", ver = "FE7J", addr = 0x188CC, data = new byte[] { 0x00, 0xB5, 0xFE, 0xF7 }
         },
         new PatchTableSt {
             name = "MeleeAndMagicFix", ver = "FE8U", addr = 0x18A58, data = new byte[] { 0x00, 0xB5, 0xFE, 0xF7 }
         },
         //new PatchTableSt{ name="UnkMeleeAndMagicFix",	ver = "FE8U", addr = 0x87852,data = new byte[]{0x60 ,0xB4 ,0x00 ,0x26}},
         new PatchTableSt {
             name = "MeleeAndMagicFix", ver = "FE7U", addr = 0x184DC, data = new byte[] { 0x00, 0xB5, 0xFE, 0xF7 }
         },
         new PatchTableSt {
             name = "MeleeAndMagicFix", ver = "FE6", addr = 0x18188, data = new byte[] { 0x00, 0xB5, 0xFE, 0xF7 }
         },
     };
     return(SearchPatchBool(table));
 }
Esempio n. 4
0
        static portrait_extends SearchPortraitExtendsLow()
        {
            PatchTableSt[] table = new PatchTableSt[] {
                new PatchTableSt {
                    name = "MUG_EXCEED", ver = "FE8J", addr = 0x54da, data = new byte[] { 0xC0, 0x46, 0x01, 0xB0, 0x03, 0x4B }
                },
                new PatchTableSt {
                    name = "MUG_EXCEED", ver = "FE8U", addr = 0x55D2, data = new byte[] { 0xC0, 0x46, 0x01, 0xB0, 0x03, 0x4B }
                },
                new PatchTableSt {
                    name = "MUG_EXCEED", ver = "FE7U", addr = 0x6BCA, data = new byte[] { 0xC0, 0x46, 0x01, 0xB0, 0x03, 0x4B }
                },
                new PatchTableSt {
                    name = "MUG_EXCEED", ver = "FE7J", addr = 0x6A5A, data = new byte[] { 0xC0, 0x46, 0x01, 0xB0, 0x03, 0x4B }
                },
                new PatchTableSt {
                    name = "HALFBODY", ver = "FE8U", addr = 0x8540, data = new byte[] { 0x0A, 0x1C }
                },
                new PatchTableSt {
                    name = "HALFBODY", ver = "FE8J", addr = 0x843C, data = new byte[] { 0x0A, 0x1C }
                },
                new PatchTableSt {
                    name = "HALFBODY", ver = "FE8U", addr = 0x8540, data = new byte[] { 0x01, 0x3A }
                },
                new PatchTableSt {
                    name = "HALFBODY", ver = "FE8J", addr = 0x843C, data = new byte[] { 0x01, 0x3A }
                },
            };

            string version = Program.ROM.RomInfo.VersionToFilename();

            foreach (PatchTableSt t in table)
            {
                if (t.ver != version)
                {
                    continue;
                }

                byte[] data = Program.ROM.getBinaryData(t.addr, t.data.Length);
                if (U.memcmp(t.data, data) != 0)
                {
                    continue;
                }

                if (t.name == "MUG_EXCEED")
                {
                    return(portrait_extends.MUG_EXCEED);
                }
                if (t.name == "HALFBODY")
                {
                    return(portrait_extends.HALFBODY);
                }
            }
            return(portrait_extends.NO);
        }
Esempio n. 5
0
        static skill_system_enum SearchSkillSystemLow()
        {
            PatchTableSt[] table = new PatchTableSt[] {
                new PatchTableSt {
                    name = "yugudora", ver = "FE8J", addr = 0xEE594, data = new byte[] { 0x4B, 0xFA, 0x2F, 0x59 }
                },
                new PatchTableSt {
                    name = "FE8N", ver = "FE8J", addr = 0x89268, data = new byte[] { 0x00, 0x4B, 0x9F, 0x46 }
                },
                new PatchTableSt {
                    name = "midori", ver = "FE8J", addr = 0xFE58E0, data = new byte[] { 0x05, 0x1C, 0x00, 0xF0, 0x25, 0xF8, 0x01, 0x29, 0x04, 0xD0, 0x28, 0x1C, 0x00, 0xF0, 0x28, 0xF8 }
                },
                new PatchTableSt {
                    name = "SkillSystem", ver = "FE8U", addr = 0x2ACF8, data = new byte[] { 0x70, 0x47 }
                },
            };

            string version = Program.ROM.RomInfo.VersionToFilename();

            foreach (PatchTableSt t in table)
            {
                if (t.ver != version)
                {
                    continue;
                }

                byte[] data = Program.ROM.getBinaryData(t.addr, t.data.Length);
                if (U.memcmp(t.data, data) != 0)
                {
                    continue;
                }
                if (t.name == "FE8N")
                {
                    if (SkillConfigFE8NVer2SkillForm.IsFE8NVer2())
                    {
                        return(skill_system_enum.FE8N_ver2);
                    }
                    return(skill_system_enum.FE8N);
                }
                if (t.name == "yugudora")
                {
                    return(skill_system_enum.yugudora);
                }
                if (t.name == "midori")
                {
                    return(skill_system_enum.midori);
                }
                if (t.name == "SkillSystem")
                {
                    return(skill_system_enum.SkillSystem);
                }
            }
            return(skill_system_enum.NO);
        }
Esempio n. 6
0
 //存在ユニットを選択したときフリーズしないように
 public static bool SearchWakuEvent_0x3B_FixPatch()
 {
     PatchTableSt[] table = new PatchTableSt[] {
         new PatchTableSt {
             name = "Prevent Freeze For Event 0x3B", ver = "FE8J", addr = 0x10950, data = new byte[] { 0x00, 0x20 }
         },
         new PatchTableSt {
             name = "Prevent Freeze For Event 0x3B", ver = "FE8U", addr = 0x10804, data = new byte[] { 0x00, 0x20 }
         },
     };
     return(SearchPatchBool(table));
 }
Esempio n. 7
0
 //存在ユニットを選択したときフリーズしないように
 public static bool SearchUnitStateEvent_0x34_FixPatch()
 {
     PatchTableSt[] table = new PatchTableSt[] {
         new PatchTableSt {
             name = "Prevent Freeze For Unit State Event 0x34", ver = "FE8J", addr = 0x10430, data = new byte[] { 0x00, 0x20 }
         },
         new PatchTableSt {
             name = "Prevent Freeze For Unit State Event 0x34", ver = "FE8U", addr = 0x102D4, data = new byte[] { 0x00, 0x20 }
         },
     };
     return(SearchPatchBool(table));
 }
Esempio n. 8
0
 //存在ユニットを選択したときフリーズしないように
 public static bool SearchCAMERA_Event_NotExistsUnit_FixPatch()
 {
     PatchTableSt[] table = new PatchTableSt[] {
         new PatchTableSt {
             name = "Prevent Freeze For Camera Event 0x26", ver = "FE8J", addr = 0xF468, data = new byte[] { 0x00, 0x20 }
         },
         new PatchTableSt {
             name = "Prevent Freeze For Camera Event 0x26", ver = "FE8U", addr = 0xF25C, data = new byte[] { 0x00, 0x20 }
         },
     };
     return(SearchPatchBool(table));
 }
Esempio n. 9
0
 //カメラを移動する命令で、画面外に飛び出してしまうバグを修正するパッチの検出
 public static bool SearchCAMERA_Event_OutOfBand_FixPatch()
 {
     PatchTableSt[] table = new PatchTableSt[] {
         new PatchTableSt {
             name = "Fix CAM1/CAMERA2 going out of bounds", ver = "FE8J", addr = 0x15D5E, data = new byte[] { 0x14 }
         },
         new PatchTableSt {
             name = "Fix CAM1/CAMERA2 going out of bounds", ver = "FE8U", addr = 0x15D52, data = new byte[] { 0x14 }
         },
     };
     return(SearchPatchBool(table));
 }
Esempio n. 10
0
        public static draw_font_enum SearchDrawFontPatch(ROM rom)
        {
            PatchTableSt[] table = new PatchTableSt[] {
                new PatchTableSt {
                    name = "DrawSingle", ver = "FE7J", addr = 0x56e2, data = new byte[] { 0x00, 0x00, 0x00, 0x49, 0x8F, 0x46 }
                },
                new PatchTableSt {
                    name = "DrawSingle", ver = "FE8J", addr = 0x40c2, data = new byte[] { 0x00, 0x00, 0x00, 0x49, 0x8F, 0x46 }
                },
                new PatchTableSt {
                    name = "DrawMulti", ver = "FE7U", addr = 0x5BD6, data = new byte[] { 0x00, 0x00, 0x00, 0x4B, 0x9F, 0x46 }
                },
                new PatchTableSt {
                    name = "DrawMulti", ver = "FE8U", addr = 0x44D2, data = new byte[] { 0x00, 0x00, 0x00, 0x49, 0x8F, 0x46 }
                },
                new PatchTableSt {
                    name = "DrawUTF8", ver = "FE7U", addr = 0x5B6A, data = new byte[] { 0x00, 0x00, 0x00, 0x4B, 0x18, 0x47 }
                },
                new PatchTableSt {
                    name = "DrawUTF8", ver = "FE8U", addr = 0x44D2, data = new byte[] { 0x00, 0x00, 0x00, 0x4B, 0x18, 0x47 }
                },
            };

            string version = rom.RomInfo.VersionToFilename();

            foreach (PatchTableSt t in table)
            {
                if (t.ver != version)
                {
                    continue;
                }

                //チェック開始アドレス
                byte[] data = rom.getBinaryData(t.addr, t.data.Length);
                if (U.memcmp(t.data, data) != 0)
                {
                    continue;
                }
                if (t.name == "DrawSingle")
                {
                    return(draw_font_enum.DrawSingleByte);
                }
                if (t.name == "DrawMulti")
                {
                    return(draw_font_enum.DrawMultiByte);
                }
                if (t.name == "DrawUTF8")
                {
                    return(draw_font_enum.DrawUTF8);
                }
            }
            return(draw_font_enum.NO);
        }
Esempio n. 11
0
 static AutoNewLine_enum SearchAutoNewLinePatchLow()
 {
     PatchTableSt[] table = new PatchTableSt[] {
         new PatchTableSt {
             name = "AutoNewLine", ver = "FE8U", addr = 0x464476, data = new byte[] { 0x00, 0x00, 0x10, 0xB4, 0x00, 0xB5, 0x03, 0x4C, 0x00, 0xF0, 0x04, 0xF8, 0x10, 0xBC, 0xA6, 0x46, 0x10, 0xBC, 0x70, 0x47, 0x20, 0x47 }
         },
     };
     if (SearchPatchBool(table))
     {
         return(AutoNewLine_enum.AutoNewLine);
     }
     return(AutoNewLine_enum.NO);
 }
Esempio n. 12
0
        static mnc2_fix_enum SearchSkipWorldMapPatchLow()
        {
            PatchTableSt[] table = new PatchTableSt[] {
                new PatchTableSt {
                    name = "OldFix", ver = "FE8J", addr = 0xc1e7c, data = new byte[] { 0xB8, 0xE0 }
                },
                new PatchTableSt {
                    name = "Stan_20190505", ver = "FE8J", addr = 0x0F664, data = new byte[] { 0x94, 0xF6, 0x00, 0x08 }
                },                                                                                                               //NOT条件
                new PatchTableSt {
                    name = "Aera_Version", ver = "FE8J", addr = 0xc03e0, data = new byte[] { 0x01, 0x48, 0x80, 0x7B, 0x70, 0x47, 0x00, 0x00, 0xEC, 0xBC, 0x02, 0x02 }
                },
                new PatchTableSt {
                    name = "OldFix", ver = "FE8U", addr = 0xBD070, data = new byte[] { 0xB8, 0xE0 }
                },
                new PatchTableSt {
                    name = "Stan_20190505", ver = "FE8U", addr = 0x0F464, data = new byte[] { 0x98, 0xF4, 0x00, 0x08 }
                },                                                                                                               //NOT条件
            };

            string version = Program.ROM.RomInfo.VersionToFilename();

            foreach (PatchTableSt t in table)
            {
                if (t.ver != version)
                {
                    continue;
                }

                //チェック開始アドレス
                byte[] data = Program.ROM.getBinaryData(t.addr, t.data.Length);
                if (U.memcmp(t.data, data) != 0)
                {
                    if (t.name == "Stan_20190505")
                    {
                        return(mnc2_fix_enum.Stan_20190505);
                    }
                    continue;
                }
                if (t.name == "OldFix")
                {
                    return(mnc2_fix_enum.OldFix);
                }
                if (t.name == "Aera_Version")
                {
                    return(mnc2_fix_enum.Aera_Version);
                }
            }
            return(mnc2_fix_enum.NO);
        }
Esempio n. 13
0
        static uint SearchShinanTablePatchLow()
        {
            PatchTableSt[] table = new PatchTableSt[] {
                new PatchTableSt {
                    name = "Shinan", ver = "FE8J", addr = 0xDB000, data = new byte[] { 0x00, 0xB5, 0xC0, 0x46, 0x06, 0x48, 0xC0, 0x46, 0x06, 0x49, 0x89, 0x7B, 0x89, 0x00, 0x40, 0x58, 0x01, 0x21, 0x00, 0xF0, 0x02, 0xF8, 0x17, 0x20, 0x00, 0xBD, 0xC0, 0x46, 0x02, 0x4B, 0x9F, 0x46 }
                },
                new PatchTableSt {
                    name = "ShinanEA", ver = "FE8J", addr = 0xDB000, data = new byte[] { 0x00, 0xB5, 0x26, 0x20, 0x07, 0x4B, 0x9E, 0x46, 0x00, 0xF8, 0x09, 0x48, 0x06, 0x49, 0x89, 0x7B, 0x89, 0x00, 0x40, 0x58, 0x01, 0x21, 0x05, 0x4B, 0x9E, 0x46, 0x00, 0xF8, 0x17, 0x20, 0x02, 0xBC, 0x08, 0x47, 0x00, 0x00, 0xA8, 0x60, 0x08, 0x08, 0xEC, 0xBC, 0x02, 0x02, 0x40, 0xD3, 0x00, 0x08 }
                },
                new PatchTableSt {
                    name = "Shinan", ver = "FE8U", addr = 0xDB000, data = new byte[] { 0x00, 0xB5, 0xC0, 0x46, 0x06, 0x48, 0xC0, 0x46, 0x06, 0x49, 0x89, 0x7B, 0x89, 0x00, 0x40, 0x58, 0x01, 0x21, 0x00, 0xF0, 0x02, 0xF8, 0x17, 0x20, 0x00, 0xBD, 0xC0, 0x46, 0x02, 0x4B, 0x9F, 0x46 }
                },
                new PatchTableSt {
                    name = "ShinanEA", ver = "FE8U", addr = 0xDB000, data = new byte[] { 0x00, 0xB5, 0x26, 0x20, 0x07, 0x4B, 0x9E, 0x46, 0x00, 0xF8, 0x09, 0x48, 0x06, 0x49, 0x89, 0x7B, 0x89, 0x00, 0x40, 0x58, 0x01, 0x21, 0x05, 0x4B, 0x9E, 0x46, 0x00, 0xF8, 0x17, 0x20, 0x02, 0xBC, 0x08, 0x47, 0x00, 0x00, 0x80, 0x3D, 0x08, 0x08, 0xF0, 0xBC, 0x02, 0x02, 0x7C, 0xD0, 0x00, 0x08 }
                },
            };

            string version = Program.ROM.RomInfo.VersionToFilename();

            foreach (PatchTableSt t in table)
            {
                if (t.ver != version)
                {
                    continue;
                }

                uint addr = U.GrepEnd(Program.ROM.Data, t.data, t.addr, 0, 4, 0, true);
                if (addr == U.NOT_FOUND)
                {
                    continue;
                }
                if (!U.isSafetyOffset(addr))
                {
                    continue;
                }
                addr = Program.ROM.p32(addr);
                if (!U.isSafetyOffset(addr))
                {
                    continue;
                }
                return(U.toOffset(addr));
            }
            return(U.NOT_FOUND);
        }
Esempio n. 14
0
        public static itemicon_extends SearchItemIconExpandsPatchLow()
        {
            PatchTableSt[] table = new PatchTableSt[] {
                new PatchTableSt {
                    name = "IconExpands", ver = "FE8J", addr = 0x34FC, data = new byte[] { 0xFE, 0x01, 0x00, 0x01, 0x90, 0x6E, 0x02, 0x02 }
                },
                new PatchTableSt {
                    name = "IconExpands", ver = "FE8U", addr = 0x35B0, data = new byte[] { 0xFE, 0x01, 0x00, 0x01, 0x90, 0x6E, 0x02, 0x02 }
                },
                new PatchTableSt {
                    name = "SkillSystems", ver = "FE8U", addr = 0x3586, data = new byte[] { 0x03, 0x4C, 0x00, 0xF0, 0x03, 0xF8, 0x10, 0xBC, 0x02, 0xBC, 0x08, 0x47, 0x20, 0x47 }
                },
            };

            string version = Program.ROM.RomInfo.VersionToFilename();

            foreach (PatchTableSt t in table)
            {
                if (t.ver != version)
                {
                    continue;
                }

                //チェック開始アドレス
                byte[] data = Program.ROM.getBinaryData(t.addr, t.data.Length);
                if (U.memcmp(t.data, data) != 0)
                {
                    continue;
                }
                if (t.name == "IconExpands")
                {
                    return(itemicon_extends.IconExpands);
                }
                if (t.name == "SkillSystems")
                {
                    return(itemicon_extends.SkillSystems);
                }
            }
            return(itemicon_extends.NO);
        }
Esempio n. 15
0
 static Escape_enum SearchEscapePatchLow()
 {
     {
         PatchTableSt[] table = new PatchTableSt[] {
             new PatchTableSt {
                 name = "escape_arrive", ver = "FE8U", addr = 0x187A8, data = new byte[] { 0x00, 0x4b, 0x18, 0x47 }
             },
         };
         PatchTableSt p = SearchPatch(table);
         if (p.name == "escape_arrive")
         {
             return(Escape_enum.EscapeArrivePath);
         }
     }
     {
         Grep2PatchTableSt[] table = new Grep2PatchTableSt[] {
             new Grep2PatchTableSt {
                 name = "ver20191022", ver = "FE8U", data = new byte[] { 0x00, 0xB5, 0x07, 0x48, 0x06, 0x4A, 0x00, 0x78, 0x02, 0x21, 0x48, 0x43, 0x05, 0x49, 0x40, 0x18, 0x00, 0x88, 0x10, 0x80, 0x02, 0xBC, 0x08, 0x47, 0xC0, 0x46, 0xC0, 0x46, 0xC0, 0x46, 0xC0, 0x46, 0xC0, 0x04, 0x00, 0x03 }
             },
         };
         Grep2PatchTableSt t = GrepPatch(table);
         if (t.name == "ver20191022")
         {
             return(Escape_enum.EscapeArrivePath);
         }
     }
     {
         GrepPatchTableSt[] table = new GrepPatchTableSt[] {
             new GrepPatchTableSt {
                 name = "escape_menu", patch_dmp = "EscapeMenu/IsLoca0x13.dmp"
             },
         };
         GrepPatchTableSt p = GrepPatch(table);
         if (p.name == "escape_menu")
         {
             return(Escape_enum.EscapeMenuPath);
         }
     }
     return(Escape_enum.NO);
 }
Esempio n. 16
0
        static bool SearchPatchBool(PatchTableSt[] table)
        {
            PatchTableSt p = SearchPatch(table);

            return(p.addr != 0);
        }