Page 1 of 1

Question regarding replacing assembler instructions

Posted: Sun Feb 17, 2019 4:53 pm
by nakte
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.

Re: Question regarding replacing assembler instructions

Posted: Sun Feb 24, 2019 8:14 am
by Eric
Do a code injection:
Before executing that code store the old Z, then execute, and then restore Target Z with the old value

Re: Question regarding replacing assembler instructions

Posted: Sun Mar 10, 2019 10:32 pm
by nakte
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 : )

Re: Question regarding replacing assembler instructions

Posted: Mon Mar 11, 2019 9:06 am
by GreenHouse
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.