ICR2 FFB - Force Feedback App!
#71
Does the FFB app have the orientation of the car in world space? I might need that for Rendition widescreen. That might be the simplest fix for the problems I'm having.
Reply
#72
Starting at E0E74 (this is not the offset in the exe but it's the offset when viewed in Ghidra - sorry I don't know what it's called). there is a struct with 12 x 4-byte values per car. The player's car is the second car. The value index 7 is the car's yaw from the centerline. Indices 4 and 5 are DLAT and DLONG (i.e. lateral position from centerline and position along the centerline in distance from start of the lap).

Then there is another one at E1DC4, which is a struct of 133 x 4-byte values per car. Index 117, 118 and 119 are the car's x, y, z position in world space. Indices 11 and 31 are also DLAT and DLONG.

The tricky thing with the yaw is that it doesn't give you the direct compass heading in the world. You would first have to calculate what compass heading the track centerline is going at every DLONG. The other problem is that it depends on whether you can find the TRK file in the memory unless you want to load it from the file, which might be clunky.

Between my timing/track overlay tool and the SG viewer tool repo, I think some of the needed calculations are there - https://github.com/skchow03/icr2tools - let me know how exactly you are approaching this.
Reply
#73
(12-16-2025, 02:54 AM)checkpoint10 Wrote: Starting at E0E74 (this is not the offset in the exe but it's the offset when viewed in Ghidra - sorry I don't know what it's called). there is a struct with 12 x 4-byte values per car. The player's car is the second car. The value index 7 is the car's yaw from the centerline. Indices 4 and 5 are DLAT and DLONG (i.e. lateral position from centerline and position along the centerline in distance from start of the lap).

Then there is another one at E1DC4, which is a struct of 133 x 4-byte values per car. Index 117, 118 and 119 are the car's x, y, z position in world space. Indices 11 and 31 are also DLAT and DLONG.

The tricky thing with the yaw is that it doesn't give you the direct compass heading in the world. You would first have to calculate what compass heading the track centerline is going at every DLONG. The other problem is that it depends on whether you can find the TRK file in the memory unless you want to load it from the file, which might be clunky.

Between my timing/track overlay tool and the SG viewer tool repo, I think some of the needed calculations are there - https://github.com/skchow03/icr2tools - let me know how exactly you are approaching this.

Thanks @checkpoint10! This is proving a bit problematic. I also tried increase the viewport size to accommodate a larger field of view from the sides (higher in game-resolution) but that has a whole new set of issues. The orientation also looks a bit problematic. I'll have to mess around a lot more! Increasing the viewport size is the surest bet, but the game isn't stable with those settings, as soon as a menu comes up the game goes nuts.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)