示例#1
0
 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));
 }
示例#2
0
        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);
        }
示例#3
0
 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));
     }
 }
示例#4
0
 public MemoryMapRegionViewModel(MemoryMapRegion region)
 {
     this.region = region;
 }