private void AssertRegion(MemoryMapRegion region, string name, int @base, int end, int size) { Assert.That(region.Name, Is.EqualTo(name)); Assert.That(region.Base, Is.EqualTo(@base)); Assert.That(region.End, Is.EqualTo(end)); Assert.That(region.Size, Is.EqualTo(size)); }
private void LoadDefaultMemoryMaps() { var region = new MemoryMapRegion(_trainer.MemoryMapEventBus) { Name = "RAM", Start = 0x0, End = 0xFFF }; _trainer.MemoryMapManager.AddRegion(region); LoadMapFromResource("ROM/Monitor.map", ET3400.Trainer.Trainer.RomAddress, 1024); }
private void LoadMapFromResource(string key, int start, int length) { using (var stream = ResourceHelper.GetEmbeddedResourceStream(typeof(ET3400.Trainer.Trainer).Assembly, key)) { _trainer.MemoryMapManager.RemoveRegionByName(key); var region = new MemoryMapRegion(_trainer.MemoryMapEventBus) { Name = key, Start = start, End = start + length }; _trainer.MemoryMapManager.AddRegion(region); region.MemoryMapCollection.AddRange(MemoryMapCollection.Load(stream)); } }
public MemoryMapRegionViewModel(MemoryMapRegion region) { this.region = region; }