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: Sega Monaco GP 1979/1980 - My Remake  (Read 298206 times)

0 Members and 10 Guests are viewing this topic.

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #440 on: September 06, 2024, 03:18:21 am »
Hi GPForverer2024!

>>I have the impression that script 2 can't open the com port

The startup sequence for scoreboard_to_relays is slightly different to scoreboard_to_serial. scoreboard_to_relays actually opens the com ports *after* connecting to the MGPr export instance. From what you say is displayed in the command prompt window, it looks like you just need to run the MGPr export instance and it should spring into life.


>>then in device manager it detects nothing it displays nothing and I don't even have a beep sound from windows that tells me hardware connect

Oh dear... The 4xRelay device sounds pretty dead/faulty to me... Hopefully the supplier will be able to shed some light on this, send you a replacement perhaps...

Hope this helps!

:)

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #441 on: September 06, 2024, 06:16:06 pm »
Hi GEECAB!


 Yes!! you are right the 4xrelay is defective...

I have anticipated with another card that I receive tomorrow, the advantage of this one is much more stable and to use (seen on youtube)

 and the advantage is that it does not use the CH340 driver so no worries about hardware conflict!

 Here is the link to the model of the map:

https://www.amazon.fr/Relais-Enfichables-Contr%C3%B4leur-Robotique-Dautomatisation/dp/B0B7294RK7/ref=sr_1_2_sspa?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=28C8OVICE988U&dib=eyJ2IjoiMSJ9.B9r8SdP7VYCbNfENaOhPH6AWEc-0yLJ-qu3-tI55VY34J_mj9I6v5k42HGMCbOniLt--iMy9TWxmZrMOqP9z2WANX1LYzLRYLJy1kJx1j9jhaFfz54JNZCEq9gmRhJVrYwzOQUhin7snJvAPZRF6CQuZgtDAT9RwUw9V52tlI544T13ckhUGCM8i9UNNijY0rYttlq8HP-Lfxdm6AcqC21mf-yl2bJ7OPNiT_wSGOAQ8Vm_peaKEL7Lcjmi-gGN-oa4qK5vTqmodVgKyeAIOQJYEuxYPUFaRCZ8YzVC32r8.yq0bTz6gNmvaucyz6SXszmtVYDeo7IqAlTARO-CVFLE&dib_tag=se&keywords=sainsmart+8+relais&qid=1725659063&sprefix=saintsmart+8+relais%2Caps%2C145&sr=8-2-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1

and below a link of the package with the drivers, a documentation for the script

 I hope this helps you to be able to make a script :

https://s3-ap-northeast-1.amazonaws.com/sain-amzn/20/20-018-910/20-018-910.rar

I really can't wait to test all this and I hope everything will work

thank you GEECAB! :)

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #442 on: September 07, 2024, 11:23:45 am »
Hi GEECAB!

! good news I received the new card

 On the other hand,
here is the right link for the package for version 101-70-116

8-channel 12V USB Relay Module

https://docs.sainsmart.com/article/790hrr4nux-sain-smart-relay-module-sensors

I have really looking forward to reading you

Thank you GEECAB!!   ;)


geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #443 on: September 07, 2024, 04:42:12 pm »
Good stuff GPForverer2024!

I've had a quick look at the documentation, but I must admit, its hard to follow :/

I'll google it some more when I have a bit more time.

Just wondering, have you tested it yourself using powershell? I'm interested to know what serial data you send it to make it work.

:)
« Last Edit: September 07, 2024, 04:44:12 pm by geecab »

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #444 on: September 08, 2024, 04:54:11 am »
Hi GEECAB!

I agree it doesn't look that simple, I found comments on their manufacturer's website (https://www.sainsmart.com/products/8-channel-12v-usb-relay-module#idTab3) with examples like below:

Python code to help get started :


import serial
import time
# how to use python for this
# documentation is a bit misleading for this. This is how I got it to work.
usbrelay = [
 [bytearray([0xff, 0x01, 0x00]), bytearray([0xff, 0x01, 0x01])], # channel-0
 [bytearray([0xff, 0x02, 0x00]), bytearray([0xff, 0x02, 0x02])], # channel-1
 [bytearray([0xff, 0x03, 0x00]), bytearray([0xff, 0x03, 0x03])], # channel-2
 [bytearray([0xff, 0x04, 0x00]), bytearray([0xff, 0x04, 0x04])], # channel-3
 [bytearray([0xff, 0x05, 0x00]), bytearray([0xff, 0x05, 0x05])], # channel-4
 [bytearray([0xff, 0x06, 0x00]), bytearray([0xff, 0x06, 0x06])], # channel-5
 [bytearray([0xff, 0x07, 0x00]), bytearray([0xff, 0x07, 0x07])], # channel-6
 [bytearray([0xff, 0x08, 0x00]), bytearray([0xff, 0x08, 0x08])], # channel-7
 [bytearray([0x00]), bytearray([0xff])], # all channels

 ]
# fun fact, you can just write a bitmask in place of this to command custom channel combos in 1 write instruction
def get_bit_mask(channels : list):
 mask = 0x00
 for value in channels:
 mask |= value
 return bytearray(mask)

serial_port = serial.Serial(
 'COM13',
 9600
 )
# first index is channel, 2nd is on/off (0 or 1
channel=0
global_channel=8
off_on=1
serial_port.write(usbrelay[channel][off_on])
# serial_port.write(usbrelay[global_channel][off_on]) # command all
# serial_port.write(get_bit_mask([ 1, 3, 5, 7])) # turn on all odds
time.sleep(1) # wait before closing serial port
serial_port.close()


and for the record,

I don't have a PowerShell command, all this is done via a small software (USB 8 Relay Manager v.1.4) from the manufacturer to be able to power this or that relay

I couldn't connect it because the card is delivered without cord....

I ordered it and I receive it on Wednesday

 If too complicated I can return the card it's on amazon no worries and if you can then direct me to another relay card no worries knowing that you shouldn't use the CH340 driver for hardware conflict (because of my steering wheel)

 Looking forward to reading you

 big thank you GEECAB!!  :)




geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #445 on: September 08, 2024, 09:17:39 am »
Hi GPForverer2024!

>>and for the record, I don't have a PowerShell command,

Didn't you use powershell before to test your 1xRelay? Sending serial data to the 8xRelay device should be the same as sending serial data to your 1xRelay device using powershell (You are just sending different data).


>>Python code to help get started

