Freeze at actuall amount code?

Started by OnkelLes, October 13, 2008, 03:41:53 PM

Previous topic - Next topic

OnkelLes

Hy Guys!

Another question...

I want the values:

8047F060 XXXXXXXX
8047F064 XXXXXXXX

to be frozen at their actuall value. Its the daytime. And when i freeze it at a value that i enter the time changes also. That shouldn't happen. It should just freeze without changing. Is there a way to do this?

Greetings

Igglyboo

I take it that when you poke the value, it does not change?
If so, you have to find whats writing to it and change that value.

Set a Write breakpoint on the value and get it to break.
Then find the value thats writing to it and poke it at value 60000000.
This will set that value to nop(no operation) and cause that value not to write anymore.

For example,

Value 8000000F is my HP, It's at 100.
I set it to FFFFFFFF.
But when i get hit it goes to 99.

So i would set a write breakpoint on the address 8000000F.
Turns out that the address 800000FE is writing to 8000000F.
I would then poke 800000FE at 60000000(nop) and it would cause it to stop writing.
My code would be this,
(assuming 32bit values)
040000FE 60000000 (i want to nop it before i write to it)
0400000F FFFFFFFF

This may or may not work, in most cases it should. But some adresses have multiple adresses writing to them and sometimes nop'ing an adress can cause the game to crash.






OnkelLes

No... When i poke it it changes. The problem is. Its a code for actuall daytime and it changes every second. It goes up to FFFFFFFF and starts again at 00000000. And it raises for the value of 258 (HEX) every second. I think. So on the first day, for example, 6:00AM is 0001FC58 and on the second day 6:00AM is 0003A54C. This is just an example.

So whats the problem:

Lets say. 6:00AM is 0001FC58 and 12:00AM is 0002BE34. Now in the game its 6:00AM and i want to freeze the game. So the code is: 8047F060 0001FC58. I make this code button activated. Now i stop freezing and turn the code off. Its 12:00 now. So when i activate the code now. Its again 6:00AM. Because code is still 8047F060 XXXXXXXX. But this shouldn't be. It should freeze the time at actuall value. In this case 0002BE34 because its 12:00AM.

I hope u now know what i mean.

Greetings

Igglyboo

Then do excactly as I just said,
Find the value that is writing to it(via a breakpoint) nop it(poke it at 60000000) and it will stop writing, then you poke the time value to whatever you want.

lindtec

I think, he wants to freeze a "dynamic" value.

If he switches of this code, the time would run normaly again (lets say, it was frozen at 6.00 AM and now changes to 6.01 AM).
When he switches it on again later (lets say, at 12.00 AM), the new time-value would be read and frozen.

OnkelLes, correct me, if I'm wrong.

Maybe something like this:
Load value of an address into a register.
Check, if the value of this address and the content of the register is different.
Everytime the check returns "yes", write the content of the register to the address.

Unfortunatly, I have no idea, how to compare registers with values of actual addresses.

OnkelLes

Yes. Its exactly what i mean but if u have no idea how i should have some? :)

Maybe someone else...

Greetings

Dr.Pepper

You could have a look into my Red Steel asm injection code, as that compares registers and memory locations together (has the asm code explained). Maybe combining that to some button activator + cc-code you could do what you are looking for.


OnkelLes

Wow. Sounds like its really difficult. Maybe i'll try to figure out.

Greetings

Dr.Pepper

another approach would be to have button activator to NOP (60000000) the code that writes to the value, and second button activator which would apply the original ASM back over the NOPed code.