Fantastic news!
I finally figured out how to read dynamic addresses from an art money table programatically.
Because artmoney isn't exactly clear about it I thought it would document it here.
On the user/searching side:
1. When searching in artmoney make sure you select the model 2 emulator from the emulator group so that it'll get you the relative addresses.
2. After you've found what you are looking for, copy one of the values and change the address to 50,000 which is the start of RAM in m2... this give us a reference point.
3. Subtract the 50,000 from all the addresses you found, this will give you a relative offset and THIS is the value that the troubleshooter needs.
On the programmer side:
1. Use a convoluted api like CreateToolhelp32Snapshot to help you find the base address of model 2, it's always 0x400000 - this step takes a bit of elfin magic, but I found some example code.
2. In a art money table, there's a section for all the relative spaces, the first one, which is the 50000 we added to our table looks like this:
"WorkRAM 1Mb","00500000","emulator_multicpu.exe+P0018F930,100h,
Ignore the workram bit, that's just a label. The 500000 will be our reference point as I said before, emulator_multcpu.exe means the base address of the exe (again 40000), the P00.... is a POINTER to an address that contains yet another pointer to our value. The 100h means once we find that address add 0x100 and that's the address to the final pointer.
3. Knowing all of that above we now use a get memory function to read 8 bytes (long) from the address 40000+0x18F930, that'll get us our first pointer
4. Now we read a long at the address we just found +0x100, this is the physical address to 50000, or the work ram for model 2.
5. Remember all of those offsets that you were supposed to determine on the user end? You can now get the actual value of any of those addresses by reading with teh address found in #4 + the offset.
Yeah that's about as simple as riding a unicycle.
Anyway, this means that we no longer have to rely on the lua scripting to print out relative values, I can do it internally. Unfortuantely that means I have to re-write a few sections of code, so the release might take a bit longer. At least now I can do things the right way, including inserting NOP's into the running exe.