本文整理汇总了C#中BizHawk.Emulation.Common.MemoryDomain.PeekDWord方法的典型用法代码示例。如果您正苦于以下问题:C# MemoryDomain.PeekDWord方法的具体用法?C# MemoryDomain.PeekDWord怎么用?C# MemoryDomain.PeekDWord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BizHawk.Emulation.Common.MemoryDomain
的用法示例。
在下文中一共展示了MemoryDomain.PeekDWord方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Disassemble
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);
}
示例2: Disassemble
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;
}
示例3: SetPreviousToCurrent
public void SetPreviousToCurrent(MemoryDomain domain, bool bigendian)
{
_previous = domain.PeekDWord(Address, bigendian);
}
示例4: MiniDWordWatch
public MiniDWordWatch(MemoryDomain domain, int addr, bool bigEndian)
{
Address = addr;
_previous = domain.PeekDWord(Address % domain.Size, bigEndian);
}
示例5: Update
public void Update(Watch.PreviousType type, MemoryDomain domain, bool bigendian)
{
var value = domain.PeekDWord(Address % domain.Size, bigendian);
if (value != Previous)
{
_changecount++;
}
switch (type)
{
case Watch.PreviousType.Original:
case Watch.PreviousType.LastSearch:
break;
case Watch.PreviousType.LastFrame:
_previous = _prevFrame;
break;
}
_prevFrame = value;
}