Build Your Own Arcade Controls Forum
Main => Driving & Racing Cabinets => Topic started by: baritonomarchetto on October 10, 2022, 02:36:11 pm
-
I am planning to replace the old win7 PC in my racing cabinet with a new one running on win10. Unfortunately my first attempts at having mamehooker send serial messages to arduinos under win10 have failed. I had no issues under win7 some year ago though!
I can see mamehooker recognizing MAME's outputs and their logic states, but no matter what I do there's no serial comunication with arduino (same code I am used to, correct baud rate, correct com port... nothing new).
Could someone please confirm that mamehooker is compatible with win10?
-
It works fine in win10. The issue you are having is related to windows. I'm pretty sure you have to manually install a serial driver in win10. (I run win10 btw so I can confirm serial communication works.)
-
Ok, good to know. I will try and see if manually installing arduino drivers solves (even if I would not bet a beer on this honestly)
Out of curiosity Howard: in test mode, serial commands (cmw) are sent with 9600 baud or are those options gathered from the default ini file? I foumd test mode useful for debugging instead of launching the game any time
-
Honestly it's been so long I'm not even sure. I was thinking the command to set up the connection (which includes baud rate) has to be sent first and then you can use the other commands.
-
Thanks Howard, I suspected that: the command to open the port is on the scroll down list.
Yesterday I made some tests on another win10 PC: no problems there. Why it was not working on the other is still mistery.
Another thing while we are here: to change COM Port in any .ini one has to change the number in any line. In example:
[General]
MameStart=cmo 4 baud=9600_parity=N_data=8_stop=1
MameStop=cmc 4
StateChange=
OnRotate=
OnPause=
[KeyStates]
RefreshTime=
[Output]
lamp0=
lamp1=cmw 4 3., cmw 4 %s%, cmw 4 x
lamp2=cmw 4 4., cmw 4 %s%, cmw 4 x
Is there a way to define the port as a variable so changing COM would be a matter of redefine the variable? Something like:
[General]
vCOM=4
MameStart=cmo vCOM baud=9600_parity=N_data=8_stop=1
MameStop=cmc vCOM
StateChange=
OnRotate=
OnPause=
[KeyStates]
RefreshTime=
[Output]
lamp0=
lamp1=cmw vCOM 3., cmw vCOM %s%, cmw vCOM x
lamp2=cmw vCOM 4., cmw vCOM %s%, cmw vCOM x
Something like this would make the testing phase more practical :cheers:
-
It's probably possible but the reason I didn't do it is it could get real messy. If you accidentally leave a com port open it can potentially error out the serial dll if you try to open it a second time. Also windows tends to start moving the port around if it is a usb serial port and the dll re-initializes. So I kind of intentionally made it a very manual process so script writers could manage all of that nonsense. In theory I should be able to detect the port state and handle all of this automatically but it practice I ran into the two issues mentioned above.
I would like to make serial and HID interfaces more robust in the future but it's going to take some serious thought and perhaps help from someone with more knowledge on the subject than me.