Demo #15
Fixes a bug that prevented the loading of valid save files where the script size or description size was 0 (you can load your files now).
Coming up is a new feature that overpowers the calculator in TSearch by miles: the Real-Time Expression Evaluator.
This will allow you to enter any expressions you want and it will evaluate them in real-time.
For example, “complex addresses”, as used by other programs, will evaluate something like this: “
[winmine.exe+0x33C4]”. This would go to the module address, add 0x33C4 to it, and the brackets would indicate that the value at that address is to be returned. So, it means, “Get the value at that address.”
They can also be more complex: “
[[[[[[[0x0A71F10]+6Ch]+80h]+4]+184h+64h]+114h+4]+4]”.
This would follow a series of pointers until it gets to the final address.
But the Real-Time Expression Evaluator takes it all to a whole new level.
It can evaluate both of the above examples, and more.
Examples:
1+1
(1+1h) % 32
[0x0A71F10+(1+1h) % 32]
[0x0A71F10]>>1
([0x0A71F10]>>1)
([0x0A71F10]>>1) & 0xFF
([0x0A71F10]&0x00FFFFFF)+[0x0A71F1C]*4
[([[[[[[[0x0A71F10]+6Ch]+80h]+4]+[0x0A71F1C]*4+64h]+114h+4]+4])]&(0xFF00FF00+1)-([[0x0A71F10]>>2])
The actual parser is already done.
It can currently parse all of the above expressions.
All that is needed is to add the interface to allow you to add lists of expressions.
You can add as many as you like. All expressions are saved between sessions and will reload when you restart MHS.exe.
All expressions are evaluated in real-time so the values are updated as the game RAM changes.
The parser will be accessible via scripts, so you can evaluate these expressions as desired from within your own scripts.
It works as a simple calculator as well; you can enter pure numeric expressions such as
1 + 1,
(1 << 3),
(0xFFFF0000 & (34 | 1)) ^ 0xFFFFFFFF, etc.
It will also be used to evaluate expressions in the Disassembler, so I can begin adding more functionality there.
It will not just be used as a real-time advanced calculator. It will be used for my complex-address system, allowing these expressions to be used to derive addresses of values you wish to keep.
This means you will have all functionality from existing complex-address-type software plus tons more, allowing you to actually put decryption routines into the address calculation as well.
For example, in Nintendo® 64 games, the upper byte of pointer addresses needs to be masked out, then the remaining value should be added to the RAM pointer inside Project64.
Current complex addresses can not handle such operations, but this new system handles it with ease, opening new doors for those hacking emulators and other games that use encrypted or otherwise overly complicated addresses.
L. Spiro