コード例 #1
0
            public void Update(PreviousType type, MemoryDomain domain, bool bigendian)
            {
                var value = domain.PeekDWord(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
ファイル: Watch.cs プロジェクト: metalloidSmashes/BizHawk
 protected uint GetDWord()
 {
     if (Global.CheatList.IsActive(_domain, _address))
     {
         return((uint)Global.CheatList.GetCheatValue(_domain, _address, WatchSize.DWord).Value);
     }
     else
     {
         if (_domain.Size == 0)
         {
             return(_domain.PeekDWord(_address, _bigEndian));                    // TODO: % size stil lisn't correct since it could be the last byte of the domain
         }
         else
         {
             return(_domain.PeekDWord(_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 uint GetDWord(bool bypassFreeze = false)
 {
     if (!bypassFreeze && Global.CheatList.IsActive(_domain, _address))
     {
         //LIAR logic
         return((uint)(Global.CheatList.GetCheatValue(_domain, _address, WatchSize.DWord) ?? 0));
     }
     else
     {
         if (_domain.Size == 0)
         {
             return(_domain.PeekDWord(_address, _bigEndian));                    // TODO: % size stil lisn't correct since it could be the last byte of the domain
         }
         else
         {
             return(_domain.PeekDWord(_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
        public string Disassemble(MemoryDomain m, uint addr, out int length)
        {
            length = 4;             // TODO: is this right?
            var instruction = m.PeekDWord(addr, true);

            //TODO - reserve buffer here for disassembling into. allocating repeatedly will be slower
            var    result    = api.m64p_decode_op(instruction, addr);
            string strResult = Marshal.PtrToStringAnsi(result);

            return(strResult);
        }
コード例 #6
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);
        }
コード例 #7
0
 public void SetPreviousToCurrent(MemoryDomain domain, bool bigendian)
 {
     _previous = _prevFrame = domain.PeekDWord(Address % domain.Size, bigendian);
 }
コード例 #8
0
 public MiniDWordWatch(MemoryDomain domain, long addr, bool bigEndian)
 {
     Address   = addr;
     _previous = domain.PeekDWord(Address % domain.Size, bigEndian);
 }
コード例 #9
0
ファイル: Watch.cs プロジェクト: stuff2600/RAEmus
 protected uint GetDWord()
 {
     return(_domain.PeekDWord(_address % _domain.Size, _bigEndian));            // TODO: % size stil lisn't correct since it could be the last byte of the domain
 }