Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do cw cheats work? Can't figure it out
03-19-2019, 06:06 PM (This post was last modified: 03-19-2019 06:37 PM by deama.)
Post: #5
RE: how do cw cheats work? Can't figure it out
(03-19-2019 04:31 PM)LunaMoo Wrote:  It's hard to believe you made an assembly cheat which requires self learning of mips language and software debugging, yet totally failed at searching for syntax of the most popular cheat format of the PSP especially that different lines are broken in different way like mixing two different cheat formats which as I said looks like failed auto conversion between action replay and cwcheat formats.

But ok, in that case instead of trying to fix the cheat I will explain the syntax. Pretty much for injection of your own scripts all you need is simple 32 bit write code:
Code:
_L 0x2aaaaaaa 0xbbbbbbbb
where aaaaaaa is an address reduced by 0x8800000 and bbbbbbbb is 32 bit value you want to write

Personally I also use an extra check code to avoid re-writing cheat to memory and at the same time to check if it's being used in the right game/version since otherwise it would not work while still writing to memory leading to corruption and nasty issues over time.
Code:
_L 0xEaaabbbb 0xcddddddd
where aaa is number of lines to skip, bbbb is value to check, c is an argument for the check, in this case only 0 is really useful and means "if equal run aaa of following cheat lines" and ddddddd is the address of the 16bit value to check.

Example of patching the 0x08901250 address that originally had 0x240619E8 with setting a2 to 0 instead of the original code including a safety check:
Code:
_L 0xE00119E8 0x00101250
_L 0x20101250 0x00003021
The safety check is additionally helpful with longer scripts since re-writing game code on each tick can and in extreme cases will cause some hickups due to JIT usage in emulator.

That's really everything a person needs to know about cwcheat format for code injection.
Hmm, I can't get it to work.
So I'm trying to change an addu instruction into a jump instruction.
The address in the memory viewer said it starts at 08863D94, changing it to jump instruction to jump to 0010000 gave me "00 40 00 08" (I tested by manually changing it), so the idea is for it to go to "08863D94" and change the 4 bytes into "00 40 00 08", do you have to write this as "00400008" in the cw cheats or "08004000"?

Anyway, I removed the other lines for simplicity; so according to the guide you gave me, converting the above should be:
_L 0x263D94 0x08004000
because 08863D94 - 8800000 gives me 63D94?
It still doesn't work though, it doesn't change the addu instruction into a jump one at the specified address when I view it via the disassembler in ppsspp.

Also, how would I 00010000 - 8800000? Does it have to be above 8800000?

EDIT: Ah, I think it does work, but it seems to override the memory at address 08A63D94 not 08863D94?
EDIT2: Oh, the zeroes are important? .... so _L 0x20063D94 0x08004000
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: how do cw cheats work? Can't figure it out - deama - 03-19-2019 06:06 PM

Forum Jump: