Thanks for the help, Tryphon.
I downloaded Gens_r57shell_mod_r665 and have been playing around with the interface. Everything is "working" for me, but I'm still running into the same problem. I thought it was the debugger, but maybe it's a bad offset? More below...
Which ROM of ShadowRun do you use ?
Size: 2 MB (2,097,152 bytes)
CRC-16 CCITT: D611
Custom CRC (32-bit): 00000000
Could you provide a Gens savestate just before the shoot on the ennemy ?Hopefully this upload works
The health (possibly the health graphic, although I doubt it) for all active enemies on the map are stored at FF28C4, FF29C4, FF2AC4, etc. The hex values correspond with a percentage out of 100% (00-0A). This has been confirmed with some simple save state hacking.
In the save state comparison below, I've shot a "pedestrian" and reduced his health from 100% (0A) to 10% (01):
If I alter the value in a hex editor, it does in fact alter the NPC's health. It affects both the amount of health and the corresponding sprites (although I expect the sprites are controlled at a different offset by at least one longword).
However, if I set a breakpoint to write at FF29C4 (as in the "pedestrian" example above), the debugger never breaks! It will break when I load a new map (presumably because the game writes the enemy data as it loads a new map).
One new thing I did notice: ONE enemy's health is set to address register A1 (FF28C4). Maybe it's not breaking because all of the enemy data is being manipulated via registers? I'll trouble shoot this last bit a little more...
July 13, 2016, 03:15:36 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I'll trouble shoot this last bit a little more...
Enemy data offsets do get written into at least one Address Register when a map loads. I didn't poke around to see why, but I think it's just a red herring. I'm interested in damage calculations right now, not enemy stats.