Read/write masks


You can set read/write masks for each address in your table. A mask is a formula, it uses to calculate a encoded value from this address. The formula can contain operators, constants, parentheses, square brackets, variable names and directives.

A value typecast is done, by prepending a data type identifier and surrounding the expression to typecast with parentheses. Mask type is data type by default if you don't use mask type then the program uses primary type for the address.

A value in square brackets is address. Square brackets mean read the value from this address. Program uses primary type to read memory by default. You can set your read type before square brackets.

Variable names in quotes return an address of the variable. Variable in square brackets reads value of the variable. For example, ['EEmem'] reads value of 'EEmem' variable.

Directive $value - replace $value with current value (reading value for read mask or inputting value for write mask). You can skip $value if it located in first position of mask!
Directive $address - replace $address with current address.

TypeFormula type name
Integer 1 byteint1 or byte
Integer 2 bytesint2 or word
Integer 3 bytesint3
Integer 4 bytesint4 or dword
Integer 8 bytesint8 or qword
Float 4 bytesreal4 or float
Float 6 bytesreal6
Float 8 bytesreal8 or double
Float 10 bytesreal10 or tbyte


For example, Might and Magic Heroes 6 read/write mask for all resources $value xor dword[$address+4]. Or without $value mask is xor [$address+4].

For example, Civilization 5 read mask for gold is $value/100, write mask is $value*100. Or without $value read mask is /100, write mask is *100

For example, Civilization 6 read mask for gold is dword($value shr 8), write mask is dword($value shl 8). You need dword typecast cause mask type is "Float 4 bytes".

Back Contents Forward

Copyright (C) 1996-2022, System SoftLab
Last update of this page: June 14, 2022.