It would be good if you can test that python code when you get the 8xRelay. Are you familiar with Python? If you run that code as it stands, it'll just send "FF,01,01" on COM13 at Baud rate of 9600 (Which will hopefully switch the first relay on). You could change the 'channel' and 'off_on' variables and re-run the script turn to on and off different relays.


>>this is done via a small software (USB 8 Relay Manager v.1.4) from the manufacturer to be able to power this or that relay

Definitely be good for you to verify the 8xRelay is fully working with this tool for sure.

:)

PS. Are you aware the 8xRelay requires a 12v DC power source? It needs this because the power available from a USB port isn't enough to switch all 8 relays at the same time. I'm wondering now, when you were testing the 4xRelay (CH340) device, I think that needed a 5v DC power source (Which I guess if you hadn't connected it up, would probably be the reason why the board appeared to be dead?). The 1xRelay didn't need an additional power source because the power from the USB port is enough to switch a single relay. Hope that makes sense?
« Last Edit: September 08, 2024, 01:09:21 pm by geecab »

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #446 on: September 08, 2024, 04:25:39 pm »
Hi GEECAB!

 A little recap:

1xrelay yes no need for external power supply because just USB is enough

4xrelay yes you're right you need an external power supply 5 Voltes plugged into it that's what I did and good news I bought a new usb to micro usb cable and top it works!

I immediately tried your 2 script scorebord_to_relays.exe 3 none 4 police 5 none 6 none and it works with my flashing light!!

Now if I put example: scorebord_to_relays.exe 3 damage 4 police 5 night 6 none well it doesn't work because when I look at the device manager it says com port 4 and that's it there are no other ports for the card

for me I think there is just the com port 4 for the 4 relays and that you just have to change the command in the script (I hope it has of meaning) and for the record,

I always have a problem, a hardware conflict, as soon as the flashing lights (police) are triggered, my steering wheel no longer responds... I hope we will find the solution...!!

and for the 8xrelay yes you need an external 12V power supply I'm just waiting for the cable I ordered which will arrive on Wednesday and I can test it

I hope it makes sense

thank you GEECAB

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #447 on: September 08, 2024, 06:21:43 pm »
That's great GPForverer2024!

Glad you are aware of the external power supply required with the 'bigger' relay boards and really pleased that your 4xRelay has come to life!

Yes sorry, there is a bug scoreboard_to_relays, I wrongly assumed each relay needed its own com port lol! I'll make another version soon and I'll make it possible to switch between board types (so it sends the correct on/off byte sequence based on that).

Looking forward to Wednesday then! I'm pretty sure we'll get the new board working :)

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #448 on: September 10, 2024, 08:14:20 am »
Hi GPForverer2024!

I had some spare time today, I've been reading the reviews for your new 8xRelay board and found these ones interesting (There are about 115 of them lol!):-
https://www.amazon.com/SainSmart-Eight-Channel-Relay-Automation/dp/B0093Y89DE

I found a couple of reviews saying when the board is powered up, it doesn't respond to data received on its serial COM port. However, after running their Relay Manager v1.4 tool and opening the device, then it does start responding to serial COM port data. The assumption is, opening the device using Relay Manager v1.4 puts the device into some 'bit bang' mode, and leaves it in this state even when you exit Relay Manager v1.4. I *think* the board has to be in 'bit bang' mode to be able to control the relays using Serial COM port data.

I'm probably getting way ahead of myself, but I think it is good to be aware of this.

I've modified the scoreboard_to_relays tool, the command line arguments you have to supply have changed, as it now caters for different types of Relay boards (e.g. 'CH340', 'FTDI_BASIC', 'FTDI_BITBANG' etc.. The FTDI_* relates to your 8xRelay board because of the chip it uses. The operation (Including the On/Off byte sequences) of these are described in a 'supported_devices.ini' file I've added). Running scoreboard_to_relays.exe from command prompt without any arguments and you'll see the help displayed (which will hopefully explain everything).

To summarise, I reckon/hope that after you've tested the relay using the Relay Manager 1.4 tool, you should be able to run scoreboard_to_relays, specifying FTDI_BITBANG as the device and things should 'just work'.

Something else (Getting very ahead of myself now) - I've created an 'ftdi_config.exe' tool using the library files provided from the manufacturer. Running it without any arguments will just list all the FTDI devices in your system and display the help. You can run this tool and provide a couple of command line arguments to get your device into 'bit bang' mode (Which might be a simpler alternative to having to run their Relay Manager 1.4 tool and manually opening the device).

Hope this makes some sense lol!

Good luck, here is a link to the scoreboard_to_relays ftdi_config executables and source code:-
https://drive.google.com/file/d/13RIFnR8U8jIY_TAjRCl7nXEj7L99biVH/view?usp=drive_link

:)

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #449 on: September 10, 2024, 11:24:50 am »
Hi Geecab!

You are a genius! even if I knew it long before that lol!

The 4xrelay works wonderfully with your new script and here is what I ran the command as a command: scoreboard_to_relays.exe 5 CH340 police,skid,night,damage and it works!

The only thing is that as soon as my flashing light comes on my steering wheel goes out of order and I have to recalibrate the steering wheel,

on the other hand I noticed that when the other relays light up and there is nothing to plug into them my steering wheel still works well is it due to the small motor of the rotating beacon which would make

everything go out of tune?

 If you have a solution?

 For the 8xrelay I have always received the cable

I hope it makes sense

thank you GEECAB  :)

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #450 on: September 10, 2024, 12:47:28 pm »
Hi GPForverer2024!

>>You are a genius! even if I knew it long before that lol!

lol! Many thanks, you are too kind!  :cheers:

>>The 4xrelay works wonderfully with your new script and here is what I ran the command as a command: scoreboard_to_relays.exe 5 CH340 police,skid,night,damage and it works!

Great stuff, glad you understood the new settings. The source code is a bit messy / hard to follow at the moment. Wrote it all a bit quick. I plan to tidy it all up at some point and include it into the next MGPr package release  :)

>>The only thing is that as soon as my flashing light comes on my steering wheel goes out of order and I have to recalibrate the steering wheel,on the other hand I noticed that when the other relays light up and there is nothing to plug into them my steering wheel still works well is it due to the small motor of the rotating beacon which would make

