public MipsDebuggerViewModel(MachineViewModel machineVM) : base(machineVM) { m_Debugger = new MipsDebugger(); Disassembly = new ObservableCollection<DisassembledInstruction>(); WeakEventManager<MipsDebugger, EventArgs>.AddHandler( m_Debugger, "CodeScanned", (o, e) => { Dispatcher.InvokeAsync(() => { Disassembly.Clear(); foreach (var l in m_Debugger.Disassembly) { Disassembly.Add(l); } Dispatcher.InvokeAsync(() => { var e1 = Finished; if (e1 != null) e1(this, new EventArgs()); }, DispatcherPriority.Render); }); }); }
internal CartridgeViewModel(MachineViewModel currentModel) : base(currentModel) { Machine machine = (Machine)currentModel.TargetMachine; WeakEventManager<PerpherialInterface, CartridgeChangedEventArgs> .AddHandler(machine.DeviceRCP.DevicePI, "CartridgeChanged", DevicePI_CartridgeChanged); }
public EmulatorEngineViewModel(MachineViewModel machineModel) : base(machineModel) { //Status = machineModel.TargetMachine.Engine.Status; //WeakEventManager<EmulatorEngine, EngineStatusChangedArgs>.AddHandler( // machineModel.TargetMachine.Engine, // "EngineStatusChanged", // EngineStatusChangedHandler); }
public CpuViewModel(MachineViewModel machineViewModel) : base(machineViewModel) { var cpu = machineViewModel.TargetMachine.DeviceCPU; VirtualMemory = StreamViewModel.NewModelFromStream(cpu.VirtualMemoryStream); DebugVirtualMemory = StreamViewModel.NewModelFromStream(new VMemViewStream()); TlbCache = new TlbCacheViewModel(machineViewModel); State = new ExecutionStateViewModel(machineViewModel, machineViewModel.TargetMachine.DeviceCPU.State); Debugger = new MipsDebuggerViewModel(machineViewModel); }
public TlbCacheViewModel(MachineViewModel parentMachineModel) : base(parentMachineModel) { Refresh(); WeakEventManager<TLBCache, TLBCacheChangeEventArgs>.AddHandler( parentMachineModel.TargetMachine.DeviceCPU.Tlb, "CacheChanged", TlbChange); TlbEntries.CollectionChanged += TlbEntries_CollectionChanged; }
public MainWindow() { InitializeComponent(); m_MachineVM = (MachineViewModel)FindResource("machineVM"); xamlControl_EmuRunButton.Click += xamlControl_EmuRunButton_Click; xamlControl_MainCartBrowseFileButton.Click += xamlControl_MainCartBrowseFileButton_Click; xaml_ButtonScript.Click += xaml_ButtonScript_Click; xaml_ButtonToolCPUDebugger.Click += xaml_ButtonToolCPUDebugger_Click; xaml_ButtonToolMemoryEditor.Click += xaml_ButtonToolMemoryEditor_Click; xamlControl_EmuRunPostDebugButton.Click += xamlControl_EmuRunPostDebugButton_Click; Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException; Loaded += MainWindow_Loaded; }
protected internal MachineComponentViewModel(MachineViewModel parentMachine) { m_MachineParent = parentMachine; }
public ExecutionStateViewModel(MachineViewModel machineVm, ExecutionState state) : base(machineVm) { m_State = state; }
internal RcpViewModel(MachineViewModel model) : base(model) { m_MachineModel = model; Machine machine = model.TargetMachine; ; }