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: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.  (Read 22845 times)

0 Members and 1 Guest are viewing this topic.

flybynight

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 73
  • Last login:March 22, 2024, 06:30:47 pm
  • I want to build my own arcade controls!
Over on the UKVAC forums, John Bennett has posted a WIP build of MAME with his Ridge Racer 2 and Rave Racer link play code working for testing. More details in his post at the link below

www.ukvac.com/forum/ridge-racer-full-scale-3-screens_topic378519_page2.html

Hopefully John submits the code to the main branch of MAME. It's great to have another driver cab working in link play. We are spoiled with all the link play progress lately :)

Hydreigon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:October 11, 2023, 09:57:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #1 on: October 07, 2021, 10:08:44 pm »
Sadly the forum is inaccessible for non UK VAC members.

I'm praying for Konami network play as well.

Boomslang

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1063
  • Last login:January 01, 2024, 08:20:43 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #2 on: October 07, 2021, 10:37:19 pm »
very cool

it takes all of 2 mins to quickly sign up to their forum so not a huge deal. I just registered and grabbed link etc

*EDIT*
actually i see John Bennett already gave permission for link and info to be posted elsewhere so here is his post below

Ok, I've not done anything much on this in a while, but folk wanted to have a try of the multiplayer linkup WIP.
So, if you download this link, you should be able to have a go at:
Rave Racer
Ridge Racer2

https://philwip.com/wp-content/uploads/2021/09/Mamejb_1.zip

Install it then get the ROMs for those 2 games.

In the folder you will see some batch files
linkup1_to_2.bat
linkup2_to_1.bat

Run both of these to open 2 MAME instances and open the game twice.
It will run like sh*te (1fps) until both instances are open as there's a comms wait in there I need to improve somehow.

Anyway when both running, go into the service menu (Tab, dip switches) and set the CPU number to 2 in the second player and maybe pick a different car colour). Unset the dip to save it. MAME should have two sets of configuration folders - one for each instance. It might be a pain to do as the keyboard may input to both sides, but you should be able to muddle through.

It should now work with 2 players on one PC. Windows will ask for access rights for MAME - say yes. This is because it uses 'globalcomms' to link the games up, the same way the Sega stuff does.

If you read up on how to use that, you should be able to put one instance on another PC over a LAN. It'll involve editing the addresses in the bat files. I've never tried it.