Now this is very interesting! So if you disconnect your flashing light from the relay1, and play the game with those scoreboard_to_relays settings  (scoreboard_to_relays.exe 5 CH340 police,skid,night,damage), is your steering wheel OK when relay1 switches on/off ? If its OK, then its like the flashing light is draining power from the steering wheel. Does the flashing light and the wheel run off the same 12v power supply? If so, what is the AMPs (Or Watt) rating of the 12v power supply (Because it sounds like it is not supplying enough AMPs)?

:)
« Last Edit: September 10, 2024, 01:26:09 pm by geecab »

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #451 on: September 10, 2024, 04:50:26 pm »
GREAT JOB GEECAB !!!   :applaud: :applaud: :applaud:

 WOW WOW But of course the power supply I was on 12v 3A I changed to 12V 10A and top everything works perfectly !! 

MGPR takes on a whole new dimension with the toys,

tomorrow I'm going to connect the little vibration motor to another relay and I'm going to add yet another flashing light for the firefighters and

I think for the last relay I'm going to connect a small fan to make the wind.

GEECAB you have no idea what you just did a modern-day MGPR!!  I LIKE IT

plus you make me laugh when you say that you write it quickly!! it's huge!!

I'll keep you informed as soon as I connect a second toy to the second relay with the small vibration motor another

excellent job GEECAB!   ;)

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #452 on: September 11, 2024, 06:04:11 am »
This is really excellent news GPForverer2024!!

You're creating a totally immersive Monaco GP experience! 

I'm aware I still need to add a few more triggers (For when firetrucks appear. I can think of a few more, such as when the car exploding, when the car is spinning and when the car is in the air (after going over a ramp) etc... to name a few). Even if you don't want to use them, it will be good if they exist. It will require me to build a modified MGPr exe that is able to export this new information, but that shouldn't be a difficult job.

Other things that are going on in my mind, is that it might be handy for the scoreboard_to_relays parser to be handle a little bit of logic, so you could do something like:-
  scoreboard_to_relays 5 CH340 police|firetruck,none,none,damage|explode|spin

Which would mean relay1 triggers if police or firetrucks are on screen, and relay4 triggers when anything bad happens to the car.

...and something else, say when anything bad happens to the car, you might want a pulsed (Quick relay on/off to feel like a "thud") effect rather that a 'fixed on' for the duration that the trigger is on for. Does that makes sense?

Anyways, these are just thoughts, see how you get on with what is currently available and we'll take it from there!

Good luck with your testing!

:)

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #453 on: September 11, 2024, 02:36:40 pm »
Hi GEECAB!

For ideas with several triggers would really be a plus!

 I'm thinking, for example, of the relay that goes off just when the car passes over the puddle well all of what you said above really makes sense!!

otherwise I installed everything clean with my 12v 10A power supply in order to be able to connect my next toys to it FYI I plugged in my little 12 V motor and unfortunately it doesn't work, nothing to do with the

connection I just put the plus and the minus and the motor doesn't run..

I'm waiting to receive my 2 flashing lights to plug it into it!!

and for the 8xrelais card I didn't receive the cord maybe tomorrow

I'll keep you informed

Thank you GEECAB  :)

RetroNutz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:September 11, 2024, 05:02:28 pm
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #454 on: September 11, 2024, 04:51:46 pm »
Hi GEECAB

Can't believe this is still a live thread in 2024!! I remember posting my delight at seeing this remake in 2015.... Bloody 9 years ago! (I feel so old!!). I've been outa the retro gaming scene for a while, but getting back into it. So glad this is still going strong. When I get chance I will defo DL the latest version and enjoy. Keep up the great work!

xfassa

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:September 16, 2024, 09:53:01 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #455 on: September 12, 2024, 03:57:51 pm »
Geecab - I just installed the latest version (V1.5.1) and everything works great.  I also see you released a version for Linux/RPi that I hope to test soon.  Thank you!

One quick question.  I am using the original game accelerator (linear potentiometer) with the Ultimarc A-Pac.  Everything works well enough but the accelerator range seems to be quite narrow.  It's most notable during the bride sequence as it very difficult (if not impossible) to match the speeds of the other cars.  I have my analog range set at 0 to +1.  Best guess, all of the acceleration occurs in the first 30% of the pedal press.  Is there a way to spread out the acceleration through 100% of the pedal press?  No worries if it can't be changed.  These comments were more of an observation as this game is pretty darn near perfect.  :-)

Thanks again for all your hard work!
« Last Edit: September 13, 2024, 08:48:44 am by xfassa »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9682
  • Last login:Today at 05:26:37 am
  • Designated spam hunter
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #456 on: September 13, 2024, 03:31:27 am »
(linear potentiometer) with the Ultimarc Mini IPAC.
A potentiometer connected via a Mini-Pac or IPac?   :dizzy:
- Did you mean to say an A-Pac or maybe a U-HID?   :dunno

Everything works well enough but the accelerator range seems to be quite narrow.  It's most notable during the bride sequence as it very difficult (if not impossible) to match the speeds of the other cars.  I have my analog range set at 0 to +1.  Best guess, all of the acceleration occurs in the first 30% of the pedal press.  Is there a way to spread out the acceleration through 100% of the pedal press?
If you're running under Windows, have you tried calibrating the analog pedal in Control Panel -- Devices and Printers?


Scott

xfassa

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:September 16, 2024, 09:53:01 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #457 on: September 13, 2024, 08:46:25 am »
PL1 - Thanks for the comments. 

You are correct, I meant A-Pac (corrected in original post).  The A-Pac was calibrated in Windows (Game Controllers).  The pedal appears to be properly calibrated as the indicator smoothly travels from right to left as I press the pedal through its full range.
« Last Edit: September 13, 2024, 08:49:15 am by xfassa »

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #458 on: September 14, 2024, 03:25:47 am »
Hi GEECAB

Can't believe this is still a live thread in 2024!! I remember posting my delight at seeing this remake in 2015.... Bloody 9 years ago! (I feel so old!!). I've been outa the retro gaming scene for a while, but getting back into it. So glad this is still going strong. When I get chance I will defo DL the latest version and enjoy. Keep up the great work!

Many thanks RetroNutz! Welcome back and hope you enjoy the new version! :)

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #459 on: September 14, 2024, 03:34:56 am »
PL1 - Thanks for the comments. 

You are correct, I meant A-Pac (corrected in original post).  The A-Pac was calibrated in Windows (Game Controllers).  The pedal appears to be properly calibrated as the indicator smoothly travels from right to left as I press the pedal through its full range.

Hi xfassa!

