示例#1
0
        public static string getObjectComboPath(this ROM_Region region)
        {
            string str;

            if (ROM_Region.EUROPE == region)
            {
                str = "./data/ObjectCombos_EU.json";
            }
            else if (ROM_Region.JAPAN == region)
            {
                str = "./data/ObjectCombos_JP.json";
            }
            else if (ROM_Region.JAPAN_SHINDOU == region)
            {
                str = "./data/ObjectCombos_JS.json";
            }
            else
            {
                str = "./data/ObjectCombos_NA.json";
            }
            return(str);
        }
示例#2
0
文件: ROM.cs 项目: robhanlon22/Quad64
        private void checkROM()
        {
            if (bytes[0] == 0x80 && bytes[1] == 0x37)
            {
                endian = ROM_Endian.BIG;
            }
            else if (bytes[0] == 0x37 && bytes[1] == 0x80)
            {
                endian = ROM_Endian.MIXED;
            }
            else if (bytes[0] == 0x40 && bytes[1] == 0x12)
            {
                endian = ROM_Endian.LITTLE;
            }

            if (endian == ROM_Endian.MIXED)
            {
                swapMixedBig();
            }
            else if (endian == ROM_Endian.LITTLE)
            {
                swapLittleBig();
            }

            if (bytes[0x3E] == 0x45)
            {
                region = ROM_Region.NORTH_AMERICA;
            }
            else if (bytes[0x3E] == 0x50)
            {
                region = ROM_Region.EUROPE;
            }
            else if (bytes[0x3E] == 0x4A)
            {
                if (bytes[0x3F] < 3)
                {
                    region = ROM_Region.JAPAN;
                }
                else
                {
                    region = ROM_Region.JAPAN_SHINDOU;
                }
            }

            // Setup segment 0x02 & segment 0x15 addresses
            if (region == ROM_Region.NORTH_AMERICA)
            {
                Globals.macro_preset_table   = 0xEC7E0;
                Globals.special_preset_table = 0xED350;
                // Globals.seg02_location = new[] { (uint)0x108A40, (uint)0x114750 };
                Globals.seg15_location = new[] { (uint)0x2ABCA0, (uint)0x2AC6B0 };
            }
            else if (region == ROM_Region.EUROPE)
            {
                Globals.macro_preset_table   = 0xBD590;
                Globals.special_preset_table = 0xBE100;
                // Globals.seg02_location = new[] { (uint)0xDE190, (uint)0xE49F0 };
                Globals.seg15_location = new[] { (uint)0x28CEE0, (uint)0x28D8F0 };
            }
            else if (region == ROM_Region.JAPAN)
            {
                Globals.macro_preset_table   = 0xEB6D0;
                Globals.special_preset_table = 0xEC240;
                // Globals.seg02_location = new[] { (uint)0x1076D0, (uint)0x112B50 };
                Globals.seg15_location = new[] { (uint)0x2AA240, (uint)0x2AAC50 };
            }
            else if (region == ROM_Region.JAPAN_SHINDOU)
            {
                Globals.macro_preset_table   = 0xC8D60;
                Globals.special_preset_table = 0xC98D0;
                //Globals.seg02_location = new[] { (uint)0xE42F0, (uint)0xEF770 };
                Globals.seg15_location = new[] { (uint)0x286AC0, (uint)0x2874D0 };
            }

            findAndSetSegment02();
            Console.WriteLine("Segment2 location: 0x" + Globals.seg02_location[0].ToString("X8") +
                              " to 0x" + Globals.seg02_location[1].ToString("X8"));

            if (bytes[Globals.seg15_location[0]] == 0x17)
            {
                type = ROM_Type.EXTENDED;
            }
            else
            {
                type = ROM_Type.VANILLA;
            }


            Console.WriteLine("ROM = " + filepath);
            Console.WriteLine("ROM Endian = " + endian);
            Console.WriteLine("ROM Region = " + region);
            Console.WriteLine("ROM Type = " + type);
            Console.WriteLine("-----------------------");
        }