Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mamehooker win10 compatibility  (Read 1003 times)

0 Members and 1 Guest are viewing this topic.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:40:48 pm
Mamehooker win10 compatibility
« 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?
« Last Edit: October 10, 2022, 02:46:02 pm by baritonomarchetto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker win10 compatibility
« Reply #1 on: October 10, 2022, 07:28:28 pm »
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.)

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:40:48 pm
Re: Mamehooker win10 compatibility
« Reply #2 on: October 11, 2022, 12:32:37 am »
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
« Last Edit: October 11, 2022, 01:35:44 am by baritonomarchetto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker win10 compatibility
« Reply #3 on: October 12, 2022, 05:28:04 pm »
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.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:40:48 pm
Re: Mamehooker win10 compatibility
« Reply #4 on: October 13, 2022, 12:42:50 am »
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:
« Last Edit: October 13, 2022, 06:03:12 am by baritonomarchetto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker win10 compatibility
« Reply #5 on: October 14, 2022, 11:32:21 pm »
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.