Exemple #1
0
        private void MarkSelectionAs(CdlFlags type)
        {
            if (_memoryType != SnesMemoryType.CpuMemory && _memoryType != SnesMemoryType.PrgRom && _memoryType != SnesMemoryType.GameboyMemory && _memoryType != SnesMemoryType.GbPrgRom)
            {
                return;
            }

            int start = SelectionStartAddress;
            int end   = SelectionEndAddress;

            if (_memoryType == SnesMemoryType.CpuMemory || _memoryType == SnesMemoryType.GameboyMemory)
            {
                start = DebugApi.GetAbsoluteAddress(new AddressInfo()
                {
                    Address = start, Type = _memoryType
                }).Address;
                end = DebugApi.GetAbsoluteAddress(new AddressInfo()
                {
                    Address = end, Type = _memoryType
                }).Address;
            }

            if (start >= 0 && end >= 0 && start <= end)
            {
                DebugApi.MarkBytesAs((UInt32)start, (UInt32)end, type);
                DebugWindowManager.GetDebugger(_memoryType.ToCpuType())?.RefreshDisassembly();
            }

            RefreshData(_memoryType);
        }
        private void MarkSelectionAs(CdlFlags type)
        {
            SelectedAddressRange range = GetSelectedAddressRange();

            if (!_inSourceView && range != null && range.Start.Type == _manager.PrgMemoryType && range.End.Type == _manager.PrgMemoryType)
            {
                DebugApi.MarkBytesAs((UInt32)range.Start.Address, (UInt32)range.End.Address, type);
                DebugWindowManager.OpenDebugger(_manager.CpuType)?.RefreshDisassembly();
            }
        }
Exemple #3
0
 [DllImport(DllPath)] public static extern void MarkBytesAs(UInt32 start, UInt32 end, CdlFlags type);