When I read your post, like PL1, I thought it sounded like a windows calibration issue. As that's all OK, it sounds like something weird in my code. I'll dig out my analog pedal and report back soon :)


Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4135
  • Last login:August 14, 2025, 10:57:09 am
  • NOM NOM NOM
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #460 on: September 14, 2024, 09:58:01 am »
Geecab...

 Just a note about different Pedal Assemblies:

- PCs use a 10k pot,  and many of the assemblies might not even use Gearing on them.

- Arcade pedals use 5k pots,  and every one that Ive encountered, uses Gearing, to be able to spin the pot more per each pedal degree depression.

- Spy Hunter , is one of the more rare games that actually uses "10 turn" pots, and a very high gearing ratio, on both the steering and pedal assemblies

 Spy Hunter likely uses this setup, for a much higher resolution in its controls.

- Race Drivin also uses 10 turn pots on its steering wheel assy.  Its wheel can turn like 3 full rotations,  and its "Direct Drive" (no gearing).
- Race Drivin's pedals are a combination of geared Pots for the Gas, and a "Strain Gauge" (pressure sensor) for the brake pedal (I believe the brake also has
a geared pot.. and the strain gauge is read after the pedal is fully "floored".

 Gearing of his original Arcade pedals, may be causing a difference in Pot Values.
 Also... not sure if there is a rotational difference, between the arcades 5k pots, and PCs 10k pots.

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #461 on: September 15, 2024, 12:51:29 pm »
Hi Xiaou2!

Thanks for that, interesting stuff :)

Something worth adding that I've just been reading about, is that Monaco GP cabinets didn't use a potentiometer for the gas pedal, they used 2 optical switches.

Its difficult to find much information about it on the web, but I did come across this video where you see the pedal assembly (See 3.37 and at 6:50):


The video quality isn't great, but you can see the metal bar with holes in it, that slides in-between the 2 optical switches as you press and depress the pedal.

So I reckon the accelerator had 4 speed settings, something like:-

opt1:OFF opt2:OFF  = SLOWEST
opt1:ON opt2:OFF    = SLOW
opt1:ON opt2:ON      = FAST
opt1:OFF opt2:ON    = FASTEST

:)

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #462 on: September 15, 2024, 01:18:26 pm »
Geecab - I just installed the latest version (V1.5.1) and everything works great.  I also see you released a version for Linux/RPi that I hope to test soon.  Thank you!

One quick question.  I am using the original game accelerator (linear potentiometer) with the Ultimarc A-Pac.  Everything works well enough but the accelerator range seems to be quite narrow.  It's most notable during the bride sequence as it very difficult (if not impossible) to match the speeds of the other cars.  I have my analog range set at 0 to +1.  Best guess, all of the acceleration occurs in the first 30% of the pedal press.  Is there a way to spread out the acceleration through 100% of the pedal press?  No worries if it can't be changed.  These comments were more of an observation as this game is pretty darn near perfect.  :-)

Thanks again for all your hard work!

Hi xfassa!

When testing with my analog pedal, I notice when I look at the windows calibration settings (raw values), I see values from 0 to 1000 reported as I press/release the pedal. However, the game library I use gives me the pedal position values from -1.0 to 1.0. When I change MGPr's range setting to "0 to +1" I notice the same issue as you (all the acceleration happens in the first 30% of the pedal press). When I set the range  to "-1 to +1" things work as I expect. Can you give the "-1 to +1" range a try?

At some point, I think I'll add a MGPr option where it can display the raw values received for all analog controls, so that'll allow users to work out what range setting is best suited them.

Personally, I'm not really happy with the way the game feels with an analog pedal. Now that I'm aware of how the original pedal assembly was designed, I'm thinking I should try and simulate that...

I'll wait and see what you think :)

xfassa

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:September 16, 2024, 09:53:01 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #463 on: September 16, 2024, 09:42:50 am »
Geecab - Thanks for the response.  I set it to -1 to 1.  I now have full range.  Honestly, I'm not sure why I had it set to 0 to +1 (my bad).  All that said, I still can't match the speeds of the other cars.  It appears the other cars will adjust their speeds to either be faster or slower but not the same speed.  I may be wrong but I thought you could match the speed of the other cars in the actual arcade (which is helpful on the bridge).  Again, no worries, just observations.  Thanks!

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #464 on: September 16, 2024, 11:38:56 am »
Good stuff xfassa, glad the range thing is sorted!

Yes indeed, the opponents in MGPr don't like you to speed match. If they did, then in extended play, you could just cruise behind an opponent, get faster and faster with them for ever more, building up distance points. Watching videos of arcade machine being played, it looked to me like the opponents became increasingly difficult to speed match the longer the game went on for. So with that in mind I made MGPr do this:

If the opponents notice you are speed matching, they accelerate away. If you continue to speed match, then when they reach their maximum speed they'll eventually slow down and begin that cycle again. Early on in the game, the difficulty is low, you'll hardly notice this is happening, but when you've been playing for ages (Definitely by the time you reach the 2nd bridge), the opponents will run this cycle much faster. If you keep trying to speed match, it'll be impossible to keep up with opponents when they accelerate away (So someone might drive into the back of you), and it'll be impossible to slow down as quick as they do (So you might go into the back of someone). So speed matching should only really be a temporary tactic, the only consistent thing about the opponents its that if you are driving flat out, then you'll always be able to overtake them.

I've also made the game generously award points for the faster you drive and overtake. You might be able to speed match for a longer game, but you'll never get a high score doing that.

I'm interested to know what you think to all this, what you remember from your arcade version so we can get MGPr as close to the original as possible. All I have to go on is my old memories of the game and the youtube vids that exists :)
« Last Edit: September 18, 2024, 01:41:30 am by geecab »

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #465 on: September 16, 2024, 02:23:42 pm »
Hi GEECAB!

That's it, I've done several tests and frankly what a joy to be able to add toys!!

Namely the 4xrelay works very well!!

Command line: scoreboard_to_relays.exe 3 CH340 Police,None,Skid,Police when I try 2 times police in the same command line this bug because I wanted to launch the blue and red flashing light at the same time FYI

i recommended a new vibration motor which should arrive next week It's frankly great the reaction of the toys with the game!!

Otherwise I received the cable for the 8xRelay FTDI but it doesn't work because in Program Manager it detects nothing in COM port while the USB 8 Relay Manager v1.4 software works fine. FYI I ordered the 8x card

relay ch340 because it works very well I'm curious to know how you are going to add in mgpr the options with the relay card to be able to add the toys!!

