public void LoadImage(WriteFilePath file, bool persistent = false)
 {
     storage?.Dispose();
     storage  = DataStorage.Create(file, persistent: persistent);
     capacity = (long)Math.Ceiling((decimal)storage.Length / SectorSize);
     configHasChanged.Value = true;
     UpdateInterrupts();
 }
        public void EnableProfilerGlobally(WriteFilePath pathPrefix)
        {
            profilerPathPrefix = pathPrefix;

            CurrentEmulation.MachineAdded -= EnableProfilerInMachine;
            CurrentEmulation.MachineAdded += EnableProfilerInMachine;

            foreach (var machine in CurrentEmulation.Machines)
            {
                EnableProfilerInMachine(machine);
            }
        }