Question regarding replacing assembler instructions

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
nakte
What is cheating?
What is cheating?
Posts: 4
Joined: Sun Feb 17, 2019 11:22 am
Reputation: 0

Question regarding replacing assembler instructions

Post by nakte » Sun Feb 17, 2019 4:53 pm

Hello, I haven't used CE before so I don't know if this is the right place to ask and or if what im trying to achieve is possible:
Image
I want to prevent the game from updating the Target Z float, which controls the Z-coordinate that the camera is looking at. So It turns out that the movaps instruction on the left is writing to it so I tried setting it to NOP. But it also seems to write to Target X, Y and some other address since movaps apparently writes to 128 bits(or 4 floats i assume). Is there any way to only prevent the game from writing to Target Z by somehow splitting up the movaps instruction to 3 or 4 other instructions that only write to 1 float each, and then setting ONLY the instruction writing to Target Z to NOP?

Any help is appreciated, thanks.

Eric
Hall of Famer
Hall of Famer
Posts: 98
Joined: Thu Mar 02, 2017 11:01 pm
Reputation: 35

Re: Question regarding replacing assembler instructions

Post by Eric » Sun Feb 24, 2019 8:14 am

Do a code injection:
Before executing that code store the old Z, then execute, and then restore Target Z with the old value

nakte
What is cheating?
What is cheating?
Posts: 4
Joined: Sun Feb 17, 2019 11:22 am
Reputation: 0

Re: Question regarding replacing assembler instructions

Post by nakte » Sun Mar 10, 2019 10:32 pm

thanks, sorry for late response, I tried this but it caused the game to crash. The value might be used in some other computation that resulted in this but ye I gave up. thanks though : )

User avatar
GreenHouse
Table Makers
Table Makers
Posts: 239
Joined: Fri Oct 12, 2018 10:25 pm
Reputation: 192

Re: Question regarding replacing assembler instructions

Post by GreenHouse » Mon Mar 11, 2019 9:06 am

Can't you make a cmp? I mean, the Z offset will always be the same, so you have already a difference there to begin with. Make a cmp, and do nop If it's the Z axis.

Post Reply

Who is online

Users browsing this forum: No registered users