예제 #1
0
            public void Update(PreviousType type, MemoryDomain domain, bool bigendian)
            {
                var value = domain.PeekWord(Address % domain.Size, bigendian);

                if (value != Previous)
                {
                    _changecount++;
                }

                switch (type)
                {
                case PreviousType.Original:
                case PreviousType.LastSearch:
                    break;

                case PreviousType.LastFrame:
                    _previous = _prevFrame;
                    break;

                case PreviousType.LastChange:
                    if (_prevFrame != value)
                    {
                        _previous = _prevFrame;
                    }
                    break;
                }

                _prevFrame = value;
            }
예제 #2
0
 protected ushort GetWord()
 {
     if (Global.CheatList.IsActive(_domain, _address))
     {
         return((ushort)Global.CheatList.GetCheatValue(_domain, _address, WatchSize.Word).Value);
     }
     else
     {
         if (_domain.Size == 0)
         {
             return(_domain.PeekWord(_address, _bigEndian));
         }
         else
         {
             return(_domain.PeekWord(_address % _domain.Size, _bigEndian));                    // TODO: % size stil lisn't correct since it could be the last byte of the domain
         }
     }
 }
예제 #3
0
파일: Watch.cs 프로젝트: robsonfr/BizHawk
 protected ushort GetWord(bool bypassFreeze = false)
 {
     if (!bypassFreeze && Global.CheatList.IsActive(_domain, _address))
     {
         //LIAR logic
         return((ushort)(Global.CheatList.GetCheatValue(_domain, _address, WatchSize.Word) ?? 0));
     }
     else
     {
         if (_domain.Size == 0)
         {
             return(_domain.PeekWord(_address, _bigEndian));
         }
         else
         {
             return(_domain.PeekWord(_address % _domain.Size, _bigEndian));                    // TODO: % size stil lisn't correct since it could be the last byte of the domain
         }
     }
 }
예제 #4
0
        public string Disassemble(MemoryDomain m, uint addr, out int length)
        {
            _disassemblerInstance.ReadWord = (a) => (short)m.PeekWord(a, m.EndianType == MemoryDomain.Endian.Big);
            _disassemblerInstance.ReadByte = (a) => (sbyte)m.PeekByte(a);
            _disassemblerInstance.ReadLong = (a) => (int)m.PeekDWord(a, m.EndianType == MemoryDomain.Endian.Big);
            var info = _disassemblerInstance.Disassemble((int)addr);

            length = info.Length;

            return(string.Format("{0:X4}  {1,-7} {2}", info.RawBytes.Substring(0, 4), info.Mnemonic, info.Args));
        }
예제 #5
0
파일: BasicBot.cs 프로젝트: budzikt/BizHawk
        private int GetRamvalue(int addr)
        {
            int val;

            switch (_dataSize)
            {
            default:
            case 1:
                val = _currentDomain.PeekByte(addr);
                break;

            case 2:
                val = _currentDomain.PeekWord(addr, _bigEndian);
                break;

            case 4:
                val = (int)_currentDomain.PeekDWord(addr, _bigEndian);
                break;
            }

            return(val);
        }
예제 #6
0
 public void SetPreviousToCurrent(MemoryDomain domain, bool bigendian)
 {
     _previous = _prevFrame = domain.PeekWord(Address % domain.Size, bigendian);
 }
예제 #7
0
 public MiniWordWatch(MemoryDomain domain, long addr, bool bigEndian)
 {
     Address   = addr;
     _previous = domain.PeekWord(Address % domain.Size, bigEndian);
 }
예제 #8
0
파일: Watch.cs 프로젝트: stuff2600/RAEmus
 protected ushort GetWord()
 {
     return(_domain.PeekWord(_address % _domain.Size, _bigEndian));            // TODO: % size stil lisn't correct since it could be the last byte of the domain
 }