1 |
< |
#define DISABLE_GETFIRSTNONZEROBYTE_ONUPDATE_ACCEPTEDPROCESS // when defined will not call GetFirstNonZeroByte() when AcceptedProcess is updated and is not null |
2 |
< |
#define DISABLE_GETFIRSTNONZERO_BYTE // when defined will make GetFirstNonZeroByte() an empty void method |
1 |
> |
//#define DISABLE_GETFIRSTNONZEROBYTE_ONUPDATE_ACCEPTEDPROCESS // when defined will not call GetFirstNonZeroByte() when AcceptedProcess is updated and is not null |
2 |
> |
//#define DISABLE_GETFIRSTNONZERO_BYTE // when defined will make GetFirstNonZeroByte() an empty void method |
3 |
|
using System; |
4 |
|
using System.Collections.Generic; |
5 |
|
using System.ComponentModel; |
58 |
|
{ |
59 |
|
GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this); |
60 |
|
provider.OpenProvider(); |
61 |
< |
uint addr = 0; |
61 |
> |
int addr = 0; |
62 |
|
provider.ReadFirstNonZeroByte(MemoryStart, MemorySize, out addr); |
63 |
|
provider.CloseProvider(); |
64 |
|
GotoAddress(addr); |
88 |
|
#endregion |
89 |
|
#region IAcceptsMemoryRange members |
90 |
|
public int MemoryStart { get { return 0; } } |
91 |
< |
public int MemorySize { get { return int.MaxValue; } } |
91 |
> |
public uint MemorySize { get { return int.MaxValue; } } |
92 |
|
#endregion |
93 |
|
public void GotoTop() { this.CURRENT_TOP_ADDR = 0; } |
94 |
|
public void GotoBottom() { uint size = (uint)MemorySize; this.CURRENT_TOP_ADDR = (int)((size - 1) - max_ram_view); } |
95 |
< |
public void GotoAddress(uint addr) { this.CURRENT_TOP_ADDR = (int)(addr & 0xFFFFFFF0); } |
95 |
> |
public void GotoAddress(int addr) { this.CURRENT_TOP_ADDR = (int)(addr & 0xFFFFFFF0); } |
96 |
|
private bool _UpdateEnabled; |
97 |
|
public bool UpdateEnabled |
98 |
|
{ |
145 |
|
} |
146 |
|
private void btnGotoAddress_Click(object sender, EventArgs e) |
147 |
|
{ |
148 |
< |
this.GotoAddress(txthexGoto.ToUInt32()); |
148 |
> |
this.GotoAddress(txthexGoto.ToInt32()); |
149 |
|
} |
150 |
|
|
151 |
|
private void btnEditBytes_Click(object sender, EventArgs e) |
396 |
|
} |
397 |
|
if (this.CURRENT_TOP_ADDR < MemoryStart) this.CURRENT_TOP_ADDR = MemoryStart; |
398 |
|
//if (this.CURRENT_TOP_ADDR >= VTLB_VADDR_SIZE) this.CURRENT_TOP_ADDR = (size - 1) - max_ram_view; |
399 |
< |
if (this.CURRENT_TOP_ADDR + max_ram_view >= MemorySize) this.CURRENT_TOP_ADDR = (MemorySize - max_ram_view); |
399 |
> |
if (this.CURRENT_TOP_ADDR + max_ram_view >= MemorySize) this.CURRENT_TOP_ADDR = (int)(MemorySize - max_ram_view); |
400 |
|
|
401 |
|
//this.UpdateEnabled = reenable; |
402 |
|
} |
496 |
|
if (this.CURRENT_TOP_ADDR < 0) this.CURRENT_TOP_ADDR = 0; |
497 |
|
//if (this.CURRENT_TOP_ADDR >= VTLB_VADDR_SIZE) this.CURRENT_TOP_ADDR = VTLB_VADDR_SIZE - max_ram_view; |
498 |
|
//if (this.CURRENT_TOP_ADDR < 0 || this.CURRENT_TOP_ADDR >= VTLB_VADDR_SIZE) this.CURRENT_TOP_ADDR = ORIGINAL_ADDR; |
499 |
< |
if (this.CURRENT_TOP_ADDR + max_ram_view >= MemorySize) this.CURRENT_TOP_ADDR = MemorySize - max_ram_view; |
499 |
> |
if (this.CURRENT_TOP_ADDR + max_ram_view >= MemorySize) this.CURRENT_TOP_ADDR = (int)(MemorySize - max_ram_view); |
500 |
|
//this.UpdateEnabled = reenable; |
501 |
|
//isScrolling = false; |
502 |
|
} |