private static void Run(Options options) { var nintendo64 = new Nintendo64(); if (options.UseDebugger) { nintendo64.Debugger = new Debugger(nintendo64); } if (!options.NoVideo) { var window = new Window(nintendo64, size: options.VideoResolution) { IsFullScreen = options.FullScreenVideo, IsBorderless = options.BorderlessWindow }; nintendo64.VideoOutput = window; nintendo64.CartridgeSwapped += (n, c) => window.Title = nameof(DotN64) + (c != null ? $" - {c.ImageName.Trim()}" : string.Empty); } if (options.IPL != null) { nintendo64.PIF.IPL = File.ReadAllBytes(options.IPL); } if (options.Cartridge != null) { nintendo64.Cartridge = LoadCartridge(options.Cartridge); } nintendo64.PowerOn(); nintendo64.Run(); (nintendo64.VideoOutput as IDisposable)?.Dispose(); }
public RealityCoprocessor(Nintendo64 nintendo64) { this.nintendo64 = nintendo64; SP = new SignalProcessor(this); DP = new DisplayProcessor(this); PI = new ParallelInterface(this); SI = new SerialInterface(this); AI = new AudioInterface(this); VI = new VideoInterface(this); MI = new MIPSInterface(this); RI = new RDRAMInterface(this); MemoryMaps = new[] { new MappingEntry(0x00000000, 0x03FFFFFF, false) { Read = nintendo64.RAM.MemoryMaps.ReadWord, Write = nintendo64.RAM.MemoryMaps.WriteWord }, new MappingEntry(0x04000000, 0x040FFFFF, false) { Read = SP.MemoryMaps.ReadWord, Write = SP.MemoryMaps.WriteWord }, new MappingEntry(0x04100000, 0x041FFFFF, false) { Read = DP.MemoryMaps.ReadWord, Write = DP.MemoryMaps.WriteWord }, new MappingEntry(0x04300000, 0x043FFFFF, false) { Read = MI.MemoryMaps.ReadWord, Write = MI.MemoryMaps.WriteWord }, new MappingEntry(0x04400000, 0x044FFFFF, false) { Read = VI.MemoryMaps.ReadWord, Write = VI.MemoryMaps.WriteWord }, new MappingEntry(0x04500000, 0x045FFFFF, false) { Read = AI.MemoryMaps.ReadWord, Write = AI.MemoryMaps.WriteWord }, new MappingEntry(0x04600000, 0x046FFFFF, false) { Read = PI.MemoryMaps.ReadWord, Write = PI.MemoryMaps.WriteWord }, new MappingEntry(0x04700000, 0x047FFFFF, false) { Read = RI.MemoryMaps.ReadWord, Write = RI.MemoryMaps.WriteWord }, new MappingEntry(0x04800000, 0x048FFFFF, false) { Read = SI.MemoryMaps.ReadWord, Write = SI.MemoryMaps.WriteWord }, new MappingEntry(0x10000000, 0x1FBFFFFF, false) { Read = PI.MemoryMaps.ReadWord }, new MappingEntry(0x1FC00000, 0x1FC007FF, false) { Read = SI.MemoryMaps.ReadWord, Write = SI.MemoryMaps.WriteWord } }; }
public Debugger(Nintendo64 nintendo64) { this.nintendo64 = nintendo64; commands = new[]