hrydgard / ppsspp-site

New PPSSPP website
57 stars 26 forks source link

Process hacking #13

Closed 0x526F62796E closed 1 year ago

0x526F62796E commented 1 year ago

The script in the process hacking section is unnecessary as you can implement the sendmessage call inside of cheat engine.

Script

function GetEmuBase()
local command = 0xB118
local emuHWND = findWindow("PPSSPPWnd")

local pointer = {}

local result = sendMessage(emuHWND, command, 0, 0)
pointer[1] = tonumber(result)

result = sendMessage(emuHWND, command, 0, 1)
pointer[2] = tonumber(result)

local lower = pointer[1]
local upper = pointer[2]
local combinedPointer = (upper * 0x100000000) + lower

return tonumber(combinedPointer)
end

You can add this inside of any auto assembler script at the start or inside the enable part and it should run fine if you remember to add {$lua} before adding the code.

hrydgard commented 1 year ago

please feel free to send a pull request instead with the changes so they get properly credited, or I can just manually add this for you - which do you prefer?

0x526F62796E commented 1 year ago

I'm new to github so could you please manually add it, I don't usually use github but I am modding in ppssspp at the moment. I used the process hacking section to implement the sendmessage inside of a c++ tool so it caught me off guard that it was updated with a script for autohotkey.

hrydgard commented 1 year ago

Alright, I'll add it. I'll keep the autohotkey script, too - why not, there might be some other use for it.

0x526F62796E commented 1 year ago

Thanks! and sure the autohotkey might be able to automate some stuff that normal lua scripts couldn't.

hrydgard commented 1 year ago

change is live.

Nokhwabuz commented 4 months ago

Thanks siyabonga