/// @brief Create a new Watch for a Main memory location.
 /// @param chip Reference to %PropellerCPU to inspect its memory.
 /// @param name Name to associate the Watch.
 /// @param address Memory address to inspect.
 public MemWatcher(PropellerCPU chip, string name, uint address)
 {
     IsCogBased    = false;
     _chip         = chip;
     _cog          = null;
     Addr          = address; //this assignment validate the value or throw an exception
     Name          = name;
     Value         = chip.ReadLong(Addr);
     ComparedValue = 0;
     isStoppedBy   = false;
     Mode          = StopMode.none;
 }
Beispiel #2
0
        /// @todo Document method Gear.EmulationCore.Cog.HubAccessable().
        ///
        public virtual void HubAccessable()
        {
            switch (State)
            {
            case CogRunState.WAIT_LOAD_PROGRAM:
                Memory[StateCount++] = Hub.ReadLong(ProgramAddress);
                ProgramAddress      += 4;

                if (StateCount == 0x1F0)
                {
                    StateCount = 0;
                    Boot();
                }
                break;
            }
        }
 private uint UpdatedValue()
 {
     return(Value = (IsCogBased) ?
                    _cog.ReadLong(_addr) :
                    _chip.ReadLong(_addr));
 }