| View previous topic :: View next topic |
| Author |
Message |
Razi Expert Cheater
Reputation: 1
Joined: 17 Jan 2018 Posts: 205
|
Posted: Mon Apr 29, 2019 1:31 pm Post subject: read/write array of bytes with CEEdit? |
|
|
I want to ask two questions:
1) How to read/write array of bytes (28 bytes) from address: ePSXe ENG.exe+5E975C , with CEEdit?
2) How to read/write array of bytes (28 bytes) from address: ePSXe ENG.exe+5E975C , with CEEdit in Hex and in Decimal?
Solution is found. The easiest way is to use memory record of the array of byte type.
To read array of bytes: | Code: | AddressList=getAddressList()
timer = createTimer(nil,false)
timer.Interval = 1000
timer.OnTimer = function()
UDF1.CEEdit1.Text = AddressList.getMemoryRecordByDescription('28byteshex').Value
end
timer.Enabled = true |
To write array of bytes: | Code: | UDF1.CEEdit1.OnKeyPress = function(sender, key)
timer.Enabled = false
if isKeyPressed(VK_RETURN) then
AddressList.getMemoryRecordByDescription('28byteshex').Value=UDF1.CEEdit1.Text
timer.Enabled = true
end
return key
end |
To read/write array of bytes in Hex or Decimal, need to do right click on memory record of the array of byte type in Address List and choose Show as Decimal or Hexadecimal.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed May 01, 2019 9:16 pm Post subject: |
|
|
You can directly read the memory as well from Lua via:
| Code: |
readBytes(address,bytecount, ReturnAsTable ) : returns the bytes at the given address. If ReturnAsTable is true it will return a table instead of multiple bytes
Reads the bytes at the given address and returns a table containing the read out bytes
|
You can then convert the returned data to a string of hex bytes as needed. Use the ReturnAsTable (set it to true) param to make this easier.
_________________
- Retired. |
|
| Back to top |
|
 |
Razi Expert Cheater
Reputation: 1
Joined: 17 Jan 2018 Posts: 205
|
Posted: Fri May 03, 2019 4:56 am Post subject: |
|
|
| @atom0s: Thanks
|
|
| Back to top |
|
 |
|