public void Open(string filename) { RomLoader romLoader = new RomLoader(); _game = romLoader.Load(filename); _x80 = new X80(); _x80.Cartridge = _game.Cartridge; _x80.PowerUp(); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { if (openFileDialog.ShowDialog(this) == DialogResult.OK) { string fileName = openFileDialog.FileName; ROMLoader romLoader = new ROMLoader(); game = romLoader.Load(fileName); x80 = new X80(); x80.cartridge = game.cartridge; x80.PowerUp(); catridgeInfoMenuItem.Enabled = true; } }
public override void LoadRom(byte[] fileData) { game = Game.Load(fileData, SaveMemory); x80 = new X80(this); if (Audio != null) { x80.SoundChip.SetSampleRate(Audio.GetOutputSampleRate()); } x80.cartridge = game.cartridge; x80.PowerUp(); stopwatch.Reset(); stopwatch.Start(); }