CwCheat

From Data Crystal
Revision as of 03:27, 25 February 2020 by Raijinili (talk | contribs) (→‎Conditionals (0xD, 0xE): Fix typo according to !Mr.JellyBean#0298 in Discord.)
Jump to navigation Jump to search

cwCheat is a homebrew for PSP.

Like all cheating programs that work locally, it works by modifying memory during run-time, producing in-game effects.

Every few milliseconds, it will "run cheats," modifying system memory according to micro-programs called "cheats."

This program has become more popular since support for this type of cheat in PPSSPP was added.

General

_S ULUS-10551 #Specify the serial number of a game. cwCheat on PSP uses this to know which cheats you have installed apply to the game you're running.

_G YS Seven US #Specify the name of the game. This is for us humans, cwCheat doesn't use it.

_C0 / _C1 #Specify the start of a cheat micro-program. C0 is disable on game load, C1 is enabled on game load.

_L 0xXXXXXXXX 0xXXXXXXXX #This is how you write a line of cheats. If you leave off the _L at the beginning, the line will become a comment, ignored by cwCheat.

Constant Write Codes (0x0, 0x1, 0x2)

The basic code type is constant write. I'm not the author of cwCheat, but I am 100% sure that is where the "cw" in the program's name comes from. The "constant write" cheats are easy to find and it's easy to write the micro-programs for them. 0x0, 0x1 and 0x2 are the constant write code types.

Constant Write Codes
_L 0x0AAAAAAA 0x000000VV Constant write byte VV at address AAAAAAA. For addresses, the value you specify is added to a base of 0x88000000 to form the PSP virtual address.
_L 0x1AAAAAAA 0x0000VVVV Constant write halfword VVVV
_L 0x2AAAAAAA 0xVVVVVVVV Constant write word VVVVVVVV

Increment / Decrement codes (0x3)

I'm not sure how they could be useful.

Increment Codes
_L 0x301000VV 0x0AAAAAAA Continuously add VV to the byte at address AAAAAAA
_L 0x302000VV 0x0AAAAAAA Continuously subtract VV from the byte at address AAAAAAA
_L 0x3030VVVV 0x0AAAAAAA Continuously add VVVV to the halfword at address AAAAAAA
_L 0x304000VV 0x0AAAAAAA Continuously subtract VVVV from the halfword at address AAAAAAA
_L 0x30500000 0x0AAAAAAA

_L 0xVVVVVVVV 0x00000000

Continuously add VVVVVVVV to the word at address AAAAAAA
_L 0x306000VV 0x0AAAAAAA

_L 0xVVVVVVVV 0x00000000

Continuously subtract VVVVVVVV from the word at address AAAAAAA

Multi-Write (0x4, 0x8)

_L 0x4AAAAAAA 0xNNNNSSSS

_L 0xVVVVVVVV 0xXXXXXXXX

Multi-write word

AAAAAAA = where to start writing

VVVVVVVV = first value to write

NNNN = number of values to write

SSSS * 4 = offset to add to the address after writing each value

XXXXXXXX = value to add to the value after writing each value

_L 0x8AAAAAAA 0xNNNNSSSS

_L 0x000000VV 0x000000XX

Multi-write byte

AAAAAAA = where to start writing

VV = first value to write

NNNN = number of values to write

SSSS = offset to add to the address after writing each value

XX = value to add to the value after writing each value

_L 0x8AAAAAAA 0xNNNNSSSS

_L 0x1000VVVV 0x0000XXXX

Multi-write halfword

AAAAAAA = where to start writing

VVVV = first value to write

NNNN = number of values to write

SSSS * 2 = offset to add to the address after writing each value

XXXX = value to add to the value after writing each value

Pointer Commands (0x6)

You can write a value to an address specified by a pointer.

Pointers
_L 0x6AAAAAAA 0xVVVVVVVV

_L 0x000Y0001 0xIIIIIIII

IIIIIIII = pointer offset (add this value to the address to get effective address)

VVVVVVVV = value to write

Y = 0 for byte write, 1 for halfword and 2 for word)

_L 0x6AAAAAAA 0xVVVVVVVV

_L 0x000Y0001 0xIIIIIIII

AAAAAAA = pointer location

IIIIIIII = pointer offset (subtract this value to the address to get effective address)

VVVVVVVV = value to write

Y = 3 for byte write, 4 for halfword and 5 for word)

Boolean Commands (0x7)

Boolean Commands
_L 0x7AAAAAAA 0x000Y00VV With the byte at AAAAAAA, do the boolean operation with VV and store the result

Y = 0 for OR, 2 for AND, 4 for XOR

_L 0x7AAAAAAA 0x000YVVVV With the halfword at AAAAAAA, do the boolean operation with VVVV and store the result

Y = 1 for OR, 3 for AND, 5 for XOR

Conditionals (0xD, 0xE)

These will execute the code if some condition is true (otherwise it will not be executed). For example, if a flag is set to 1 in battle scenes and 0 otherwise, you can make a code that will affect battle scenes without interfering with other scenes.

Conditionals
_L 0xDAAAAAAA 0x200000VV EQUAL: Execute the next code if the byte at address AAAAAAA equals VV (otherwise, it is skipped)
_L 0xDAAAAAAA 0x201000VV NOT EQUAL: Execute the next code if the byte at address AAAAAAA does not equal VV (otherwise, it is skipped)
_L 0xDAAAAAAA 0x202000VV LESS THAN: Execute the next code if the byte at address AAAAAAA is less than VV (otherwise, it is skipped)
_L 0xDAAAAAAA 0x203000VV GREATER THAN: Execute the next code if the byte at address AAAAAAA is greater than VV (otherwise, it is skipped)
_L 0xDAAAAAAA 0x0000VVVV EQUAL: Execute the next code if the halfword at address AAAAAAA equals VVVV (otherwise, it is skipped)
_L 0xDAAAAAAA 0x0010VVVV NOT EQUAL: Execute the next code if the halfword at address AAAAAAA does not equal VVVV (otherwise, it is skipped)
_L 0xDAAAAAAA 0x0020VVVV LESS THAN: Execute the next code if the halfword at address AAAAAAA is less than VVVV (otherwise, it is skipped)
_L 0xDAAAAAAA 0x0030VVVV GREATER THAN: Execute the next code if the halfword at address AAAAAAA is greater than VVVV (otherwise, it is skipped)
Conditionals (Multiple Skip)
_L 0xE1NN00VV 0x0AAAAAAA EQUAL: Execute the next NN lines if the byte at address AAAAAAA equals VV (otherwise, it is skipped)
_L 0xE1NN00VV 0x1AAAAAAA NOT EQUAL: Execute the next NN lines if the byte at address AAAAAAA does not equal VV (otherwise, they are skipped)
_L 0xE1NN00VV 0x2AAAAAAA LESS THAN: Execute the next NN lines if the byte at address AAAAAAA is less than VV (otherwise, they are skipped)
_L 0xE1NN00VV 0x3AAAAAAA GREATER THAN: Execute the next NN lines if the byte at address AAAAAAA is greater than VV (otherwise, they are skipped)
_L 0xE0NNVVVV 0x0AAAAAAA EQUAL: Execute the next NN lines if the halfword at address AAAAAAA equals VVVV (otherwise, they are skipped)
_L 0xE0NNVVVV 0x1AAAAAAA NOT EQUAL: Execute the next NN lines if the halfword at address AAAAAAA does not equal VVVV (otherwise, they are skipped)
_L 0xE0NNVVVV 0x2AAAAAAA LESS THAN: Execute the next NN lines if the halfword at address AAAAAAA is less than VVVV (otherwise, they are skipped)
_L 0xE0NNVVVV 0x3AAAAAAA GREATER THAN: Execute the next code if the halfword at address AAAAAAA is greater than VVVV (otherwise, they are skipped)
Conditionals (Comparison)
_L 0xDAAAAAAA 0x0x4BBBBBBB

_L 0x000000NN 0x0000000Y

EQUAL: If the values at addresses AAAAAAA and BBBBBBB are equal, execute the next NN lines (otherwise, they are skipped)

Y = 0 for byte comparison, 1 for halfword and 2 for word

_L 0xDAAAAAAA 0x0x5BBBBBBB

_L 0x000000NN 0x0000000Y

NOT EQUAL: If the values at addresses AAAAAAA and BBBBBBB are not equal, execute the next NN lines (otherwise, they are skipped)
_L 0xDAAAAAAA 0x0x6BBBBBBB

_L 0x000000NN 0x0000000Y

LESS THAN: If the value at address AAAAAAA is less than the value at address BBBBBBB, execute the next NN lines (otherwise, they are skipped)
_L 0xDAAAAAAA 0x0x7BBBBBBB

_L 0x000000NN 0x0000000Y

GREATER THAN: If the value at address AAAAAAA is greater than the value at address BBBBBBB, execute the next NN lines (otherwise, they are skipped)