Esempio n. 1
0
 public void saveFileAs(string filename, ROM_Endian saveType)
 {
     if (saveType == ROM_Endian.MIXED)
     {
         swapMixedBig();
         File.WriteAllBytes(filename, bytes);
         swapMixedBig();
         endian = ROM_Endian.MIXED;
     }
     else if (saveType == ROM_Endian.LITTLE)
     {
         swapLittleBig();
         File.WriteAllBytes(filename, bytes);
         swapLittleBig();
         endian = ROM_Endian.LITTLE;
     }
     else // Save as big endian by default
     {
         File.WriteAllBytes(filename, bytes);
         endian = ROM_Endian.BIG;
     }
     filepath = filename;
     Globals.pathToAutoLoadROM = filepath;
     SettingsFile.SaveGlobalSettings("default");
 }
Esempio n. 2
0
 public void saveFileAs(string filename, RomEndian saveType)
 {
     if (saveType == RomEndian.Mixed)
     {
         swapMixedBig();
         File.WriteAllBytes(filename, bytes);
         swapMixedBig();
         endian = RomEndian.Mixed;
     }
     else if (saveType == RomEndian.Little)
     {
         swapLittleBig();
         File.WriteAllBytes(filename, bytes);
         swapLittleBig();
         endian = RomEndian.Little;
     }
     else             // Save as big endian by default
     {
         File.WriteAllBytes(filename, bytes);
         endian = RomEndian.Big;
     }
     Globals.needToSave        = false;
     filepath                  = filename;
     Globals.pathToAutoLoadROM = filepath;
     SettingsFile.SaveGlobalSettings("default");
 }
Esempio n. 3
0
 public void readFile(string filename)
 {
     filepath = filename;
     bytes    = File.ReadAllBytes(filename);
     checkROM();
     Globals.pathToAutoLoadROM = filepath;
     SettingsFile.SaveGlobalSettings("default");
 }
Esempio n. 4
0
 public void readFile(string filename)
 {
     filepath  = filename;
     bytes     = File.ReadAllBytes(filename);
     writeMask = new byte[bytes.Length];
     checkROM();
     Globals.pathToAutoLoadROM = filepath;
     Globals.needToSave        = false;
     SettingsFile.SaveGlobalSettings("default");
 }
Esempio n. 5
0
 public void saveFile()
 {
     if (Endian == ROM_Endian.MIXED)
     {
         swapMixedBig();
         File.WriteAllBytes(filepath, bytes);
         swapMixedBig();
     }
     else if (Endian == ROM_Endian.LITTLE)
     {
         swapLittleBig();
         File.WriteAllBytes(filepath, bytes);
         swapLittleBig();
     }
     else // Save as big endian by default
     {
         File.WriteAllBytes(filepath, bytes);
     }
     Globals.pathToAutoLoadROM = filepath;
     SettingsFile.SaveGlobalSettings("default");
 }
Esempio n. 6
0
        private void OpenROM(string path)
        {
            Hide();
            ROM.Instance.readFile(path);
            Globals.pathToAutoLoadROM    = path;
            Globals.autoLoadROMOnStartup = true;

            if (!Globals.lastUsedROMs.Contains(path))
            {
                if (Globals.lastUsedROMs.Count > 5)
                {
                    Globals.lastUsedROMs.Pop();
                }
                Globals.lastUsedROMs.Push(path);
                SettingsFile.SaveGlobalSettings("default");
            }

            MainForm m = new MainForm();

            m.Show();
        }
Esempio n. 7
0
 public void saveFile()
 {
     if (Endian == RomEndian.Mixed)
     {
         swapMixedBig();
         File.WriteAllBytes(filepath, bytes);
         swapMixedBig();
     }
     else if (Endian == RomEndian.Little)
     {
         swapLittleBig();
         File.WriteAllBytes(filepath, bytes);
         swapLittleBig();
     }
     else             // Save as big endian by default
     {
         File.WriteAllBytes(filepath, bytes);
     }
     Globals.pathToAutoLoadROM = filepath;
     Globals.needToSave        = false;
     SettingsFile.SaveGlobalSettings("default");
 }
Esempio n. 8
0
 public void saveFile()
 {
     if (Endian == ROM_Endian.MIXED)
     {
         swapMixedBig();
         WriteToFileEx();
         swapMixedBig();
     }
     else if (Endian == ROM_Endian.LITTLE)
     {
         swapLittleBig();
         WriteToFileEx();
         swapLittleBig();
     }
     else // Save as big endian by default
     {
         WriteToFileEx();
     }
     Globals.pathToAutoLoadROM = filepath;
     Globals.needToSave        = false;
     SettingsFile.SaveGlobalSettings("default");
 }
Esempio n. 9
0
 private void testROMToolStripMenuItem_Click(object sender, EventArgs e)
 {
     LaunchROM.OpenEmulator();
     SettingsFile.SaveGlobalSettings("default");
 }
Esempio n. 10
0
 private void saveButton_Click(object sender, EventArgs e)
 {
     updateGlobalSettings();
     SettingsFile.SaveGlobalSettings("default");
     Close();
 }