Add bulk peek byte for waterbox cores
This should speed up the hex editor significantly in one byte mode, but it doesn't because the hex editor is buggy
This commit is contained in:
parent
a49a372410
commit
5892059fc3
|
@ -150,6 +150,30 @@ namespace BizHawk.Emulation.Cores.Waterbox
|
|||
}
|
||||
}
|
||||
|
||||
public override void BulkPeekByte(Range<long> addresses, byte[] values)
|
||||
{
|
||||
if (_addressMangler != 0)
|
||||
{
|
||||
base.BulkPeekByte(addresses, values);
|
||||
return;
|
||||
}
|
||||
|
||||
var start = (ulong)addresses.Start;
|
||||
var count = addresses.Count();
|
||||
|
||||
if (start < (ulong)Size && (start + count) <= (ulong)Size)
|
||||
{
|
||||
using (_monitor.EnterExit())
|
||||
{
|
||||
Marshal.Copy(Z.US((ulong)_data + start), values, 0, (int)count);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(addresses));
|
||||
}
|
||||
}
|
||||
|
||||
public WaterboxMemoryDomain(MemoryArea m, IMonitor monitor)
|
||||
{
|
||||
Name = Marshal.PtrToStringAnsi(m.Name);
|
||||
|
|
Loading…
Reference in New Issue