Add Custom Memory feature - #43
Open
Acrisio-Filho wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Custom Memory
When you want to replace a string or a value that does not have space in the executable's memory. For example, lobby_west.gbin or lobby_newyear.gbin do not fit in ProjectG's memory.
It is possible to put a function in x86 assembly, and use custom memories.
The PatchAddress has been changed to read custom memory references.
To use a custom memory you have to declare it before (above in the rugburn.json file) in the CustomMemory array, the PatchAddress has to be after the CustomMemory array.
CustomMemory {
Name: name of custom memory (reference to PatchAddress),
Value: value to initialize custom memory (if not defined you have define Length value),
Length: size of custom memory (default size of Value if not defined),
Execute: FALSE custom memory is readwrite, TRUE is executable (default FALSE)
}
Reference: \\rRefName\\r
Ex: (offset does not work just for demonstration)
"CustomMemory": [
{
"Name": "lobbygbin",
"Value": "lobby_newyear.gbin\\x00"
},
{
"Name": "data1",
"Value": "data.grf\\x00"
},
{
"Name": "data2",
"Value": "data2.grf\\x00"
},
{
"Name": "check",
"Length": 4
},
{
"Name": "func",
"Execute": "TRUE",
"Value": "\\x83\\x3d\\rcheck\\r\\x00\\x75\\x1f\\xb8\\x00\\x06\\x89\\xfc\\x68\\rdata1\\r\\xff\\xd0\\xb8\\x00\\x06\\x89\\xfc\\x68\\rdata2\\r\\xff\\xd0\\xc6\\x05\\rcheck\\r\\x01\\xc3"
}
],
"PatchAddress": {
"0x0041ddd9": "\\xB8\\rfunc\\r\\xFF\\xD0\\x90\\x90",
"0x00789000": "\\x68\\rlobbygbin\\r"
}
Add fix msvcr71 from Issues #44