What a joy to be able to add toys!!

 I'll make you a new video soon with the toys you'll see it's great!! total immersion!!

 especially when it's dark lol!

thank you GEECAB! :)


geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #466 on: September 18, 2024, 02:22:27 am »
Sounds good to me GPForverer2024!! I can imagine how much it adds to the game!!

I really think CH340 relays are the way forward, they are newer technology than the dated FTDi chips, they are easier to get going straight out the box (No drivers to install, easy to understand serial port command to change the state of the relays), and they also don't do random relay switching when initialising.

>>Otherwise I received the cable for the 8xRelay FTDI but it doesn't work because in Program Manager it detects nothing in COM port while the USB 8 Relay Manager v1.4 software works fine.

Well, I guess getting the FTDi device running is less of an issue now the CH340 devices are working well. That said, I am intrigued by the FTDi 8xRelay, they do seem to be used quite widely in virtual pinball tables, yet their scetchy documentation makes them so tricky to use lol!... If you decide to still try and get it working, then I reckon you need to check (Somehow) if you have the additional VCP driver installed, this should enable us to send the send serial data to it. Have a read of this page:

    https://ftdichip.com/drivers/vcp-drivers/

After reading the stuff about VCP and D2XX drivers, I reckon you must have installed the D2XX driver ok (because the Relay Manager v1.4 works ok), but not the VCP driver. When you ran the installer, was there an option to install an additional VCP driver as part of the process? Just guessing here...


>>relay ch340 because it works very well I'm curious to know how you are going to add in mgpr the options with the relay card to be able to add the toys!!

I've almost finished a new version of scoreboard_to_relays which will give you access to a load more in-game information (When Firetrucks are on screen etc...), you'll also be able to handle some simple logic (I.e. "police|firetruck,none,none,police&firetruck"  would ensure relay1 would power on when police OR firetrucks are on screen, relay4 would power on only when both police and firetruck are on screen at the same time). I'll need to give you a complete debug MGPr package next because you'll need a new mgpr.exe that exports the new information. When we are happy with everything, I won't be adding any relay options to the game, I'll just provide the scoreboard_to_relays tool (source and exe) in future MGPr packages. Hope that makes sense?

:)
« Last Edit: September 18, 2024, 04:56:47 am by geecab »

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #467 on: September 18, 2024, 04:13:02 pm »
Hi GEECAB!

yes indeed you are entirely right the CH340 chips are much more stable and newer than the tfdi chips which are for pincabs !!

 so yes let's focus on the CH340 chips which works wonderfully!!

 I'm waiting for your new mgpr debugging version with the scoreboard_to_relays tool And of course it makes sense once again

 I repeat myself bravo GEECAB excellent work!

I can't wait to make a video for you soon  ;)

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4135
  • Last login:August 14, 2025, 10:57:09 am
  • NOM NOM NOM
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #468 on: September 19, 2024, 04:14:33 am »
Hi Xiaou2!

Thanks for that, interesting stuff :)

Something worth adding that I've just been reading about, is that Monaco GP cabinets didn't use a potentiometer for the gas pedal, they used 2 optical switches.

Its difficult to find much information about it on the web, but I did come across this video where you see the pedal assembly (See 3.37 and at 6:50):


The video quality isn't great, but you can see the metal bar with holes in it, that slides in-between the 2 optical switches as you press and depress the pedal.

So I reckon the accelerator had 4 speed settings, something like:-

opt1:OFF opt2:OFF  = SLOWEST
opt1:ON opt2:OFF    = SLOW
opt1:ON opt2:ON      = FAST
opt1:OFF opt2:ON    = FASTEST

:)


 Sega's   "TURBO"   also used the same optical pedal system.   (I used to own one... but sadly, had to sell it)

 Another Arcade Oddity, was TX-1..  which used optical-wheel encoders (spinners), for its Gas and Brake pedals

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #469 on: September 20, 2024, 09:16:11 am »
Sega's   "TURBO"   also used the same optical pedal system.   (I used to own one... but sadly, had to sell it)

 Another Arcade Oddity, was TX-1..  which used optical-wheel encoders (spinners), for its Gas and Brake pedals

I didn't know that about Turbo, thanks! I wonder what mame would do if you had that type of pedal and wanted to connect it up... Might have a look at the mame source to find out if its possible. It would be good if I could see how Turbo handles the 4 pedal positions when it comes to trying to match the speed of the opponent cars. There is a chance Turbo's gameplay was slightly modelled on Monaco GP (Both Sega and both using the same pedal). I shall investigate!

@xfassa - If you're reading this, hopefully in the next debug package I'm putting together, I'm shall try and simulate the 2 optics with your analog pedal. Currently, when you hold the gas pedal in a specific position, the car will either accelerate or decelerate to a specific speed at a rate determined by a single acceleration curve. I plan to make it so that there will be 4 acceleration curves that will come into effect depending on pedal position (1st between 0%-25%, 2nd 25%-50%, 3rd 50%-75%, 4th 75%-100%). Hopefully, the pedal will feel more responsive.

:)

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9682
  • Last login:Today at 05:26:37 am
  • Designated spam hunter
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #470 on: September 20, 2024, 10:36:00 am »
I wonder what mame would do if you had that type of pedal and wanted to connect it up... Might have a look at the mame source to find out if its possible.
First glance looks promising . . .
https://github.com/mamedev/mame/blob/master/src/mame/sega/turbo.cpp
Lines 443-448
Code: [Select]
ioport_value turbo_base_state::pedal_r()
{
// inverted 2-bit Gray code from a pair of optos in mechanical pedal
uint8_t pedal = m_pedal->read();
return (pedal >> 6) ^ (pedal >> 7) ^ 0x03;
}
Lines 739-740
Code: [Select]
PORT_START("PEDAL")
PORT_BIT( 0xff, 0, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)

. . . then I ran it in MAME 0.262.  There's no "Machine Configuration" menu so it doesn't look like there's currently any way to use the original pedal with MAME.

The good news is that you can clearly see the four different speed settings in low gear as you adjust the pedal potentiometer.   ;D


Scott

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #471 on: September 20, 2024, 11:36:36 am »
I wonder what mame would do if you had that type of pedal and wanted to connect it up... Might have a look at the mame source to find out if its possible.
First glance looks promising . . .
https://github.com/mamedev/mame/blob/master/src/mame/sega/turbo.cpp
Lines 443-448
Code: [Select]
ioport_value turbo_base_state::pedal_r()
{
// inverted 2-bit Gray code from a pair of optos in mechanical pedal
uint8_t pedal = m_pedal->read();
return (pedal >> 6) ^ (pedal >> 7) ^ 0x03;
}
Lines 739-740
Code: [Select]
PORT_START("PEDAL")
PORT_BIT( 0xff, 0, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)

