public void SetRegisterSet(IRegisterSet set) { mRegisterSet = set as RegisterSet6510; if (mRegisterSet == null) { throw new Exception("Register set needs to be a RegisterSet6510"); } }
/// <summary> /// Add a collection of registers contained by the IRegisterSet instance under 'GroupName'. /// If the group has already been defined this generates an error. /// /// AddGroup will also create an instance of IDirtyBit and assign it to each register /// (all registers in the group share the same instance) which is useful for determining /// which groups of registers are dirty and need Apply() called. /// /// RegManager assumes that the register array may be sparse (i.e. some of the /// array elements may be null). However, other parts of the system may assume /// non-sparse arrays -- be sure to check usage of a group if you are adding a /// sparse array. /// /// NOTE: if a register is added to the group *after* calling AddGroup() the dirty bit /// needs to be "manually" added to the register. For example: /// /// IRegister[] group = new IRegister[4]; /// mRegManager.AddGroup( "MyGroup", group ); // group[*] is null!!! /// group[0] = new Reg32(...); // register is in group but no dirty bit! /// group[0].GroupDirtyBit = mRegManager.GetGroupDirtyBit( "MyGroup" ); /// /// NOTE: if a register belongs to multiple groups, it will only set the dirty bit for one of them! /// /// NOTE: to retrieve the IRegisterSet use <see cref="GetRegisterSets"/> or <see cref="GetRegisterSet"/> /// </summary> /// <param name="groupName">Name of group, must be non-null, unique, and not "*" (may be string.Empty)</param> /// <param name="group">collection of registers</param> /// <exception cref="InvalidParameterException">if the group already exists</exception> public void AddGroup(string groupName, IRegisterSet group) { lock ( mGroupLock ) { if (mGroups.ContainsKey(groupName) || mRegisterSets.ContainsKey(groupName) || mSuperGroups.ContainsKey(groupName)) { throw new InvalidParameterException( string.Format("RegManager '{0}' already contains group '{1}' (IRegisterSet)", Name, groupName)); } // This adds the registers, creates the dirty bit AddGroup(groupName, group.Registers); // Add the register set... mRegisterSets[groupName] = group; // If we've already created the name lookup cache, refresh it if (mNameLookupReg.Count > 0) { UpdateRegisterDictionaries(true); } } }
public void SetRegisterSet(IRegisterSet registerSet) { m_registerSet = registerSet; }
public MainWindow() { InitializeComponent(); //install the error callback before we do anything in case something connects to VICE VICECOMManager vcom = VICECOMManager.getVICEComManager(); vcom.setErrorCallback(new VICECOMManager.OneArgDelegate(SetSourceView), this.Dispatcher); vcom.setVICEmsgCallback(new VICECOMManager.OneArgDelegate(GotMsgFromVice)); m_registerSet = new RegisterSet6510(); m_memDump = new C64MemDump(); m_memDump.SetRegisterSet(m_registerSet); //this must be BEFORE we parse the PDB Data mAssertList = new ObservableCollection <AssertDataSource>(); string[] commandLineArgs = Environment.GetCommandLineArgs(); if (commandLineArgs.Length == 1) { m_readerAndDispaly = new AcmePDBRandD(); //System.Environment.Exit(1); } else if (commandLineArgs[1].EndsWith(".json")) { m_readerAndDispaly = new FunctionJSONRAndD(); } else { m_readerAndDispaly = new AcmePDBRandD(); } m_readerAndDispaly.SetCodeWindowControl(mTextBox); m_readerAndDispaly.SetLabelsWindowControl(mLabelsBox); m_readerAndDispaly.SetRegisterSet(m_registerSet); m_readerAndDispaly.SetMemDump(m_memDump); mBreakPoints = new List <BreakPointDataSource>(); mBreakPointDisplay.ItemsSource = mBreakPoints; VICIIRenderer.initRenderer(); //load charsets m_readerAndDispaly.CreatePDBFromARGS(commandLineArgs, this); // mCommands.Add("r"); // mCommands.Add("m 0000 ffff"); // mCommands.Add("x"); // mCommands.Add("!s"); // mCommands.Add("!sm"); dispatchCommand("!breaklist"); HandleCodeView(); /*AssertDataSource AD = new AssertDataSource(); * AD.Enable = true; * AD.Address = 0x810; * AD.Label = "Test"; * AD.Condition = "@io:$d020 != $00"; * AD.Msg = "This is a test"; * AD.Number = 1; * mAssertList.Add(AD);*/ AssertDataGrid.ItemsSource = mAssertList; }
public FastIrqRegisterSet(IRegisterSet baseSet) { BaseSet = baseSet; OverrideRegisters = new uint[7]; }
public OverrideRegisterSet(IRegisterSet baseSet) { BaseSet = baseSet; }