Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do cw cheats work? Can't figure it out
03-18-2019, 11:10 PM (This post was last modified: 03-19-2019 12:46 AM by deama.)
Post: #1
how do cw cheats work? Can't figure it out
I don't get it, why won't this work?

_S ULUS10232 _G dnd tactics
_C0 divide exp
_L 0x2010000 0x3C020001
_L 0x2010004 0x8C420040
_L 0x2010008 0x00A2001A
_L 0x2010030 0x00002812
_L 0x2010034 0x00852021
_L 0x2010038 0x0A218F66
_L 0x2010040 0x00000002
_L 0x208863D94 0x08004000

It shows up on the cheats menu, but when I enable it, it doesn't do what it's supposed to; it doesn't do anything.
Find all posts by this user
Quote this message in a reply
03-19-2019, 03:15 AM
Post: #2
RE: how do cw cheats work? Can't figure it out
Because it's not a cwcheat, but poorly converted action replay cheat, likely from some auto converter as it seems broken in more than one way. Don't have time to look closer at it.

http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders!
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.
Find all posts by this user
Quote this message in a reply
03-19-2019, 03:36 PM
Post: #3
RE: how do cw cheats work? Can't figure it out
(03-19-2019 03:15 AM)LunaMoo Wrote:  Because it's not a cwcheat, but poorly converted action replay cheat, likely from some auto converter as it seems broken in more than one way. Don't have time to look closer at it.
Well actually, I made it myself. I followed the various guides over on the internet, so I donno what I did wrong.

All I want is to write bytes to a certain address, that's it.
Find all posts by this user
Quote this message in a reply
03-19-2019, 04:31 PM
Post: #4
RE: how do cw cheats work? Can't figure it out
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.

http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders!
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.
Find all posts by this user
Quote this message in a reply
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
03-19-2019, 06:59 PM
Post: #6
RE: how do cw cheats work? Can't figure it out
User memory starts at 0x08800000, you really shouldn't be using scratchpad(0x00010000) for cheats, if you need a code cave just use 0x08800000 to 0x08804000, that's common practice when making cheats, you can also find lots of empty ram in game, or even double the ram by MEMSIZE flag in game param.sfo, through none of that is really needed for cheats, even fan translation projects/mods rarely would have to use it.

Either way cwcheat can't patch anything outside of user memory and it's 0 starts from 0x08800000, so if you use 0x00010000 as an address in cwcheat as you did above and want to jump to it, it will actually be "j 0x08810000"(0x0A204000).

And yeah 0's are important where the 32 bit has to store more values, ie the number on the start 0x2 is indicating code type(32 bit write, where for example 0x1 would be 16 bit write etc.) and is not part of the address, through in case of simple write cheats you could ommit 0's for value field, it's still a good practice to keep them and looks cleaner as well.

http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders!
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.
Find all posts by this user
Quote this message in a reply
03-19-2019, 07:04 PM (This post was last modified: 03-19-2019 07:05 PM by deama.)
Post: #7
RE: how do cw cheats work? Can't figure it out
(03-19-2019 06:59 PM)LunaMoo Wrote:  User memory starts at 0x08800000, you really shouldn't be using scratchpad(0x00010000) for cheats, if you need a code cave just use 0x08800000 to 0x08804000, that's common practice when making cheats, you can also find lots of empty ram in game, or even double the ram by MEMSIZE flag in game param.sfo, through none of that is really needed for cheats, even fan translation projects/mods rarely would have to use it.

Either way cwcheat can't patch anything outside of user memory and it's 0 starts from 0x08800000, so if you use 0x00010000 as an address in cwcheat as you did above and want to jump to it, it will actually be "j 0x08810000"(0x0A204000).

And yeah 0's are important where the 32 bit has to store more values, ie the number on the start 0x2 is indicating code type(32 bit write, where for example 0x1 would be 16 bit write etc.) and is not part of the address, through in case of simple write cheats you could ommit 0's for value field, it's still a good practice to keep them and looks cleaner as well.
Ah, I see, well it works now, thanks. In the searching I did, none of the guides actually said to reduce it by 8800000... and the wiki was all in chinese or something.
Find all posts by this user
Quote this message in a reply
04-07-2019, 02:12 AM
Post: #8
RE: how do cw cheats work? Can't figure it out
@LunaMoo
incorrect
Code:
_L 0xEnaabbbb 0xcddddddd
aa is number of lines, which will work if value at address ddddddd is bbbb
Find all posts by this user
Quote this message in a reply
04-07-2019, 07:00 AM
Post: #9
RE: how do cw cheats work? Can't figure it out
Well yeah I forgot about one argument I never use, however when you're correcting someone, instead of copy pasting the explanation only of the arguments that were already explained you should concentrate on explaining the forgotten one which in this case:
Code:
_L 0xEnaabbbb 0xcddddddd
n - limits the bbbb to 8 bits when set to 1.
In the use case I explained above, this, code type is only used as a safety check so it wouldn't really matter, same as arguments for check which I listed only one since the rest are useless.

http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders!
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.
Find all posts by this user
Quote this message in a reply
04-09-2019, 08:37 PM
Post: #10
RE: how do cw cheats work? Can't figure it out
@LunaMoo
ok
Code:
_L 0xE0aabbbb 0xcddddddd
here, bbbb is value for checking
Code:
_L 0xE1aa00bb 0xcddddddd
here, bb is value for checking, because an 8bit value cannot be four digits.

and you forgot to mention one more important thing
32bit addresses end with 0, 4, 8 and C only
16bit addresses end with 0, 2, 4, 6, 8, A, C and E only
in the case of mistake it will crash
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: