PCSX2 1.7+ Cheat Engine Script Compatibility
#11
This is what I use
An Autohotkey script to convert my old pcsx2 codes in CE to use pointers
Copy all from CE and run this script,it will convert all and then you just need to remove all in CE and paste the converted codes
As for searching,I place the lua script in the autoruns folder of CE and this automatically sets the base address when I select pcsx2,rpcs3 and cemu with CE

The last 8 digits in the address is what pcsx2 uses when you want to put the codes in Pnach


Attached Files
.zip   Files.zip (Size: 799 bytes / Downloads: 646)
Reply

Sponsored links

#12
That is very useful. Thank you for that vsub. Will using your method retain any hotkeys that were assigned to the old address, or will we have to reassign all the hotkeys?
Reply
#13
(04-27-2022, 04:43 PM)planetps2 Wrote: That is very useful. Thank you for that vsub. Will using your method retain any hotkeys that were assigned to the old address, or will we have to reassign all the hotkeys?

I don't think there will be any change to that
The autohotkey script copies all and just replaces few lines,everything else is the same

You can paste the original codes from CE and the converted ones in notepad to see the differences
Reply
#14
(04-27-2022, 04:23 PM)vsub Wrote: This is what I use
An Autohotkey script to convert my old pcsx2 codes in CE to use pointers
Copy all from CE and run this script,it will convert all and then you just need to remove all in CE and paste the converted codes
As for searching,I place the lua script in the autoruns folder of CE and this automatically sets the base address when I select pcsx2,rpcs3 and cemu with CE

The last 8 digits in the address is what pcsx2 uses when you want to put the codes in Pnach

Thanks for making this, any chance you could run me through step by step on how to set this up? I've never messed with CE addons before, but I want to update my entire CE table for a certain game so that it works smoothly on 1.7. I'm not quite sure how this works yet, but I tried to find a way to add the same pointer option to all my codes at once to no avail.
Reply
#15
(05-23-2022, 01:34 AM)Passion Wagon Wrote: Thanks for making this, any chance you could run me through step by step on how to set this up? I've never messed with CE addons before, but I want to update my entire CE table for a certain game so that it works smoothly on 1.7. I'm not quite sure how this works yet, but I tried to find a way to add the same pointer option to all my codes at once to no avail.

Autohotkey is a separate program that can be used to do automated tasks. I haven't tried his autohotkey script yet but I plan to once I upgrade to the newer windows versions of PCSX2.

It sounds like what his autohotkey script does is that it edits the clipboard to convert your old cheat engine codes to pointers. So basically from what it sounds like, you open cheat engine, load your code list from your older version of PCSX2. Select all your codes in the list, "copy" them, then run the autohotkey script, then delete your old codes in the cheat engine list, then "paste" all the codes, and according to him, they will all be pointers now which will work on the newer versions PCSX2. (then Save As your new .CT list of pointers) Try it and let me know if it works.
Reply
#16
(04-27-2022, 02:51 PM)planetps2 Wrote: Got it, so there's no longer static addresses anymore, even of new addresses that you find from searching in PCSX2 using 1.7+. Any code that you find now must be converted to a pointer with EEMem+ instead of 2.

In earlier versions, there was a specific range to search in cheat engine find codes in PS2 games. It was 20000000-22000000 and most of the useful codes in games with PCSX2 running were found between 20000000-21000000. Now I'm wondering what I should put as the range to my searches on 1.7+. It has to be all numbers right?

Would it be something like 7FF000000000-800000000000 instead of the usual 20000000-22000000? That's a much wider range than before if the XXs in 7FFXX0000000 changing every time so that's why I'm asking. What should my range be for searching codes in PCSX2 in 1.7?

As far as the codes themself, is it possible to list the new codes as "PCSX2+" or something instead of "7FFXX"? I just want to know if there's a better way to list the new codes for 1.7+ rather than turning every code into a pointer.


Range Scanning:

When range scanning with PCSX2 v1.7 you will want to first get the BASE address for PS2 memory, which EEmem Points to.  As discussed , printing "PCSX2x64.eemem" will give you an address with an 8byte value which points to the base address for PS2 Memory.
Currently my address has a value of (7FF80000000). In this scenario I would set my scanning range within 7FF80000000-7FF90000000.

" I just want to know if there's a better way to list the new codes for 1.7+ rather than turning every code into a pointer."

So recently I have come up with a solution to this and have updated my thread to represent my findings. 
We can generate a symbol for the PS2BaseMemory address (as i like to call it now) quite simple with cheat engine , although the documentation and hoops i jumped through to learn it was pretty rough.

