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; }
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 } } }
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 } } }
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)); }
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); }
public void SetPreviousToCurrent(MemoryDomain domain, bool bigendian) { _previous = _prevFrame = domain.PeekWord(Address % domain.Size, bigendian); }
public MiniWordWatch(MemoryDomain domain, long addr, bool bigEndian) { Address = addr; _previous = domain.PeekWord(Address % domain.Size, bigEndian); }
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 }