Jump to content
  • 0

change opcode error


kpba

Question

There is a class "BattleUnitAttribute", which has two attack-related methods below it

public float get_BaseAttack() { }

public float get_Attack() { }

When I change the corresponding opcode to
'A8 FMOV S0, #0xBF980000'
and
'A8 FMOV D0, #0xBF980000'
and
'A8 MOV W0,#0xF000000'

Its damage becomes 1, even if I change the value after "#" it doesn't help.

Can anyone help me, I will be very grateful!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hi @kpba the function you're using is float which is 32-bit, thus not involving 64-bit register D0, W0. 64-bit float called double, so use this converter: baseconvert.  Also you're trying to push it as Hex, try to move it into general register first:

mov r0, #0x42C80000  // Float 100 in Hex Form
fmov s0, r0 // Push Float in r0 to s0

It is recommended to read: ARM Patching or similar use cases here: Runtime Offset

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.