예제 #1
0
        public static void TryLoad(string path)
        {
            var rom = new EFEROM(SystemFile.ReadAllBytes(path));

            // Ensure the filesystem is valid
            rom.ToFileSystem();
            // Check its a valid MKDS ROM
            if (!rom.IsMKDS())
            {
                throw new NotMKDSROMException();
            }
            ROM = new ROMObject(path, rom);
        }
예제 #2
0
 public static NDS.Nitro.NDS LoadROM(string Path)
 {
     NDS.Nitro.NDS rom;
     try
     {
         rom = new NDS.Nitro.NDS(File.ReadAllBytes(Path));
         var tmpfs = rom.ToFileSystem();
     }
     catch
     {
         rom = null;
     }
     return(rom);
 }
예제 #3
0
        public static bool IsMKDS(this NDS.Nitro.NDS ROM)
        {
            bool ismk = true;
            var  root = ROM.ToFileSystem();

            foreach (var file in SomeMKDSFiles)
            {
                if (!ROM.ExistsFile(file, root))
                {
                    ismk = false;
                    break;
                }
            }
            return(ismk);
        }