. . . then I ran it in MAME 0.262.  There's no "Machine Configuration" menu so it doesn't look like there's currently any way to use the original pedal with MAME.

The good news is that you can clearly see the four different speed settings in low gear as you adjust the pedal potentiometer.   ;D


Scott

Nice find Scott, cheers! Looking at that code I bet you could 'hack' mame to connect up the original pedal if you really wanted to. Anyways, looking forward to trying turbo out with my pedal potentiometer later :)

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9682
  • Last login:Today at 05:26:37 am
  • Designated spam hunter
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #472 on: September 20, 2024, 06:01:02 pm »
Looking at that code I bet you could 'hack' mame to connect up the original pedal if you really wanted to.
Well . . . a C++ code monkey probably could do that, but I've only evolved to the level of code paramecium.   :P   :lol

Found some more relevant code in turbo.cpp.

Lines 662-669 define input port "IN0", line 663 shows that port bit 0x03 relates to the pedal.
Code: [Select]
static INPUT_PORTS_START( turbo )
PORT_START("IN0") // IN0
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(turbo_base_state, pedal_r)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gear Shift") PORT_TOGGLE

Lines 565-582 show the program/address(?) map, line 580 maps port "IN0".
Code: [Select]
void turbo_state::prg_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0xa000, 0xa0ff).mirror(0x0700).rw(FUNC(turbo_state::spriteram_r), FUNC(turbo_state::spriteram_w));
map(0xa800, 0xa807).mirror(0x07f8).w("outlatch", FUNC(ls259_device::write_d0));
map(0xb000, 0xb3ff).mirror(0x0400).ram().share(m_sprite_position);
map(0xb800, 0xbfff).w(FUNC(turbo_state::analog_reset_w));
map(0xe000, 0xe7ff).ram().w(FUNC(turbo_state::videoram_w)).share(m_videoram);
map(0xe800, 0xefff).w(FUNC(turbo_state::collision_clear_w));
map(0xf000, 0xf7ff).ram();
map(0xf800, 0xf803).mirror(0x00fc).rw(m_i8255[0], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xf900, 0xf903).mirror(0x00fc).rw(m_i8255[1], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xfa00, 0xfa03).mirror(0x00fc).rw(m_i8255[2], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xfb00, 0xfb03).mirror(0x00fc).rw(m_i8255[3], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xfc00, 0xfc01).mirror(0x00fe).rw("i8279", FUNC(i8279_device::read), FUNC(i8279_device::write));
map(0xfd00, 0xfdff).portr("IN0");
map(0xfe00, 0xfeff).r(FUNC(turbo_state::collision_r));
}

There are also three references to the pedal in turbo.h.
https://github.com/mamedev/mame/blob/master/src/mame/sega/turbo.h
Line 41
Code: [Select]
, m_pedal(*this, "PEDAL")

Line 47
Code: [Select]
ioport_value pedal_r();

Line 68
Code: [Select]
optional_ioport m_pedal;

. . . and that's about as far as I can take it.

No idea how to change the MAME source code from a potentiometer input to the two opto inputs or how to add a "Machine Configuration" menu item to select between a potentiometer pedal and the original optical pedal.   :dunno
- There might be a clue on how to do the Machine Configuration part in the 720 source code since IIRC MAME can be configured to use either a spinner or the original controller.


Scott

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #473 on: September 24, 2024, 03:38:50 pm »
Cheers for this Scott!

As it turns out, no hack necessary, I'd got an old version of mame that allows me to choose keys for Opto1 and Opto2, so was able to play Turbo and see where the
car moves to on screen (I'll call this a 'marker') depending on pedal position and gear. I reckon there are 7 markers (Why 7? Why not 8 you ask? Its because when you release the pedal in either high or low gear, the car drops to the very lowest (starting point) marker, if that makes sense). Anyways, I played it loads, after which I went and had a look at all Monaco GP youtube vids that exist (again), and I reckon I can definitely see something similar (If not the same thing) going on. Unfortunately, there are no vids of people messing around with pedal position in low gear (Most people are stepping right on the gas in low gear), but you can see a few videos where, in high gear, players ease off for the bridge and I can briefly see instances where the card holds position at 3 distinct markers (roughly).

So! I've made some modifications to MGPr that copies what I've observed, and added options so that you can specify keys/buttons for OPTO1 and OPTO2. Also, if using an analog pedal, MGPr chooses an appropriate OPTO1 and OPTO2 state depending on the analog value. For me, with an analog pedal, it plays much better, the car moves less erratically, you feel like you have more control somehow, and you don't really notice the pedal limiting to a defined set of speeds.

Just need to do some tidying up and I'll upload a new debug package with the new scoreboard_to_relays changes I've done for GPForverer2024.

BTW. just incase anyone was concerned, the game plays exactly the same if you plan to continue to use just the single button/key as the accelerator.

:)
« Last Edit: September 25, 2024, 04:01:19 am by geecab »

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #474 on: September 26, 2024, 03:07:06 pm »
Hi GPForverer2024, xfassa and to whoever fancies giving this a try!

I've put together another debug version v1.5.1D1.

Monaco GP Remake v1.5.1D1 for Windows (Download via My Google Drive)
Please read the release notes HERE.
 
