ConsoleWorld Forum
HOME
FORUM
CWCHEAT
LIST
DOWNLOAD
GALLERY

Torna indietro   ConsoleWorld Forum > CWCheat Official Support Forum > English Support Board

English Support Board English & Foreign Languages support

Rispondi
 
LinkBack Strumenti discussione
  #1 (permalink)  
Vecchio 10th July 2009, 22:21
Junior Member
 
Data registrazione: Jul 2009
Messaggi: 2
Potenza rep: 0
BlueWanderer è su una strada distinta
[Feature] New Code Format

I used cwcheat a little today, and it helped a lot. But I found the code it uses is horrible. Hard to remember, hard to write, and what's the most horrible, functions are missing (my god, I can not loop...). So I arrange a set of codes as a suggestion, just to show the idea. There might be mistakes.

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.
Rispondi citando
  #2 (permalink)  
Vecchio 11th July 2009, 03:39
L'avatar di jungletek
CWcheat DB Maintainer
 
Data registrazione: Aug 2006
Messaggi: 342
Potenza rep: 4
jungletek è su una strada distinta
I wouldn't hold your breath for Weltall to reply, let alone implement your ideas.

I think he's abandoned the project, or at least has more important things to worry about. He's not posted here in over a year, AFAIK.
Rispondi citando
  #3 (permalink)  
Vecchio 11th July 2009, 06:54
L'avatar di 4m8IoN
Member
 
Data registrazione: Dec 2008
Residenza: Earth
Messaggi: 339
Potenza rep: 1
4m8IoN è su una strada distinta
I think it would be best to keep changes of cwcheat at a minimum ^^
especially since the developer seems to be occupied with other stuff atm.

I agree that the code types are hard to remember.
But the Code Types page is only one click away.

Sure, most of the stuff would be usefull and much appriciated, but i think
that could be optained much easier.

One new code type would be enough:
Execute ASM Instructions @ specified adress.

With the help of existing Code Types it should be possible to limit the execution to specific situations.
Rispondi citando
  #4 (permalink)  
Vecchio 12th July 2009, 00:40
L'avatar di gangstamalu
CWCheat English Section Moderator
 
Data registrazione: Aug 2006
Messaggi: 725
Potenza rep: 5
gangstamalu è su una strada distinta
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!
Rispondi citando
  #5 (permalink)  
Vecchio 12th July 2009, 16:21
Junior Member
 
Data registrazione: Jul 2009
Messaggi: 2
Potenza rep: 0
BlueWanderer è su una strada distinta
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
Rispondi citando
  #6 (permalink)  
Vecchio 12th July 2009, 20:31
L'avatar di gangstamalu
CWCheat English Section Moderator
 
Data registrazione: Aug 2006
Messaggi: 725
Potenza rep: 5
gangstamalu è su una strada distinta
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!
Rispondi citando
Rispondi

Bookmarks

Tags
develop


Strumenti discussione

Regole di scrittura
Non puoi postare nuovi argomenti
Non puoi postare repliche
Non puoi postare allegati
Non puoi editare i tuoi post

BB code è Attivato
Le faccine sono Attivato
Il codice [IMG] è Attivato
Il codice HTML è Disattivato
Trackbacks are Attivato
Pingbacks are Attivato
Refbacks are Attivato



Tutti gli orari sono GMT +2. Adesso sono le 22:06.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105