retrieving floating point values from open process

Soldato
Joined
23 May 2005
Posts
2,964
Location
Auckland, New Zealand
Waht I want to do is write a program that graphs things like speed, revs, gear changes etc. over time by retrieving data from a game such as need for speed.

My question is, how would I go about doing this? in paticular, finding the memory locations where the floating point values for speed etc are kept. One way i thought of was to read the process's memory in 16 bit (4 byte: float) chunks, grabbing each value that is 0.0 when the car is on the starting line, with no user input, saving their current value and address etc. and then watching each one for an increase when you put your foot down. then I'd eliminate any that didnt increase and make reasonable guesses as to which was speed, which was revs, time, gear etc..

has anyone done anything like this? is this a reasonable way of going about doing this?

cheers. Joe
 
yeah although i think trainers already know memory locations and types. I'm just assuming the values I'm interested in will be floats.. it seems like a good bet. yeah I'd start at '0' (where-ever that may be) and read the next 16 bits, store that as a float with its value and go to the next bit, and read the 16 bits after that, store it as a float etc.

that would give me a heck of a lot of values, mostly rubbish. I'd keep all that read 0.0 as floats and get rid of the rest
then I'd monitor these when the car accelerates and only keep the ones that increase and are above 0 and in some reasonable range. that'd hopefully whittle what i have left down to a reasonable amount.. then I'd have to sift through those to determine the values I want, based on reasonable assumptions. It might require a bit of playing around with the car to start off with... Theoretically its possible but its quite a task! Thats the brute force way. Don't programs create a memory map when they're run? can these be accessed?
 
Back
Top Bottom