This debug version is the same as version v1.5.1 except for the following modifications:

 - More game elements exported to shared memory (scoreboard_reader utilitly modified to display all the new imported elements).
 - Added new scoreboard_to_relays utility + source code (Operates CH340 relay devices depending on things that happen in the game).
 - OPTO2_DEVICE control configuration option added (See Section 7 'Accelerator Pedal' in release notes for more information regarding the 2 Opto switches used by Monaco GP's mechanical accelerator pedal).
 - Fix mistake in arcade game track file that was causing a 'Number of Opponents' error to appear in the console window (Was not affecting gameplay).
 - The 3cabs artworks now change from dirty glass bezels to clean glass bezels when switching between attract mode and game mode.

Regarding the scoreboard_to_relays utility - You can now specify some basic logic with the many triggers (With no brackets though, so you may need to get your head around operator precedence (I.e. "!" (NOT operator) will get processed before "&" (AND operator) will get processed before "|" (OR operator)). Also, rather than have the relay being on/off depending on a trigger being True/False, you can specify a timeout to ensure the relay only stays on for a short space of time. Actually, this is all quite difficult to explain, much easier to get an idea of what I'm talking about by looking at some examples. One other thing I need to stress is that its best to always encapsulate the triggers command line argument in quotes (Not doing so will confuse the interpreter when the argument contains unusual !&| characters). Here's the command line help for the new scoreboard_to_relays utilty, hopefully it covers everything:-

Code: [Select]
SCOREBOARD TO RELAYS - v1.0.2
=============================

Usage:

  scoreboard_to_relays.exe <com> <device> "<triggers>"


Where:

  com        = Serial COM port number

  device     = The name of the relay device (E.g. 'CH340', 'KMTRONIC',
               'FTDI_BASIC' or 'FTDI_BITBANG'). See supported_devices.ini
               for more information about these devices.

  triggers =   This argument must be specified within double quotes.
               It can be single trigger sequence or a list of comma separated
               sequences. The 1st sequence relates to relay1, the 2nd sequence
               relates to relay2 etc. Setting a sequence to 'none' ensures a
               particular relay will not be used. Sequences omitted from the end
               of the list for which a physical relay exists will not be used
               (They are implicitly set to 'none'). The format of a sequence
               is best understood by looking at the examples below.


Valid triggers:

  gear
  police
  ice
  night
  coin
  puddle
  snow
  rescueAny
  rescueFiretruck
  rescueAmbulance
  rescueHearse
  rescueSubmarine
  hunterAny
  hunterShark
  hunterCrocodile
  gameInplay
  gameBonus
  gameCalculateScore
  gameEnterName
  gameAwardScore
  gameInsertCoin
  gameHiscores
  inplayNormal
  inplaySpin
  inplayCrash
  inplayFlyOverMerge
  inplaySlip
  inplayMarsh
  inplayGoal
  inplayJump
  inplayGridStart
  inplayInBoathouse
  damageNone
  damageHit1Immune
  damageHit1Vulnerable
  damageHit2Immune
  damageHit2Vulnerable
  damageWaitForBackfire
  damageBackfiring
  damageRepairing


Example 1:

  To connect to a 1xRelay CH340 device on COM5 where relay1 is triggered by
  police:

   scoreboard_to_relays.exe 5 CH340 "police"


Example 2:

  To connect to a 4xRelay CH340 device on COM3 where relay1 is triggered by
  police and relay3 is triggered when inplay. Relay2 and Relay4 are not used:

   scoreboard_to_relays.exe 3 CH340 "police,none,gameInplay,none"


Example 3:

  To connect to an 8xRelay FTDI_BITBANG device on COM7 where relay1 is triggered
  by police and relay6 is triggered when inplay. None of the other relays are
  used:

   scoreboard_to_relays.exe 7 FTDI_BITBANG "police,none,none,none,none,gameInplay"


Example 4:

  To connect to a 4xRelay CH340 device on COM3 where relay1 is triggered
  when game is inplay and either the ice or night road is displayed. Relay4 is
  triggered when the game isn't inplay and an ice road is displayed. None of the
  other relays are used:

   scoreboard_to_relays.exe 3 CH340 "gameInplay&ice|gameInplay&night,none,none,!gameInplay&ice"


Example 5:

  To connect to a 4xRelay CH340 device on COM5 where relay1 is triggered
  for 250mS when something hits the car. Relay2 is triggered for 500mS if the
  car drives over a puddle or some snow. None of the other relays are used:

   scoreboard_to_relays.exe 5 CH340 "inplayCrash|inplaySpin|damageHit1Immune|damageHit2Immune:250,puddle|snow:500"

:)

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #475 on: September 29, 2024, 07:30:30 am »
Hi GEECAB!

 I just tried the new D1 debug

in my head it's a bit confusing

 I can't understand the inplay function and the timing For example

, can you give me an example of the puddle control line and the passage on the blue strip with the same relay?

 And to use the 8 relays are it in a row for the command line (ch340)?

 FYI to make the whole thing work

 I have to specify each exe in administrator mode for it to work Also know before

 I launch first scoreboard_to_relays before MGPR and now

I have to launch MGPR before and after scoreboard_to_relays (not easy because when I launch it MGPR everything is in full screen 'I hope you see what I mean)

 and when I want to quit he asks me want to close the application scoreboard_to_relays with the yes or no question for my part not practical)

Also for information I installed the small motor for the vibrations of the steering wheel buy on Aliexpress and frankly it's bleffing

really sorry GEECAB with these stupid questions  :(

thank you  :)


geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #476 on: September 29, 2024, 09:40:05 am »
Hi GPForverer2024!

>>I can't understand the inplay function and the timing For example, can you give me an example of the puddle control line and the passage on the blue strip with the same relay?

No worries, it is quite confusing!

The gameInplay, gameEnterName, gameInsertCoin etc.. are just other triggers you can make the relays switch ON and OFF to. I.e. to have relay1 switch ON only when the game is inplay (when you have control of the car), to make relay2 switch ON only when you are entering your name, and relay4 to only switch on during attract mode (When Insert Coin is flashing), you would do:

scoreboard_to_relays.exe 3 CH340 "gameInplay,gameEnterName,none,gameInsertCoin"

The trigger for the 'blue strip' road is now called simply "ice". So if you wanted relay1 to switch ON when you are driving over a puddle OR when there is a ice road, you would do:

scoreboard_to_relays.exe 3 CH340 "puddle|ice"

Note the '|' character means OR.

If you wanted the same thing to happen for all 8 relays, you would do:

scoreboard_to_relays.exe 3 CH340 "puddle|ice,puddle|ice,puddle|ice,puddle|ice,puddle|ice,puddle|ice,puddle|ice,puddle|ice"

Now using the above example, you might notice during attract mode (When the road is rolling past and Insert Coin is flashing on screen) relays will switch ON when you see an ice road. This might be undesirable, and you might only want relays to come on when the car is driving on a puddle, or when there is an ice road and you are actually playing the game. So for just a one relay device you could do:

scoreboard_to_relays.exe 3 CH340 "puddle|gameInplay&ice"

Note. The '&' character means AND. So for relay1 we are saying Switch ON if the car is driving on a puddle OR  if the game is inplay AND there is an Ice road.

And to do this for all 8 relays:

scoreboard_to_relays.exe 3 CH340 "puddle|gameInplay&ice,puddle|gameInplay&ice,puddle|gameInplay&ice,puddle|gameInplay&ice,puddle|gameInplay&ice,puddle|gameInplay&ice,puddle|gameInplay&ice,puddle|gameInplay&ice"

Does this make anymore sense?


I >>have to specify each exe in administrator mode for it to work Also know before  I launch first scoreboard_to_relays before MGPR and now I have to launch MGPR before and after scoreboard_to_relays (not easy because when I launch it MGPR everything is in full screen 'I hope you see what I mean)

You should just be starting scoreboard_to_relays before starting MGPr. You shouldn't need to start MGPr twice... I'm just thinking, can you double check and make sure when you are running scoreboard_to_relays, you are definitely encapsulating the triggers in quotation marks (As shown in my examples), not doing this will cause weird things to happen.

>>really sorry GEECAB with these stupid questions

Absolutely no trouble at all. I really appreciate you giving this stuff a go. My docs/help are very brief at the moment, I need to explain things better.

If you are starting scoreboard_to_relays and MGPr from the same batch file, perhaps you could copy/paste the contents of the batch file so I can check how you are starting scoreboard_to_relays?

Hope this helps?

:)
« Last Edit: September 29, 2024, 09:49:21 am by geecab »

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #477 on: September 29, 2024, 02:01:48 pm »
Hi GPForverer2024!

Something else that I thought might be worth mentioning (Though I worry I might be complicating things), is that if you have a look in  mgpr_v1_5_1D1/utils/scoreboard_to_relays/src/scoreboard_reader.h you'll see the stuff scoreboard_to_relays generates its list of available triggers from. There are some comments in scoreboard_reader.h that might give you a better idea of what a certain trigger actually does.

For example. if you read the scoreboard_to_relays help you'll see one of the available triggers is called "inplaySlip". If you have a look in scoreboard_reader.h, you'll see something called "inplay_state" and some comments above it explaining each state, and one of these comments reads:

    SLIP - Car is slipping on the verge of the road.


Another example, another available trigger is called "damageRepairing". If you have a look in scoreboard_reader.h, you'll see something called "damage_state" and some comments above it explaining each state, and one of these comments reads:

    REPAIRING - Car is being repaired after picking up a spanner/lifesaver and is immune from damage.


Hopefully this helps?

:)

