Skip to content

Add Custom Memory feature - #43

Open
Acrisio-Filho wants to merge 2 commits into
pangbox:masterfrom
Acrisio-Filho:master
Open

Add Custom Memory feature#43
Acrisio-Filho wants to merge 2 commits into
pangbox:masterfrom
Acrisio-Filho:master

Conversation

@Acrisio-Filho

@Acrisio-Filho Acrisio-Filho commented May 29, 2025

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant