CwCheat Support
|
12-26-2013, 03:35 PM
(This post was last modified: 12-26-2013 05:36 PM by dlanor.)
Post: #693
|
|||
|
|||
RE: CwCheat Support
(12-23-2013 12:17 PM)makotech222 Wrote:(12-23-2013 04:45 AM)Alicecbw Wrote: New to cwcheats. Still unsure about alot of things, and could use some help That max value is correct for an 8-bit == 1-byte variable address (not 8-byte), which is what the code prefix 0x0 stands for. Higher values require different code prefixes, and also require that the game really reserves more bytes for those variable addresses. Here are some useful descriptions of the basic codes used for simple patching of a constant into a variable address. In these examples I'll use the lowercase letters 'a' and 'v' to signify digits of the address and the constant value respectively. These should of course be replaced by hex digits in real usage. Patch for 1 byte == 8 bits: _L 0x0aaaaaaa 0x000000vv Patch for 2 bytes == 16 bits: _L 0x1aaaaaaa 0x0000vvvv Patch for 4 bytes == 32 bits: _L 0x2aaaaaaa 0xvvvvvvvv So if we apply this knowledge to the first patch line of the original codes: _L 0x003EA4E0 0x000000C8 This is clearly a 1-byte patch with the decimal value 200. And for a similar 2-byte patch with the decimal value 300 we then use: _L 0x103EA4E0 0x0000012C However, if the game program only has reserved a single byte for that variable, then the high byte of this patch value will not be used for it, and may instead affect another variable using the byte after the variable you intended to patch. So if you increase the affected size of patches this way, then you must be prepared to revert those changes if a test shows that they haven't had the intended effect. Otherwise you may get unexpected errors due to unrelated variables being affected by the high part of those patch values. Best regards: dlanor |
|||
« Next Oldest | Next Newest »
|