GPForverer2024

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:August 04, 2025, 10:20:52 am
  • I want to build my own arcade controls!
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #478 on: September 30, 2024, 09:53:28 am »
hello GEECAB!


Here I did several tests and yes it works

here is my command line:

 scoreboard_to_relays.exe 4 CH340 "puddle|ice,police,night,rescueAny,inplayCrash,damageRepairing"

The only thing I can't activate is when the car has an accident, I don't know what word to put in?

 I was thinking of damagerepair but it doesn't work even for the repair key when the car and accident... you might say?

after I found the solution of the BATH file that works it's because I simply don't have the word start before...

Here is the config that works perfectly!! :

start scoreboard_to_relays.exe 4 CH340 "puddle|ice,police,night,rescueAny,inplayCrash,damageRepairing"



REM First 'start' (don't wait for sessions to terminate) the artwork instance
start mgpr -cfg 1024x768_pro_monaco_gp_import_scoreboard.cfg


REM wait 4 seconds before starting the game instance to ensure game gets focus.
ping 127.0.0.1

REM Now 'call' (wait for instance to terminate) the game instance.
call mgpr -cfg 1024x768_pro_monaco_gp_export_scoreboard.cfg

REM kill the artwork instance when the game terminates (They terminate themselves anyway after a few seconds timeout once the game instance stops).
taskkill /im mgpr.exe

Then I think it's great that the relays work without playing because from a distance it makes me think when I was little in the arcade the lights that worked by themselves!

Personally I think it's great!!

 I should receive a new toy (wind) this week Oh by the way,

 I noticed that when you play Pursuit even if the car is not in an accident, the yellow keys still scroll, maybe they only scroll when the car is in an accident?

 in any case good job GEECAB as usual!

 I'm waiting to see what word to put activate the relay for the yellow keys and when the car has an accident

 thank you for the description scoreboard_reader.h which was useful to me

big thank you GEECAB

the new video is coming soon a bit of suspense lol    ;)




geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:Yesterday at 03:29:37 am
Re: Sega Monaco GP 1979/1980 - My Remake
« Reply #479 on: September 30, 2024, 11:01:56 am »
Sound good to me GPForverer2024!

So this is your command line:

       scoreboard_to_relays.exe 4 CH340 "puddle|ice,police,night,rescueAny,inplayCrash,damageRepairing"

This tells me you are using 6 relays. On relay5 you're using the inplayCrash trigger, this will only switch ON if the car is exploding on screen.

Say, if you want to relay5 to switch ON if the car is in any type of incident (An explosion, or a spin, or collision with another vehicle or hitting some snow), then you could do the following:

       scoreboard_to_relays.exe 4 CH340 "puddle|ice,police,night,rescueAny,inplayCrash|inplaySpin|damageHit1Immune|damageHit2Immune|snow,damageRepairing"

Also (Sorry if I'm complicating things again...), say you didn't want relay5 to be permanently ON for the full duration of an incident... but rather you wanted it to be ON for just a short time just as the incident happens, then you could add say a 250ms timeout, like this:   

      scoreboard_to_relays.exe 4 CH340 "puddle|ice,police,night,rescueAny,inplayCrash|inplaySpin|damageHit1Immune|damageHit2Immune|snow:250,damageRepairing"

Note. The damageHit1Immune and damageHit2Immune triggers occur when you collide with another vehicle and your car gets damaged. There are 2 of them because it allows you to hit something (hit1), bounce off it and immediately hit something else (hit2). Again, have a look at the scoreboard_reader.h and see the comments for damage_state, hopefully get an idea of the process that occurs when you take some damage.

Note. I think (But not sure) that for damageRepairing to trigger, the car has to be damaged and you pick up a spanner. If your car is fine and you pick up a spanner, I don't think it'll trigger. Let me know if this is an issue for you.


>>I noticed that when you play Pursuit even if the car is not in an accident, the yellow keys still scroll, maybe they only scroll when the car is in an accident?

When you talk about the yellow keys, you are talking about the yellow spanner? If so, you are still supposed to see them even when the car isn't damaged, and they are still a good thing to collect as they always give you a few seconds extra time. I could probably change the spanner image to a yellow clock when the car isn't damaged I guess?

Hope this helps?

:)