GP4 rpm lights/strips LCD display ?

Posted by ricomaster 
GP4 rpm lights/strips LCD display ?
Date: November 03, 2025 06:33PM
Posted by: ricomaster
Hello,
I was wondering... in the file new_steering_wheel_displays.tex we can have either 5 lights or 5 "rpm strips" to be used in the LCD display (can we have more?)
I would like to find out what is the rationale/ratio/rpm for them to be shown. I thought it could be those uknown rpms from PRBlanco's offsets but no sucess so far.
The problematic is: say a display with rpm scale ( 4.5.6.7....8....9....10....11....12....13..); setting the engine max rpm accordingly; the rpm strip/light do not match the rpm/gear/speed
It would be nice to have a matching rpm meter
example 9800rpm with:
4.5.6.7....8....9....10....11....12....13..
============
Does anyone know how GP4 decides when to show each rpm light/strip, or where is the information store, and if it can be edited, or if it is some ratio or function derived from max rpm, up/downshift etc?
Any help would be much appreciated
Best regards,
Ric-o
Re: GP4 rpm lights/strips LCD display ?
Date: November 04, 2025 04:04AM
Posted by: lorak
No idea. GP4-Memory-Access from Carlgpgames could be useful to try to figure out how it works.



Edited 1 time(s). Last edit at 11/04/2025 04:05AM by lorak.
Re: GP4 rpm lights/strips LCD display ?
Date: November 05, 2025 05:30AM
Posted by: ricomaster
I tried it (MemAcc)- those 12000 and 16000 rpm unknown values did nothing about it.
I scaled the 3200 5500 (brake?) 10000 (race start? To see if they were part of that, nothing until now.
Re: GP4 rpm lights/strips LCD display ?
Date: November 07, 2025 04:30AM
Posted by: Öggo
The only way I know would be to dig into the exe and try to track the behaviour down. It's not an easy task, as the data structures containing the meshes and, therefore, the rpm lights, are quite complex. Tracking down the function that refreshes per-frame the cockpit dash and wheel might be a starting point. In the meanwhile, here is some info that I have found during my explorations:

- At 0x002428d8 there is a list of of all cockpit object names (294 in total)
- At 0x002412f8 there is an array of pointers to the strings above. This array is used to search for each object in cockpit_dash.gp4 and cockpit_wheel.gp4.
- At 0x0064fcc8 there is a pointer to the data structure (class) that contains all the cockpit information. The data structure is 0xd90 (3472) bytes long. Within this data structure:
- At 0x98 there is an array of object indices, corresponding to the object names in the array described above
- At 0x530 there is an array of "mesh indices", indicating whether the object is in cockpit_dash.gp4 or cockpit_wheel.gp4
- At 0xd88 there is a pointer to a CGP4Mesh class instance for cockpit_dash.gp4
- At 0xd8c there is a pointer to a CGP4Mesh class instance for cockpit_wheel.gp4

The CGP4Mesh class contains tons of data, often divided into a lot of different other classes. It is unclear to me, at this time, where, within the data hierarchy that starts with CGP4Mesh, whether there is or where there would be some sort of object visibility flag, that would control whether an object is rendered or not.

So, arm yourself with a good debugger, a disassembler like Ida Pro or Ghidra and lots and lots of patience...

Re: GP4 rpm lights/strips LCD display ?
Date: November 07, 2025 04:32AM
Posted by: Öggo
The only way I know would be to dig into the exe and try to track the behaviour down. It's not an easy task, as the data structures containing the meshes and, therefore, the rpm lights, are quite complex. Tracking down the function that refreshes per-frame the cockpit dash and wheel might be a starting point. In the meanwhile, here is some info that I have found during my explorations:

- At 0x002428d8 there is a list of of all cockpit object names (294 in total)
- At 0x002412f8 there is an array of pointers to the strings above. This array is used to search for each object in cockpit_dash.gp4 and cockpit_wheel.gp4.
- At 0x0064fcc8 there is a pointer to the data structure (class) that contains all the cockpit information. The data structure is 0xd90 (3472) bytes long. Within this data structure:
- At 0x98 there is an array of object indices, corresponding to the object names in the array described above
- At 0x530 there is an array of "mesh indices", indicating whether the object is in cockpit_dash.gp4 or cockpit_wheel.gp4
- At 0xd88 there is a pointer to a CGP4Mesh class instance for cockpit_dash.gp4
- At 0xd8c there is a pointer to a CGP4Mesh class instance for cockpit_wheel.gp4

The CGP4Mesh class contains tons of data, often divided into a lot of different other classes. It is unclear to me, at this time, where, within the data hierarchy that starts with CGP4Mesh, whether there is or where there would be some sort of object visibility flag, that would control whether an object is rendered or not.

So, arm yourself with a good debugger, a disassembler like Ida Pro or Ghidra and lots and lots of patience ...

Re: GP4 rpm lights/strips LCD display ?
Date: November 07, 2025 03:49PM
Posted by: ricomaster
That surely looks like the way to do it!
Congratulations on your deep knowledge, it is remarkable!


Good suggestion for .ini to MemAccess:
>_ controlling rpm lights

Thank you for taking your time for such comprehensive and thoughtful reply!



Edited 2 time(s). Last edit at 11/15/2025 04:53PM by ricomaster.
Sorry, only registered users may post in this forum.

Click here to login

Maintainer: mortal, stephan | Design: stephan, Lo2k | Moderatoren: mortal, TomMK, Noog, stephan | Downloads: Lo2k | Forum Rules | Policy