|
|||||||
| English Support Board English & Foreign Languages support |
![]() |
|
|
LinkBack | Strumenti discussione |
|
|||
|
[Feature] New Code Format
This set of codes tends to be compatible with the original one. Each line begins with _E (or maybe something else). After _E, there are 3 numbers instead of 2. The first one identifies the function of the line, and the meaning of the following two depends on the first one. The first number is 16-bit. We say the highest bit is b15 and the lowest is b0. b15 is 0 -> the 3rd number is an immediate value b15 is 1 -> the 3rd number is a register id b14 is 0 -> the 2nd number is an address b14 is 1 -> the 2nd number is a register id b13b12 is 0 -> the opertion is 8-bit b13b12 is 1 -> the opertion is 16-bit b13b12 is 2 -> the opertion is 32-bit b13b12 is 3 -> the opertion is 64-bit Register 8 is used as a internal offset. Memory addresses are added with its value before used. I. Basic operations 1. Write 0x?000 (2nd <- 3rd) 2. Read 0x?001 (2nd -> 3rd) II. Additive and Bitwise operations 1. Add 0x?002 (2nd = 2nd + 3rd) 2. Sub 0x?003 (2nd = 2nd - 3rd) 3. Neg 0x?004 (2nd = -2nd + 3rd) 5. And 0x?005 (2nd = 2nd & 3rd) 6. Or 0x?006 (2nd = 2nd | 3rd) 7. Xor 0x?007 (2nd = 2nd ^ 3rd) 8. signed-extend 0x?008 (2nd <- 3rd signed-extended) 9. shift left 0x?009 (2nd = 2nd << 3rd) 10. shift right 0x?00A (2nd = 2nd >> 3rd) 11. shift right (signed)0x?00B (2nd = (singed)2nd >> 3rd) III. Jump Jump address is not affected by register 8. And when 2nd is a register the jump destination is the value in the register. 1. 0x?010 (jump relatively according to 2nd, where 2nd is used as a signed-integer) 2. 0x?011 (jump to line 2nd + 3rd) 3. Counted Jump 0x?012 (load 3rd into a internal counter first time excuted. Decrease the counter by one each time jumps. Stop jumping when the counter reaches 0, and reset to unexcuted state.) 4. Loop 0x?013 (repeat following 2nd lines 3rd times) IV. Compare & Test (Test or compare 2nd and 3rd to determine if the following line is to be excuted) b9 is always 1. b8 is 0 -> compare b8 is 1 -> test 2. If equal 0x??00 2. If not equal 0x??01 3. If less than 0x??02 4. If not less than 0x??03 5. If greater than 0x??04 6. If not greater than 0x??05 7. If less than (signed) 0x??12 8. If not less than (signed) 0x??13 9. If greater than (signed) 0x??14 10. If not greater than (signed) 0x??15 11. If carried 0x??06 12. If not carried 0x??07 13. If overflowed 0x??08 14. If not overflowed 0x??09 15. Compare 0x?00C (compare and store result in register 0) 16. Test 0x?00D (test and store result in register 0) V. Multiplication 1. Multiply 0x?020 (r3:r2 = 2nd * 3rd) 2. Multiply (signed) 0x?021 3. Divide 0x?022 (r3:r2 / 3rd -> r3 : r2, remainder -> 2nd) 4. Divide (signed) 0x?023 VI. Float point 1. Add 0x?402 (2nd = 2nd + 3rd) 2. Sub 0x?403 (2nd = 2nd - 3rd) 3. Neg 0x?404 (2nd = -2nd + 3rd) 4. Multiply 0x?405 (2nd = 2nd * 3rd) 5. Divide 0x?406 (2nd = 2nd / 3rd) 6. Inverse 0x?407 (2nd = 1 / 2nd * 3rd) 7. Compare 0x?400 (compare result is stored in register 0) VII. Stack & Sub-routine We use register 1 as stack pointer here. 1. Call 0x?502 (Push the next line number to stack, and jump to 2nd) 2. Return 0x?503 (Jump to the return line number stored in the stack) 3. Push 0x?504 (Push 2nd + 3rd to stack) 4. Pop 0x?505 (Pop stack, and store popped value + 3rd to 2nd) 5. Write Stack 0x?500 (Write 3rd to r1 - 2nd in stack) 6. Read Stack 0x?501 (Read r1 - 2nd in stack to 3rd) VIII. Misc 1. Nop 0xFFFF IX. internal registers 0. used by Compare and Test to store result. 1. stack pointer 2, 3. used by Multipy and Divide 4. Keydown 5. Keypresse 6. Keyrelease 7. Keyrepeat 8. offest 9~15. reserved Examples: Write 1 byte immediate to memory: _E 0x0000 0x00010000 0x000000FF Read 2 bytes from memory to register: _E 0x9001 0x00010000 0x00000010 Add register to memory 32-bit: _E 0xA002 0x00010000 0x00000010 Sub register from register 16-bit: _E 0xD003 0x00000010 0x00000011 Copy 100 bytes from 0x10000 to 0x20000 _E 0x6000 0x00000008 0x00000000 _E 0x8001 0x00010000 0x00000010 _E 0x8000 0x00020000 0x00000010 _E 0x6002 0x00000008 0x00000001 _E 0x0012 0x000000FD 0x00000064 Another way: _E 0x6000 0x00000008 0x00000064 _E 0x8001 0x00010000 0x00000010 _E 0x8000 0x00020000 0x00000010 _E 0x6003 0x00000008 0x00000001 _E 0x6200 0x00000008 0x00000000 _E 0x0010 0x000000FC 0x00000000 Set 0 to 99 _E 0x6000 0x00000008 0x00000000 _E 0xC000 0x00010000 0x00000008 _E 0x6002 0x00000008 0x00000001 _E 0x0012 0x000000FE 0x00000064 ---- Maybe this one looks complex, but it should be easier to implement than the original one, and easier to use, too. Yes, needs more code to achieve some purpose, this is the very reason I make it compatible with old code. But at least this can do almost everything. |
|
||||
|
Changing code format that much would be pointless b.c. many people already are used to the code format. If weltal came back he would prob say something like it would cause the prx to be larger and less efficient. I suggest learning the make your own prx were ur in your comfort zone. Other people have done it.(cheatfree,nitepr,cheatmaster) I for one being a cwcheat user for many years (weeks after public release me=supernub) has the code format as second nature. I bet 4m8IoN has pointer codes locked in his head waiting to attack a possible next release of a pointer code type. I'm not gonna lie that format does seem to cover more ground but really PSP games aren't needed to be hacked to that percent plus half the fun is trying to get a hack to work through what you have.
Thanks for the suggestion.
__________________
http://www.consoleworld.org/forum/cu...pic12401_1.gif PSP 5.00 M33-3 CWCheat Version:0.2.2 Rev. D If I helped you Up the Rep . THANKS AND PEACE! |
|
|||
|
I'd make it myself, but I don't think I had the time to get me used to the psp homebrew
![]() But think about it I can simply put a C implement public. I just wanted to make all items I already have 99, and I found I had got no way to do it
|
|
||||
|
Easy man just find the second item slot code. Subtract the differences btw the addresses and use the muti-increase code format
Found here: english:code:psp_types [CWCHEAT documentation] Looks like: 0x8aaaaaaa 0xxxxxyyyy 0x000000dd 0xIIIIIIII
__________________
http://www.consoleworld.org/forum/cu...pic12401_1.gif PSP 5.00 M33-3 CWCheat Version:0.2.2 Rev. D If I helped you Up the Rep . THANKS AND PEACE! |