Essentially we just want to get the proc address for EEmem, read the Qword value and assign it as a referenceable symbol. Below is some pasta to show how exactly this is done with LUA scripting. Upon saving this to your table you can add new Addresses for ps2 memory without the need for offsets.
Just do "PS2mem+address" for example. I will include a script which switches a boolean value below at a PS2 address of "203DE210"

Code:
{$lua}
[ENABLE]
-- Register PS2mem Symbol --
local PS2mem = getAddress("PCSX2x64.eemem")
PS2mem = readPointer(PS2mem)
registerSymbol("PS2mem", PS2mem, true)

--NOT USED
[DISABLE]

PCSX2 1.7 Lua Script Example
Code:
// NO FOG [SOCOM 2 patch r0001]
[ENABLE]
PS2mem+3DE210:
db 01

[DISABLE]
PS2mem+3DE210:
db 00
Reply
#17
Here's a question - Cheat Engine supports plugins in the form of DLL files. What's stopping someone from making a plugin that adds a "PCSX2 Support" checkbox directly into the GUI that automatically does all this for you when finding and adding addresses to the address list? There's probably a very good reason this isn't possible, otherwise someone would've done it by now considering how important it is, but I thought I might as well ask.
Reply
#18
(06-30-2022, 10:33 AM)[C]ENT Wrote: Range Scanning:

When range scanning with PCSX2 v1.7 you will want to first get the BASE address for PS2 memory, which EEmem Points to.  As discussed , printing "PCSX2x64.eemem" will give you an address with an 8byte value which points to the base address for PS2 Memory.
Currently my address has a value of (7FF80000000). In this scenario I would set my scanning range within 7FF80000000-7FF90000000.

" I just want to know if there's a better way to list the new codes for 1.7+ rather than turning every code into a pointer."

So recently I have come up with a solution to this and have updated my thread to represent my findings. 
We can generate a symbol for the PS2BaseMemory address (as i like to call it now) quite simple with cheat engine , although the documentation and hoops i jumped through to learn it was pretty rough.

Essentially we just want to get the proc address for EEmem, read the Qword value and assign it as a referenceable symbol. Below is some pasta to show how exactly this is done with LUA scripting. Upon saving this to your table you can add new Addresses for ps2 memory without the need for offsets.
Just do "PS2mem+address" for example. I will include a script which switches a boolean value below at a PS2 address of "203DE210"

I get what you did here and I can certainly follow your instructions here and in the first post and see if I can get this working. However, how would you suggest converting my PCSX2 1.6 .CT tables to PCSX2 1.7+ .CT tables to be compatible with your solution? I import a .CT table that was made on PCSX2 1.6, but now I have PCSX2 1.7+ running. What's the best way to convert my countless lists of 20xxxxxx - 22xxxxxx codes to your solution's syntax for PCSX2 1.7? If I use the autohotkey script method, then I end up with pointers. Even if I get your lua script working, I would still need to convert the list of 1.6 codes that were autohotkeyed to pointers to your symbols. Perhaps I can modify the autohotkey script to your syntax. Is that how you'd suggest I update my .CT tables for use with your solution?
Reply
#19
Is there anyone here who would be willing to convert a script to 1.7? It was made for version 1.6.
Reply
#20
How to enable CE (Cheat Engine) to handle 32-bit pointers in your virtual EE memory:
  1. Download latest emurpm.lua and emurpm.frm from CE's GitHub repository.
  2. Put them into your CE's autorun folder.
  3. Boot CE and open PCSX2's process from process list.
  4. Open "Emulator Memory" > "Set Base Address" from CE's toolbar.
  5. Enter [eemem] into the top left text box.
  6. Enter 0x02000000 into "Size of Memory".
  7. Click "(Re)Set address" (or press Enter key).
  8. Open your "Cheat Table Lua Script". (shortcut: Ctrl + Alt + L)
  9. Enter following lua script and execute it.
    Code:
    setPointerSize(4)
    setAssemblerMode(0)

Trouble shootings:
  • If (7.) returns an error, you may be using a 32-bit version of CE. Try to use the 64-bit version of CE.
  • For PCSX2 1.6.0, the text to be entered in (5.) must be 20000000.
  • Absolute addresses for older PCSX2 (greater than 20000000) must be converted. See below guide.
    1. Press "Ctrl + A"
    2. Press "Ctrl + X"
    3. Press "Ctrl + V"
    4. Enter "-20000000" into the "Adjust address by:"
    5. Press Enter key
  • Be careful not to confuse the two hexadecimal; In my explanation, the 2 is in the 7th digit (02000000) and the 8th digit (20000000).

Let me know if you have any other issues.
Have a good day.
Reply




Users browsing this thread: 1 Guest(s)