Example #1
0
        public static NESDatabaseEntry GetRomDetails(string crc32)
        {
            if (!NESDatabase.hasParsed)
            {
                NESDatabase.Parse();
            }

            if (NESDatabase.entries.TryGetValue(crc32, out NESDatabaseEntry entry))
            {
                return(entry);
            }

            return(null);
        }
Example #2
0
        public static void Parse()
        {
            if (File.Exists(Constants.NstDatabasePath))
            {
                NESDatabase.ParseNstDatabase(Constants.NstDatabasePath);
            }

            if (File.Exists(Constants.NesCartsPath))
            {
                NESDatabase.ParseNesCartsDatabase(Constants.NesCartsPath);
            }

            NESDatabase.hasParsed = true;

            GC.Collect(3, GCCollectionMode.Forced, blocking: true);
        }