Announcement

Collapse
No announcement yet.

[Help] How to make an ASM code to multiply floats by command?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Help] How to make an ASM code to multiply floats by command?

    Hi,
    I have found a speed code for some Need for Speed games. But the speed is defined by 2 addresses. One for the X- and one for the Z axis. So I can't simply take one and increase the value to go faster..
    If I take the one for the X-axis and use a positive value the vehicle will go westbound. steering won't change anything.
    If I take the address for the Z-Speed the car will go northbound.
    In NFS games for the Wii I have found a nice solution:

    286328F2 00000100 // if 2 is pressed, then
    82200009 8061A1D0 // load float value from 8061A1D0
    86A00009 3F840000 // multiply it with 1.03125
    84200009 8061A1D0 //store the value at 8061A1D0
    82200009 8061A1C8 // load float value from 8061A1D8
    86A00009 3F840000 // multiply it with 1.03125
    84200009 8061A1C8 // store the value at 8061A1D8
    E0000000 80008000 // end of code

    the values of 8061A1D0 and 8061A1D8 are also influented by the value of the vehicle's rotation concerning the Y-axis.
    However, this speed code works very well.

    But the bad thing is that the Action Replay code type is too limited to make such a code... Except we use ASM.
    Unfortunately I don't know how to tell the game what value to load, how to write a multiply-float instruction and how to store it...

    I assume I have to breakpoint (write) the speed's addresses and should get an address that contains an stfs-instruction. But what then?
    Last edited by CosmoCortney; 12-06-2014, 07:29:33 AM.
    My Website
    Hacking YouTube Channel


    No requests, please
Working...
X