Hi all,
I don't know if this is the correct list. If it's not I'm sorry.
I have kind of a weird question. I'm playing this game iRacing which exposed it's api via named memory map ( https://github.com/meltingice/node-iracing/blob/master/lib/irsdk_utils.cpp).
Is there a way I can access that named memory-mapped file via Linux? I did some Googling and I don't think it's possible but I thought I made sure to ask around here. If that isn't possible I think I'll write a simple program that would run under wine and expose that data in a Linux-friendly manner.
Leon
Just to clarify: the game runs under wine (crossover) on my Linux box.
On Saturday, March 21, 2015, Leon Bogaert leonbogaert@gmail.com wrote:
Hi all,
I don't know if this is the correct list. If it's not I'm sorry.
I have kind of a weird question. I'm playing this game iRacing which exposed it's api via named memory map ( https://github.com/meltingice/node-iracing/blob/master/lib/irsdk_utils.cpp ).
Is there a way I can access that named memory-mapped file via Linux? I did some Googling and I don't think it's possible but I thought I made sure to ask around here. If that isn't possible I think I'll write a simple program that would run under wine and expose that data in a Linux-friendly manner.
Leon
The syscalls I need translated to linux are: - OpenFileMappingW - MapViewOfFile
Today I found out about winelib. I guess I could give that a go.
On Sat, Mar 21, 2015 at 6:49 PM, Leon Bogaert leonbogaert@gmail.com wrote:
Just to clarify: the game runs under wine (crossover) on my Linux box.
On Saturday, March 21, 2015, Leon Bogaert leonbogaert@gmail.com wrote:
Hi all,
I don't know if this is the correct list. If it's not I'm sorry.
I have kind of a weird question. I'm playing this game iRacing which exposed it's api via named memory map ( https://github.com/meltingice/node-iracing/blob/master/lib/irsdk_utils.cpp ).
Is there a way I can access that named memory-mapped file via Linux? I did some Googling and I don't think it's possible but I thought I made sure to ask around here. If that isn't possible I think I'll write a simple program that would run under wine and expose that data in a Linux-friendly manner.
Leon
Hey Leon, sorry I missed your earlier emails.
I'm the primary developer of the official iRacing Linux port by CodeWeavers, and I actually play it myself. I don't have the time to dig into this right now, but I'm definitely interested in what you find out and could maybe help with some questions. Depending on what you end up with, we could maybe integrate your work back into the official port.
I think what you want to do, at a high level, is find out how Wine implements those methods on Linux. Then figure out how a Linux-native application could hook into that implementation. Wine is, after all, just a program running on Linux like any other.
Alternatively, you could write a win32 application and use those Wine APIs to access the memory and do what you want, like you said.
Andrew
On Wed, Mar 25, 2015 at 01:18:40PM +0100, Leon Bogaert wrote:
The syscalls I need translated to linux are:
- OpenFileMappingW
- MapViewOfFile
Today I found out about winelib. I guess I could give that a go.
On Sat, Mar 21, 2015 at 6:49 PM, Leon Bogaert leonbogaert@gmail.com wrote:
Just to clarify: the game runs under wine (crossover) on my Linux box.
On Saturday, March 21, 2015, Leon Bogaert leonbogaert@gmail.com wrote:
Hi all,
I don't know if this is the correct list. If it's not I'm sorry.
I have kind of a weird question. I'm playing this game iRacing which exposed it's api via named memory map ( https://github.com/meltingice/node-iracing/blob/master/lib/irsdk_utils.cpp ).
Is there a way I can access that named memory-mapped file via Linux? I did some Googling and I don't think it's possible but I thought I made sure to ask around here. If that isn't possible I think I'll write a simple program that would run under wine and expose that data in a Linux-friendly manner.
Leon
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2015-03-25 um 13:18 schrieb Leon Bogaert:
The syscalls I need translated to linux are:
- OpenFileMappingW
- MapViewOfFile
Today I found out about winelib. I guess I could give that a go.
Wine implements those two calls and maps them to the equivalent POSIX functions. Yes, building a Winelib program is the right way to go. It can use the Win32 functions and normal Linux functions at the same time. It does depend on the Wine runtime environment though. Note that your game and your winelib application have to run in the same wine prefix.
In theory you could probably use plain mmap in some way, but then you have to know how Wine maps the Windows object to it's POSIX equivalent.