If you want a play of fullscale, then so linkups1_to2, 2_to_3 and 3_to_1 (as it's 3 instances). I think I set the jumpers right for it to run. It's obviously a technicolour nightmare with bad video ROMs. Needs a beefy PC, but it's now spreading the load over multiple cores, unlike one instance of MAME, so I can run it at 60fps here

3 or more players craps out on RR2 and Rave Racer - too many dropped packets in the chain. I need to think of a sync method, but it's hard when there is no 'master' PCB in the Namco system (all boards are considered equal).

Ignore any other 'supported' games in this mini-build - just things I've been dicking on with. You'll want to turn scanlines down too - not appropriate for VGA games and looks awful.

Anyway, this is NOT any kind of official release and I don't know when I'll get to work on it again, but consider yourselves playtesters if you like.

« Last Edit: October 07, 2021, 10:43:33 pm by Boomslang »

flybynight

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 73
  • Last login:March 22, 2024, 06:30:47 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #3 on: October 08, 2021, 03:50:31 am »
If you are using two PC's, add these to the mame.ini file:

PC#1 Left side, Car 1, hostname: PC1 mame.ini settings:

# CORE COMM OPTIONS
comm_localhost            0.0.0.0
comm_localport            15111
comm_remotehost           PC2
comm_remoteport           15112
comm_framesync            0

PC#2 Right side, Car 2, hostname: PC2 mame.ini settings:

# CORE COMM OPTIONS
comm_localhost            0.0.0.0
comm_localport            15112
comm_remotehost           PC1
comm_remoteport           15111
comm_framesync            0




Then start up PC2, launch the game and tap F2 to enter service mode. Set it to Car 2 and change the colour to Yellow.


« Last Edit: October 08, 2021, 08:05:23 am by flybynight »

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1054
  • Last login:March 24, 2024, 07:22:01 pm
  • As I pass, do I give you the ass or the crotch?
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #4 on: October 08, 2021, 01:56:16 pm »
Thanks for sharing the link and the info from the site Boomslang. I've created a single batch file for each game that'll load both versions of MAME (P1 & P2) at the same time and go directly into the game without having to navigate the MAME GUI. I'm sure you all know how to make batch files, but for anyone who doesn't, just add the following text into a notepad file then save it with the extension .bat on the end of whatever you call it.

for Rave Racer add the following:
start /b jb_build64.exe raveracw -w -cfg_directory cfg -nvram_directory nvram1 -comm_localport 15111 -comm_remoteport 15112 -comm_localhost 0.0.0.0 -comm_remotehost 127.0.0.1
start /b jb_build64.exe raveracw -w -cfg_directory cfg2 -nvram_directory nvram2 -comm_localport 15112 -comm_remoteport 15111 -comm_localhost 0.0.0.0 -comm_remotehost 127.0.0.1

For Ridge Racer 2:
start /b jb_build64.exe ridgera2 -w -cfg_directory cfg -nvram_directory nvram1 -comm_localport 15111 -comm_remoteport 15112 -comm_localhost 0.0.0.0 -comm_remotehost 127.0.0.1
start /b jb_build64.exe ridgera2 -w -cfg_directory cfg2 -nvram_directory nvram2 -comm_localport 15112 -comm_remoteport 15111 -comm_localhost 0.0.0.0 -comm_remotehost 127.0.0.1

Navigating the test menu was a bit of a pain in the arse as I was trying to figure out what keys you press to select the options. Pressing F2 will take you straight into the test menu without having to use the dipswitch options. Once in there, use the left arrow key on the keyboard to move through the options. Use the ctrl button (the default accelerator) to select the option you want and use left and right arrow keys to select the car number and the CPU number (I think it was under 'machine options' off the top of my head).
« Last Edit: October 08, 2021, 08:23:42 pm by MrThunderwing »

Hydreigon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:October 11, 2023, 09:57:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #5 on: October 09, 2021, 12:32:04 pm »
very cool

it takes all of 2 mins to quickly sign up to their forum so not a huge deal. I just registered and grabbed link etc
If you don't live in Europe or UK, then it's virtually impossible to register because they restrict IP address ranges within certain countries. I'd rather not resort to lying/cheating by using a VPN either.

Done some extensive testing and JB was correct, only a few games work (can't get other games like Cyber Cycles to link for the lolz). I'm starting to feel sorry because of all the setbacks in emulating this device. I personally consider this a supercharged RS232.

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1054
  • Last login:March 24, 2024, 07:22:01 pm
  • As I pass, do I give you the ass or the crotch?
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #6 on: October 09, 2021, 01:35:43 pm »
very cool

it takes all of 2 mins to quickly sign up to their forum so not a huge deal. I just registered and grabbed link etc
If you don't live in Europe or UK, then it's virtually impossible to register because they restrict IP address ranges within certain countries. I'd rather not resort to lying/cheating by using a VPN either.

Done some extensive testing and JB was correct, only a few games work (can't get other games like Cyber Cycles to link for the lolz). I'm starting to feel sorry because of all the setbacks in emulating this device. I personally consider this a supercharged RS232.

...? You don't need to register there, Boomslang put a link to download the special RR build from in his comment, along with the information from the UKVAC thread. I got the 2 Player build set up last night.


MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1054
  • Last login:March 24, 2024, 07:22:01 pm
  • As I pass, do I give you the ass or the crotch?
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #7 on: October 09, 2021, 01:42:31 pm »
If you want a play of fullscale, then so linkups1_to2, 2_to_3 and 3_to_1 (as it's 3 instances). I think I set the jumpers right for it to run. It's obviously a technicolour nightmare with bad video ROMs. Needs a beefy PC, but it's now spreading the load over multiple cores, unlike one instance of MAME, so I can run it at 60fps here


Has anyone figured out how to get the full scale version into the 3 screen mode? I've got the correct ROM, I've got my -comm_localport and -comm_remoteport all setup correctly in my batch file for the 3 versions of MAME, but when they open up, they're acting like 3 separate machines that aren't linked. I've had a look in the game's test menu to see if there's an option there to get them linked up, but I couldn't see anything. Anyone figured it out?

Edit: NVM JB has replied to me over at UKVAC.
« Last Edit: October 09, 2021, 05:16:27 pm by MrThunderwing »

Boomslang

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1063
  • Last login:January 01, 2024, 08:20:43 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #8 on: October 09, 2021, 07:40:50 pm »
very cool

it takes all of 2 mins to quickly sign up to their forum so not a huge deal. I just registered and grabbed link etc
If you don't live in Europe or UK, then it's virtually impossible to register because they restrict IP address ranges within certain countries. I'd rather not resort to lying/cheating by using a VPN either.

Done some extensive testing and JB was correct, only a few games work (can't get other games like Cyber Cycles to link for the lolz). I'm starting to feel sorry because of all the setbacks in emulating this device. I personally consider this a supercharged RS232.

Hm strange. I live in New Zealand but had no issues

*EDIT*

John Bennett has tried to make forum account here but says he never gets sent the confirmation email?
« Last Edit: October 09, 2021, 07:47:59 pm by Boomslang »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9394
  • Last login:Today at 02:12:01 pm
  • Designated spam hunter
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #9 on: October 09, 2021, 08:34:53 pm »
John Bennett has tried to make forum account here but says he never gets sent the confirmation email?
Saint has run into this issue before.   :banghead:
Multiple services, including Hotmail, flag activity from the arcadecontrols.com server as SPAM and deny it. I don't know how to resolve this, I have made efforts before with various services as per whatever instructions they give to get off their spam list, but since the server sends people notifications and other bits of automated email in fairly high volume, our server gets flagged as SPAM-sending, even though all the emails are legitimate and opt-in.

I don't have a way to fix this, though it's been some time since I looked.

Boomslang, can you ask John Bennett to try registering here with another e-mail address?
- Hopefully he has one on a domain that doesn't flag activity from the arcadecontrols.com server as spam.


Scott

flybynight

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 73
  • Last login:March 22, 2024, 06:30:47 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #10 on: October 11, 2021, 03:17:25 pm »
The SMTP email transactions logs on the server will have the full details on the reason for the failed email delivery. At a guess it looks like the email server IP is listed on the RATS blacklist.

https://www.spamrats.com/lookup.php?ip=74.208.43.115
(74.208.43.115 is the IP of the forum server)



Some email providers will reject  messages at time of connection if the incoming SMTP connection is on a blacklist.


1. The webmaster can request a de-listing here:
https://www.spamrats.com/rats-spam.php?ip=74.208.43.115#removal



2. Also the webmaster could ask the hosting company to "set up a reverse DNS PTR record for 74.208.43.115 to reverse to mail.arcadecontrols.com" (FQDN of the sending SMTP server) as the current PTR record is odd (74.208.43.115 PTR is set to u21482513.onlinehome-server.com)


« Last Edit: October 11, 2021, 03:26:53 pm by flybynight »

John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #11 on: October 12, 2021, 02:00:36 am »
Hi everyone, and thanks for sorting  :). I was going to look into another email address, I just don’t have many as I’d get too disorganised.


John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #12 on: October 12, 2021, 07:32:49 am »
Done some extensive testing and JB was correct, only a few games work (can't get other games like Cyber Cycles to link for the lolz). I'm starting to feel sorry because of all the setbacks in emulating this device. I personally consider this a supercharged RS232.

It's fair to assume that anything not listed (Drivers eyes, fullscale, RR2, Rave Racer) will NOT work.

It's basically because this device takes up to a 4K block of data and shoves it out over a 1MBit RS232-like interface to another chip, which will write to 4k on that game board.
The chip has various registers that we don't fully understand that are read or written to and each game seems to do something different that I haven't seen before (full scale is maybe the simplest). It also looks like the chip manipulates the data too, just to add to the pain (appending bits onto ends of frames etc). So for every game I have to implement something different -it's almost like I've written 4 different chip drivers so-far!.

I did start to look at Ace Driver and I'll come back to it again at some point.
I'm sure I'll get a better picture once more stuff is working.
What doesn't help is that global comms drops bytes too and I've not worked out a good way to synchonise multiple instances yet (Sega have a 'master' PCB in their linkups, this stuff is just a big loop of identical priority boards). I had some ideas. It'd be great to see more than 2 on a linkup without it falling over.

System2 stuff I couldn't get anywhere with, other than to pass the loopback test in the settings. Made me think it couldn't tolerate any dropped data. I've got a final-lap setup I could fire up one day if I had to.

Anyway, so busy this year I'm not sure if I'll get anything done short-term, but I will at some point

Boomslang

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1063
  • Last login:January 01, 2024, 08:20:43 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #13 on: October 12, 2021, 01:51:50 pm »
Frustrating that each game seems so different. It would be great to get more then 2p supported like you said, look forward to more updates

Boomslang

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1063
  • Last login:January 01, 2024, 08:20:43 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #14 on: October 12, 2021, 08:52:15 pm »
Done some extensive testing and JB was correct, only a few games work (can't get other games like Cyber Cycles to link for the lolz). I'm starting to feel sorry because of all the setbacks in emulating this device. I personally consider this a supercharged RS232.

It's fair to assume that anything not listed (Drivers eyes, fullscale, RR2, Rave Racer) will NOT work.

It's basically because this device takes up to a 4K block of data and shoves it out over a 1MBit RS232-like interface to another chip, which will write to 4k on that game board.
The chip has various registers that we don't fully understand that are read or written to and each game seems to do something different that I haven't seen before (full scale is maybe the simplest). It also looks like the chip manipulates the data too, just to add to the pain (appending bits onto ends of frames etc). So for every game I have to implement something different -it's almost like I've written 4 different chip drivers so-far!.

I did start to look at Ace Driver and I'll come back to it again at some point.
I'm sure I'll get a better picture once more stuff is working.
What doesn't help is that global comms drops bytes too and I've not worked out a good way to synchonise multiple instances yet (Sega have a 'master' PCB in their linkups, this stuff is just a big loop of identical priority boards). I had some ideas. It'd be great to see more than 2 on a linkup without it falling over.

System2 stuff I couldn't get anywhere with, other than to pass the loopback test in the settings. Made me think it couldn't tolerate any dropped data. I've got a final-lap setup I could fire up one day if I had to.

Anyway, so busy this year I'm not sure if I'll get anything done short-term, but I will at some point

Have you looked at Dirt Dash at all?

John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #15 on: October 18, 2021, 05:54:54 pm »
Nope, haven't looked at Dirt Dash at all.
I was going to have another look at Ace Driver when I got a moment, although need to clear a few other projects out the way.

Something I just noticed - Ridge Racer 2's manual suggests it only supports pairs of cabinets, whereas I tried 3 and it didn't work, so maybe you need to try 4.

Does anyone know a good way to set the controls/focus to just one instance of MAME? It's really annoying trying to edit one game and changing the settings for four  :angry:

JoeShmo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:December 07, 2021, 11:02:43 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #16 on: October 23, 2021, 09:45:56 am »
I happen to have a physical RR2 (twin version) cabinet that I'm in the process of converting to MAME.  So if you want to know how anything looks/connects physically on this cabinet, let me know.  One thing that's odd is this cabinet is a SINGLE cabinet, yet has two complete games in it; two board sets, two power supplies, etc..  So it's odd that cabinets would have to connect in pairs.  I'll have to take a look at the link connectors, and see if the two are already linked in some way.

Does anyone know a good way to set the controls/focus to just one instance of MAME? It's really annoying trying to edit one game and changing the settings for four  :angry:

I'm using MultiSeat for this (linux), which allows you to have two players share a single computer but having two of everything connected.  You assign USB, PCI, and Video devices to each "seat".  Each player has their own mame config, but all the roms and such are stored centrally.  Not sure if such a setup would help or hinder you having to change settings for four.  You'd still have to edit four config files, then just tell the other instances to restart (or send them SIGHUP to re-read config if mame supports that)
« Last Edit: October 23, 2021, 09:50:41 am by JoeShmo »

John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #17 on: November 02, 2021, 06:47:58 pm »
Inspired by all the interest  :D (thank you!), I've come back to this.
Ace Driver has proved very difficult, but I've managed to get two copies to link up (ignore the third instance), so maybe another update will come this year.



Hydreigon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:October 11, 2023, 09:57:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #18 on: November 02, 2021, 07:30:09 pm »
Done some extensive testing and JB was correct, only a few games work (can't get other games like Cyber Cycles to link for the lolz). I'm starting to feel sorry because of all the setbacks in emulating this device. I personally consider this a supercharged RS232.

It's fair to assume that anything not listed (Drivers eyes, fullscale, RR2, Rave Racer) will NOT work.

It's basically because this device takes up to a 4K block of data and shoves it out over a 1MBit RS232-like interface to another chip, which will write to 4k on that game board.
The chip has various registers that we don't fully understand that are read or written to and each game seems to do something different that I haven't seen before (full scale is maybe the simplest). It also looks like the chip manipulates the data too, just to add to the pain (appending bits onto ends of frames etc). So for every game I have to implement something different -it's almost like I've written 4 different chip drivers so-far!.

I did start to look at Ace Driver and I'll come back to it again at some point.
I'm sure I'll get a better picture once more stuff is working.
What doesn't help is that global comms drops bytes too and I've not worked out a good way to synchonise multiple instances yet (Sega have a 'master' PCB in their linkups, this stuff is just a big loop of identical priority boards). I had some ideas. It'd be great to see more than 2 on a linkup without it falling over.

System2 stuff I couldn't get anywhere with, other than to pass the loopback test in the settings. Made me think it couldn't tolerate any dropped data. I've got a final-lap setup I could fire up one day if I had to.

Anyway, so busy this year I'm not sure if I'll get anything done short-term, but I will at some point

Have you looked at Dirt Dash at all?
No need to because this game doesn't have multiplayer programmed in. Anything link related isn't mentioned in its test mode.

Boomslang

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1063
  • Last login:January 01, 2024, 08:20:43 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #19 on: November 03, 2021, 04:05:08 am »
Inspired by all the interest  :D (thank you!), I've come back to this.
Ace Driver has proved very difficult, but I've managed to get two copies to link up (ignore the third instance), so maybe another update will come this year.

Very cool!

flybynight

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 73
  • Last login:March 22, 2024, 06:30:47 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #20 on: November 03, 2021, 05:08:51 am »
that is amazing you figured out Ace Driver. Well done yet again John.

Are you seeing any pattern in the net code between the different cabs now or is all unique per cab?

There is an Ace Driver delux twin cab on ebay right now going for cheap with dead boards. It could be saved from being scrapped with two PC's running your mame code.......


MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1054
  • Last login:March 24, 2024, 07:22:01 pm
  • As I pass, do I give you the ass or the crotch?
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #21 on: November 03, 2021, 06:48:20 am »
Top work John!

John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #22 on: November 03, 2021, 03:36:27 pm »
Thanks everyone.
that is amazing you figured out Ace Driver. Well done yet again John.

Are you seeing any pattern in the net code between the different cabs now or is all unique per cab?

There is an Ace Driver delux twin cab on ebay right now going for cheap with dead boards. It could be saved from being scrapped with two PC's running your mame code.......

I'm definitely starting to see patterns. I do think some games do use different features of the chip, but I think I'm starting to fill in the holes, so hopefully it gets easier with the next games (I'll try some more system 22 stuff).
However there' still something fundamentally wrong in how I'm doing it - I think I need to solve it to get Ace Driver working correctly and it might also explain why I can't get past 2 players in other games, or the disappearing opponents in the side-screens in Drivers eyes. Interesting challenge to fix anyway, but this would've been 100x easier with a datasheet for the C139 IC.



Jitterdoomer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 58
  • Last login:February 26, 2023, 06:37:11 am
  • I want to build my own arcade controls!
    • Personal Twitter Page
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #23 on: November 06, 2021, 07:55:00 pm »
Have you tried Tokyo Wars? It supports 2-4 players.
For amusement only.

JoeShmo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:December 07, 2021, 11:02:43 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #24 on: November 10, 2021, 11:26:55 pm »
this would've been 100x easier with a datasheet for the C139 IC.

I'm sure you've scoured the internet, and have already seen this... From https://www.mameworld.info/ubbthreads/showflat.php?Cat=&Number=384554&page=&view=&sb=5&o=&vc=1

"Hydreigon" mentions that "I already explained the MB89372 multi protocol controller has no official documentation (and Namco using this chip for their C139)".
Then there is a followup with the datasheet for the MB89372 at https://datasheet.datasheetarchive.com/originals/scans/Scans-059/DSA2IH0049939.pdf
It's also noted that the pinouts for the two ICs differ, so, I'd be curious if it was just re-packaged into the c139 IC.

Given that you've played around with trying to emulate the C139 (and presumably it's "upgrade", the C422), perhaps see if anything you've discovered correlates with the MB89372.  Or maybe you've been down that road already...  :dunno

I'm also guessing you know how token ring works, as you outlined how the chip seems to be "appending bits to end of frames".  Might also explain why drivers eye is dropping frames; if one of the hops thinks that "everyone else" has already seen that data, or it expired, etc..  I would think that when the machine that sent out the data sees it coming back, it would be responsible for stripping it off before adding new stuff and forwarding it on.

Please excuse my rambling, but this is fascinating stuff.  To "see" you deep in the code, trying to reverse engineer and emulate this stuff seems like it would be awesome, although very frustrating!
« Last Edit: November 11, 2021, 12:12:32 am by JoeShmo »

Hydreigon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:October 11, 2023, 09:57:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #25 on: November 13, 2021, 06:07:08 pm »
I compared C139 and MB89372's pinouts as from Final Lap's manual showing the schematics. Unfortunately, the pinouts of the two do not match but both chips were Fujitsu made.

Final Lap schematics: https://www.arcade-museum.com/manuals-videogames/F/FinalLap.pdf

John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #26 on: November 15, 2021, 05:49:39 pm »
Yes, physically that chip is very different to the C139.
The MB has lots of discrete signals to control the operation, whereas the C139 just has eight registers you write to over the parallel bus.
The C139 also interfaces to a 9-bit SRAM IC that the main CPU can only access via the C139. The first half is for outgoing data, the second for incoming. I thought it was 9-bit due to parity, and it might be (that doesn't come into play for emulation), but it is also used as a marker to indicate the end of a packet (which certain games use, but not all, I think). The MB has small internal FIFO buffers instead.
But I've only had a glance and I'll have another read as there are techniques that might be common to both. I should also look at some other UART driver ICs, like those PC used as there'll be common features.
I think I'm close anyway and you don't emulate most of what the chip does anyway (or I'm not) - ultimately you're just working out when to move some bytes from one instance of MAME to another rather than worrying about clock-edges, parity bits and all the other low-level stuff.

As a progress-update, I started to look at Cyber Commando to see if it threw up any new ideas (as I didn't quite resolve why Ace Driver wasn't right). Looks like it uses the chip in an almost identical way. Unfortunately things are hectic with work so I've stopped for a week or so, but I'll get back to it. I'm starting to wonder if there's something fishy going on with global comms - like it can only do one read/write operation per frame, which would cause me a bit of bother as there's a lot more data exchanges than that going on when each board wants to send a packet onto the loop every frame (that would mean each game would expect to receive up to 8 packets of data for an 8-board hookup as each C139 will throw the packet onto the next device in the loop until it's been round them all). Maybe that's not the case with global comms, but I'll look into that next week (promise :-D ) .

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1758
  • Last login:March 22, 2024, 12:55:20 am
  • Is running at 15kHz
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #27 on: November 15, 2021, 10:02:50 pm »
Got Rave Racer running today, pretty awesome. Thanks to JB for the build!

I did try the FFB plugin and can't seem to get it running. Anyone got it working?  After setting Outputs = Windows in MAME.ini, and selecting my wheel from the FFB plugin GUI, is there anything else needed?

TheArcadeStriker

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:December 02, 2021, 03:59:32 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #28 on: November 23, 2021, 12:34:14 pm »
While I have got both games linked up (interestingly enough frameskip seems to work if you apply them to both, so you can use it if the game runs slow from running two instances), Rave Racer doesn't let me accelerate when the race starts for some reason in both instances (the pedal does work at the menus AND before the count ends...but doesn't do so after; the wheel seems to be picked up).

Also Tokyo Wars would be interesting to see; tried it for curiosity but it is true that any other games other than RR2/RVR won't pick up any link stuff as they aren't supported yet.

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1758
  • Last login:March 22, 2024, 12:55:20 am
  • Is running at 15kHz
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #29 on: November 23, 2021, 05:01:35 pm »
Have you tried reversing each or both pedals in the the mame analogue options while the game is running?

John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #30 on: November 25, 2021, 02:56:15 pm »
I've also seen the odd strange instance of controls sticking (had to clear the NVRAM for some baffling reason), although that was just with my more recent attempt, but don't rule anything out.
I've not got any updates as I'm in head-scratching mode right now - still feels like there's a fundamental issue with throwing the packets between instances of MAME and half the data going missing (which bothers most of the games, but not all, hence a small amount work). I'll stick at it, obviously, when I can get a moment.

TheArcadeStriker

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:December 02, 2021, 03:59:32 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #31 on: November 27, 2021, 02:23:49 pm »
I'll have to try clearing the NVRAM when I can. However, something that I've just stumbled with is that, either in auto mode and in xinput mode for joystick provider, I can't control both screens as the unfocused window won't pick up the controls even when they are configured with a different Xinput joystick. I know that its possible from videos using it as well as Virtua Racing, but no idea how can I make controls work on both windows at the same time here.

EDIT: For some reason Global Inputs weren't enabled in the MAME cfg by default (found the line to change just a second); could save some time for people that set this up for the first time to have global inputs enabled by default lol

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1054
  • Last login:March 24, 2024, 07:22:01 pm
  • As I pass, do I give you the ass or the crotch?
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #32 on: November 29, 2021, 12:15:02 pm »
I'll have to try clearing the NVRAM when I can. However, something that I've just stumbled with is that, either in auto mode and in xinput mode for joystick provider, I can't control both screens as the unfocused window won't pick up the controls even when they are configured with a different Xinput joystick. I know that its possible from videos using it as well as Virtua Racing, but no idea how can I make controls work on both windows at the same time here.

EDIT: For some reason Global Inputs weren't enabled in the MAME cfg by default (found the line to change just a second); could save some time for people that set this up for the first time to have global inputs enabled by default lol

Hrrm, that's weird. I've got Global Inputs enabled in the MAME ini, but when I tried controlling the two screens with two different Xinput controllers awhile back, only the in-focus window would work. The global inputs being on would allow one controller and one person using the keyboard on the other screen, but not both controllers.

TheArcadeStriker

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:December 02, 2021, 03:59:32 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #33 on: December 02, 2021, 03:59:32 pm »
I think it might happen to require DInput for multiple joystick pickup as well, since in my case it also refused to pick up xinput contrllers on unfocused windows, so I had to use keyboard on unfocused screen. At least I can confirm it works though; must see if I can test Rave Racer properly one day (also I saw your videos with slowdown, try disabling HLSL since it seems you didn't to have more speed; if that doesn't help then just use frameskip for both windows)

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1054
  • Last login:March 24, 2024, 07:22:01 pm
  • As I pass, do I give you the ass or the crotch?
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #34 on: December 06, 2021, 10:48:12 am »
Yeah, thanks mate, I saw your comment about disabling HLSL and using Frame skip. It definitely made a difference bin terms of keeping the 2 screen Ridge Racer in-sync.

John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #35 on: December 07, 2021, 07:39:58 am »
 I've got to confess, I don't know what's going on with MAME and inputs. At one stage I had to focus a window to control an instance of the game. Now it controls all instances simultaneously, which is a bit annoying when I just want to mess with one.

I'm still looking at this code almost daily, just slowed a bit due to other commitments. I've kinda ripped it all apart to work out better what's going on with both the games and the global inputs data transfer, so it might take a while.

Yep, HLSL doesn't achieve much as this stuff is 640x480 interlaced, so doesn't really cry out for thick scanlines and screen burn. My original videos were painfully slow as I had a crap PC and it was also running the games on one instance of MAME back then. Fullscale runs at full speed on my new PC .

JoeShmo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:December 07, 2021, 11:02:43 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #36 on: December 07, 2021, 11:36:38 am »
John,
Would it help your reverse-engineering efforts if you had two actual RR2 boardsets?  You could hook up an oscilloscope to see/decode the packets between the two systems, and/or monitor input/output on the pins to get a better idea of what's going on.  But I think that alone would be quite the setup.  You'd also have to build out most of the rest of the controls/video to get both games fired up, and a linked game started.

If you lived in the US, I'd have no problem giving you both my RR2 boardsets, as outside the US, I'd imagine shipping would be insane.  Just throwing it out there... I've got my RR2 twin cab converted to mame, so no need for these boardsets.

John Bennett

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:February 22, 2023, 05:38:11 pm
  • I want to build my own arcade controls!
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #37 on: December 08, 2021, 06:52:11 am »
John,
Would it help your reverse-engineering efforts if you had two actual RR2 boardsets?  You could hook up an oscilloscope to see/decode the packets between the two systems, and/or monitor input/output on the pins to get a better idea of what's going on.  But I think that alone would be quite the setup.  You'd also have to build out most of the rest of the controls/video to get both games fired up, and a linked game started.

If you lived in the US, I'd have no problem giving you both my RR2 boardsets, as outside the US, I'd imagine shipping would be insane.  Just throwing it out there... I've got my RR2 twin cab converted to mame, so no need for these boardsets.

That's a very kind offer (and also nice to be reminded you can now run without boardsets due to all this emulation tinkering).
I'd say I'm ok though, thanks. I put a loopback on Rolling Thunder 2 a while ago to scope the comms (in the test mode) and that gave me the basic gist of what's going on.
Incase I needed more, I bought a Final Lap dual boardset I could wire-up.
But I haven't  needed to yet...- I tend to find just using the MAME debugger and a text window (turn on 'verbose' in the mame cfg and you can see some of my debugs) and I can get a good enough idea of what's going on. It's about stepping through the game code and commenting it, in order to work out what it's expecting from the chip, in terms of where data should be. I effectively need to see what the comms IC has to do in order to keep the game code happy.

I'm starting to think the 'loop' is purely a software thing. One board sends to the next, then the game code has to take the data and put it back into the comms IC buffer to send to the third board. I'd previously assumed this was automated. So might have made a little progress - I think there's something fundamental like this which is stopping 3/4 of the games from working.

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1054
  • Last login:March 24, 2024, 07:22:01 pm
  • As I pass, do I give you the ass or the crotch?
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #38 on: December 11, 2021, 05:42:59 pm »
I've got to confess, I don't know what's going on with MAME and inputs. At one stage I had to focus a window to control an instance of the game. Now it controls all instances simultaneously, which is a bit annoying when I just want to mess with one.

I can solve that one for you mate, if you turn global inputs on in your MAME.ini (at the very bottom of the text document) file it gives you simultaneous control over all your MAME windows. If you set it to '0' to turn it off, you can only affect the window you've got in focus.

Quote
# INPUT DEVICE OPTIONS
#
global_inputs             1
dual_lightgun             0

vandale

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 408
  • Last login:October 10, 2023, 04:01:16 am
  • Id 10 and t error
Re: Ridge Racer 2 and Rave Racer link play working in MAME WIP test build.
« Reply #39 on: March 30, 2022, 04:26:53 am »
Just set this up on my twin, runs great, thanks for all the hardwork  :notworthy: