- Added new special function code, called "Condition Code".
The condition code checks the value and "IF" matched, "DO" the cheat operaion.
The main difference between the condition code and default conditions (wait for modification, write if match etc) is that you can check "OTHER" addresses.
----------- FORMAT ----------
Code: Select all
Type Field:
MSB LSB
33222222 22221111 11111100 00000000
10987654 32109876 54321098 76543210
xxx----- -------- -------- -------- type
000 = standard memory write
001 = memory region
010 = write handler mapped memory
011 = custom
100 = relative address (CPU)
101 = condition
110 = unused
111 = unused
Set "Location Type" parameter as "Condition" so that basic format is "C0000000".
And this code needs special options separated from standard ones.
Code: Select all
MSB LSB
33222222 22221111 11111100 00000000
10987654 32109876 54321098 76543210
[ condition ]
-------- -------- -------- -------x one-shot (reserved by standard one-shot cheat)
-------- -------- -------- ----xxx- comparison
000 = equal
001 = not equal
010 = less
011 = greater
100 = less or equal
101 = greater or equal
110 = bit on
111 = bit off
-------- -------- -------- ---x---- linked condition
00 = and
01 = or
NOTE : the options for CPU, Address, Bytes and Data are the same as standard memory write (RAM type code).
For example :
Code: Select all
:game:C0000000:1234:00000012:00000000:Infinite Items
:game:00010000:5678:00000099:FFFFFFFF:Infinite Items (2/2)
The cheat engine checks the value stored on $1234 and "IF" it matches 0x12, "DO" write the value on $5678 as 0x99.
"IF" 0x34, 2nd linked code doesn't work.
You can set the comparison option, Equal (=), Not Equal (!=), Less (<), Greater (>), Less or Equal (<=), Greater or Equal (>=).
Also the Bit itself, "If bit x is ON(OFF), Do linked codes".
Setting value in case of Bit is the same as standard type, for example if Bit 4, set 0x10.
And you can set "And" and "Or" (linked condition) to check multi addresses.
Code: Select all
:game:C0000010:1234:00000012:00000000:Infinite Items
:game:C001000C:789A:00000080:00000000:Infinite Items (2/4)
:game:00010000:5678:00000099:FFFFFFFF:Infintie Items (3/4)
:game:00010000:BCDE:000000FF:FFFFFFFF:Infintie Items (4/4)
The above means "If value is 0x12 in $1234
OR Bit 7 is ON in $789A, Do store 0x99 into $5678 and 0xFF into $BCDE".
You can set "simple" condition, "If((A != B) || (C >= D) || (E > F))", but can't set "complex" one, "If((A == B) || (C < D)) && (E > F)".
And the cheat engine checks this option on 1ST CONDITION CODE ONLY.
So if you set it on 2nd or later code, it is ignored.
Sample :
Code: Select all
:marineb:C000000E:802E:00000040:00000000:Infinite Oxygen
:marineb:00010000:803B:00000028:FFFFFFFF:Infinite Oxygen (2/2):If Round Finish flag (bit 6) on $802E is OFF, store 0x28 into $803B
Old "Infinite Oxygen" code prevents from going to the next round because Oxygen Bonus addition never completes.
But the above code only works when Round Finish flag (bit 6) is OFF and stops working when flag is ON at round finish.
It is the same as current ROM code in the database but the above is more simple.
Now you can check and edit it via the cheat edit menu.
http://www.42ch.net/UploaderSmall/source/1184434101.png