PCSX2 Script speed up game, Arc the lad

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
kidalot
Novice Cheater
Novice Cheater
Posts: 17
Joined: Tue Oct 10, 2017 8:32 pm
Reputation: 1

PCSX2 Script speed up game, Arc the lad

Post by kidalot »

Hi



I'm trying to use a XP multiplier script but the game speeds up every time I get XP. Where would look to find the issue?



[CODE][ENABLE]



alloc(newmem,2048)

label(returnhere)

label(originalcode)

label(exit)



newmem:

Pushf

//push flags

Mov eax, [ecx]

// mov old xp to eax

Sub edx, eax

// Get difference in xp ->edx

imul edx, #2

// Difference *= 2

Add edx, eax

// Add original xp to new difference



originalcode:

mov [ecx],edx

mov eax,00000001



exit:

jmp returnhere



30332200:

jmp newmem

nop 2

returnhere:



[DISABLE][/CODE]

[automerge]1591291753[/automerge]

For my own reference, changed the following and worked



[CODE][ENABLE]

//code from here to '[DISABLE]' will be used to enable the cheat

alloc(newmem,2048)

label(returnhere)

label(originalcode)

label(exit)



newmem:

Pushf

//push flags

Mov eax, [ecx]

// mov old xp to eax

Sub edx, eax

// Get difference in xp ->edx

IMul edx, #5

// Difference *= 5

Add edx, eax

// Add original xp to new difference



originalcode:

Mov [ecx], edx //original

Popf



exit:

jmp returnhere



3040A160:

jmp newmem

nop 2

returnhere:



[DISABLE]

//code from here till the end of the code will be used to disable the cheat

dealloc(newmem)

3040A160:

mov [ecx],edx

mov eax,00000001

//Alt: db 89 11 B8 01 00 00 00[/CODE]
Last edited by kidalot on Thu Jun 04, 2020 5:29 pm, edited 1 time in total.

User avatar
WhiteSnoop
Table Makers
Table Makers
Posts: 55
Joined: Wed May 31, 2017 11:18 pm
Reputation: 33

PCSX2 Script speed up game, Arc the lad

Post by WhiteSnoop »

Cheat engine on PCSX2 or emulation in General is not a good idea. Code is jitted (pre-compiled). Lots of functions you are breakpointing on accesses way more things than just what you're trying to find. My say would either to do extensive Lua scripting on it or try to learn a bit of MIPS assembly and the builtin debugger of PCSX2. It's not an easy road I must add!

kidalot
Novice Cheater
Novice Cheater
Posts: 17
Joined: Tue Oct 10, 2017 8:32 pm
Reputation: 1

PCSX2 Script speed up game, Arc the lad

Post by kidalot »

[QUOTE="WhiteSnoop, post: 138240, member: 6265"]

Cheat engine on PCSX2 or emulation in General is not a good idea. Code is jitted (pre-compiled). Lots of functions you are breakpointing on accesses way more things than just what you're trying to find. My say would either to do extensive Lua scripting on it or try to learn a bit of MIPS assembly and the builtin debugger of PCSX2. It's not an easy road I must add!

[/QUOTE]





Yea no idea why this solves the issue though



originalcode:

Mov [ecx], edx //original

Popf

User avatar
happyTugs
Table Makers
Table Makers
Posts: 64
Joined: Mon Apr 20, 2020 1:01 am
Reputation: 14

PCSX2 Script speed up game, Arc the lad

Post by happyTugs »

In your first iteration, you pushf (push your flags onto the stack) but forget to popf (reinstate the preserved flags); hence it now works.

Post Reply

Who is online

Users browsing this forum: No registered users