Esempio n. 1
0
        public static DebugWorkspace GetWorkspace()
        {
            string romName = EmuApi.GetRomInfo().GetRomName();

            if (_workspace == null || _romName != romName)
            {
                if (_workspace != null)
                {
                    SaveWorkspace();
                }
                _romName   = romName;
                _workspace = DebugWorkspace.GetWorkspace();

                //Load watch entries
                WatchManager.GetWatchManager(CpuType.Cpu).WatchEntries = _workspace.WatchValues;
                WatchManager.GetWatchManager(CpuType.Spc).WatchEntries = _workspace.SpcWatchValues;
                WatchManager.GetWatchManager(CpuType.Sa1).WatchEntries = _workspace.Sa1WatchValues;
                WatchManager.GetWatchManager(CpuType.Gsu).WatchEntries = _workspace.GsuWatchValues;

                LabelManager.ResetLabels();
                LabelManager.SetLabels(_workspace.CpuLabels);
                LabelManager.SetLabels(_workspace.SpcLabels);
                LabelManager.SetDefaultLabels();

                ImportDbgFile();
                LabelManager.RefreshLabels();

                //Load breakpoints
                BreakpointManager.SetBreakpoints(_workspace.Breakpoints);
            }
            return(_workspace);
        }
Esempio n. 2
0
        private static DebugWorkspace Deserialize(string path)
        {
            DebugWorkspace config = new DebugWorkspace();

            if (File.Exists(path))
            {
                try {
                    XmlSerializer xmlSerializer = new XmlSerializer(typeof(DebugWorkspace));
                    using (TextReader textReader = new StreamReader(path)) {
                        config = (DebugWorkspace)xmlSerializer.Deserialize(textReader);
                    }
                } catch { }
            }

            config._filePath = path;

            return(config);
        }
Esempio n. 3
0
        public static DebugWorkspace GetWorkspace()
        {
            string romName = EmuApi.GetRomInfo().GetRomName();

            if (_workspace == null || _romName != romName)
            {
                if (_workspace != null)
                {
                    SaveWorkspace();
                }
                _romName   = romName;
                _workspace = DebugWorkspace.GetWorkspace();

                //Load watch entries
                WatchManager.GetWatchManager(CpuType.Cpu).WatchEntries = _workspace.WatchValues;
                WatchManager.GetWatchManager(CpuType.Spc).WatchEntries = _workspace.SpcWatchValues;

                //Load breakpoints
                BreakpointManager.SetBreakpoints(_workspace.Breakpoints);
            }
            return(_workspace);
        }
Esempio n. 4
0
        public static DebugWorkspace GetWorkspace()
        {
            string romName = EmuApi.GetRomInfo().GetRomName();

            if (_workspace != null)
            {
                SaveWorkspace();
            }

            if (_workspace == null || _romName != romName)
            {
                _romName   = romName;
                _workspace = DebugWorkspace.GetWorkspace();

                //Load watch entries
                WatchManager.GetWatchManager(CpuType.Cpu).WatchEntries     = _workspace.WatchValues;
                WatchManager.GetWatchManager(CpuType.Spc).WatchEntries     = _workspace.SpcWatchValues;
                WatchManager.GetWatchManager(CpuType.Sa1).WatchEntries     = _workspace.Sa1WatchValues;
                WatchManager.GetWatchManager(CpuType.Gsu).WatchEntries     = _workspace.GsuWatchValues;
                WatchManager.GetWatchManager(CpuType.NecDsp).WatchEntries  = _workspace.NecDspWatchValues;
                WatchManager.GetWatchManager(CpuType.Gameboy).WatchEntries = _workspace.GbWatchValues;

                LabelManager.ResetLabels();
                LabelManager.SetLabels(_workspace.CpuLabels);
                LabelManager.SetLabels(_workspace.SpcLabels);
                LabelManager.SetLabels(_workspace.NecDspLabels);
                LabelManager.SetLabels(_workspace.GbLabels);
                LabelManager.SetDefaultLabels();

                AutoImportSymbols();
            }

            //Send breakpoints & labels to emulation core (even if the same game is running)
            LabelManager.RefreshLabels();
            BreakpointManager.SetBreakpoints(_workspace.Breakpoints);

            return(_workspace);
        }
Esempio n. 5
0
 public static void Clear()
 {
     _workspace = null;
     _romName   = null;
     LabelManager.ResetLabels();
 }
Esempio n. 6
0
 public static void Clear()
 {
     _workspace = null;
     _romName   = null;
 }