openMSX remote commanding trough sockets

By NYYRIKKI

Enlighted (5441)

NYYRIKKI's picture

23-01-2020, 07:19

Hi,

I tried to compile openmsx-control-socket.cc from Contrib-folder for Windows, but after few hours of banging my head to the wall, I realized that my skills are not in a level to actually compile even a single file, single library program on this kind of complex, modern platform... Oh, well... If I could I probably would fail to modify it to my needs anyway.

Therefore I ask, if there could be any kind soul that could build a tool that would pass the arguments given to an active openMSX session? I don't mind even if it could not return anything back, but I would prefer it to use socket method so that I could start the session from Catapult and use the Debugger at a same time.

The idea is that I could use it ie. inside BAT-file like:
Command_openMSX "diska C:/MSX/project/testdisk/"

Personally I would also like to use it in Windows Explorer so that if I right click some folder or .DSK with mouse, I could ie. have "mount as openMSX diska" in the context menu... I guess you get the point... The idea is that I could send a command to existing openMSX session without each time starting a new one.

Login or register to post comments

By Manuel

Ascended (16021)

Manuel's picture

23-01-2020, 07:37

What's going wrong with compilation?

By NYYRIKKI

Enlighted (5441)

NYYRIKKI's picture

23-01-2020, 07:48

Mostly I think the problem is that I have no idea what I'm actually doing, what I should have installed to my machine to what directories and so on... Practically I've just been clicking randomly around Cygwin setup program... To be honest I don't read the source even well enough to know what it is supposed to be doing, but I just wanted to try...

During my tests I've had tons of different errors, but latest was:

$ i686-w64-mingw32-g++ `xml2-config --cflags` `xml2-config --libs` openmsx-control-socket.cc -lwsock32
openmsx-control-socket.cc:16:10: fatal error: sys/select.h: No such file or directory
 #include 
          ^~~~~~~~~~~~~~
compilation terminated.

By Manuel

Ascended (16021)

Manuel's picture

23-01-2020, 21:34

Well, look what I got:

$ x86_64-w64-mingw32-g++ `xml2-config --cflags` `xml2-config --libs` openmsx-control-socket.cc -lwsock32
openmsx-control-socket.cc:16:10: fatal error: sys/select.h: No such file or directory
 #include 
          ^~~~~~~~~~~~~~

It almost looks like you were running this on Linux. But you said you were using Cygwin. I think you need MinGW instead... But I'm just guessing a bit here. In any case, i think this example isn't working on Windows anyway, I see this TODO item:
- Update Contrib/openmsx-control-socket.cc for SSPI (TODO by mfeingol)

So, unfortunately, the SSPI thing makes things a bit more complex on Windows and I have no experience with it. I hope some Windows developer steps up and implements it. There is already example code in the Debugger, of course.