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 --- Bug Reports --- Site News

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

  

Author Topic: Ridge Racer 2 twin cab conversion  (Read 3342 times)

0 Members and 1 Guest are viewing this topic.

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!
Ridge Racer 2 twin cab conversion
« on: October 25, 2021, 10:18:31 am »
Picked up this cabinet to do a conversion.  Right hand side CRT did not work, so I ordered an 8200 converter board, and hooked up a 20 inch 4:3 LCD I had kicking around, and got it to work.  Not sure why, as I plan to take the game out.
Side of the cabinet says "Ridge Racer 2", yet the marquee says Rave Racer.  Unfortunately, it is indeed a Ridge Racer 2, so only one map (well two, as one of the race options lets you play the extended version of that map).  But, will be converted to Emulation, so the existing board set is sort of moot.

The cabinet is sort of primitive, its ONE piece, except for the seats.  I should have held out for two individual cabs of some flavor that had adjustable seats, force feedback, and other such bells and whistles.  But, I got a deal on this one, so... ehhh..  maybe I'll build my own later.

I'm using linux in multiseat mode (using one PC with dual monitors/inputs to allow two users to play at once).  So far, just MAME running, as I get things setup, PC is still on the bench as I get the fundamentals working.

PC:
  Linux Ubuntu 20.10
  AMD 5700G
  Video: Onboard plus another radeon for player 2
  Two A-PAC controllers to convert cabinet controls to USB.

I still have not found an easy, straight forward frontend for mame, and various other emulators.  Most front-end projects seem to be defunct.  If I get fed up with everything, I may have to just go with windows and use LaunchBox.


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 twin cab conversion
« Reply #1 on: October 25, 2021, 11:11:21 am »
For anyone interested in running two (or more?) "cabinets" off of one system, and/or setting up Linux for mame, here's what I did:
(note, this guide assumes you know how to move around, and install anything missing in linux (i.e. brctl, ifconfig, etc..)

Linux Setup:
Install your Linux of choice (I decided to go with Ubuntu; (I'm using Debian as my desktopOS))

apt install mame
roms go in /usr/local/share/games/mame/roms/
copy some roms in the above folder (as zip files), and copy the CHD directories into that folder as well (retaining the directory, so /usr/local/share/games/mame/roms/sf2049se/ contains the CHD and such).
I'm using this, kind of long directory as it's the default for mame, and allows other users (other than root) to access these games, all config overrides are done in the user's directory, including additional roms if you'd like.
Run mame...  it should work.

Single Computer, two players (Linux MultiSeat setup)
Now the fun part... MultiSeat; you'll need two video cards for this (can't use a single card with multiple outputs... I wish... well.. theres xephyr, but that's a long twisty road).

look at all the devices that "seat0" owns, which is basically, everything in the system.
loginctl seat-status seat0
pipe the above command through grep to find "drm", which are usually the video cards.  You'll have card0 and card1.  Lets give the second card to seat1, your pci location will vary, on mine:
loginctl attach seat1 /sys/devices/pci0000:00/0000:00:12.0/drm/card1

For my setup, I used a USB hub, and connected keyboard, mouse, 2nd A-PAC, and a USB audio device to it, so I could then just assign that hub to seat1 (Player 2)
example that worked for me:
loginctl attach seat1 /sys/devices/pci0000:00/0000:00:2.0/usb1  (just keyboard, I couldnt find a second mouse)

Create the users, setup autologin, and auto run:
create two users; I created "player1" and "player2".

I could not get autologin to work with gdm3 (default), so I installed lightdm:
apt install lightdm
switch default to lightdm when prompted

edit /etc/lightdm/lightdm.conf.d/10-autologin.conf:
Code: [Select]
[Seat:seat0]
autologin-user=player1

[Seat:seat1]
autologin-user=player2

Next, reboot, and cross your fingers.  When the system comes back up, you should have what LOOKS like two mirrored screens.  Move the mouse on one, and see that the other is unaffected.  Go ahead and run mame.  The other monitor stays at a desktop.  On the other keyboard/mouse, run mame on that session as well.

You should now have mame running twice.  To make things easier, we'll just setup to run mame as soon as the user "logs in", although, we enabled auto-login anyway...
create the file ~/.xprofile for each user, and just have a single statement in it of "mame &" (which will launch mame in background, allowing the script to exit cleanly).
(Ideally, instead of running mame, run your front-end of choice, but I havn't gotten that far yet)


Networking:
OMG, this was painful!
Mame looks for tun devices on linux as "tap-mess-<uid>-0" where <uid> is the userid that has access to that device.  Since both instances of mame are on the same computer, I don't need to talk to the network really, so I can cheat and create the two interfaces, and bridge them together.
Based on information at https://wiki.mamedev.org/index.php/Driver:Apollo#How_to_set_the_network_capabilities and snippets from http://forum.arcadecontrols.com/index.php?topic=161667.0 to setup the game itself, I was able to get it to work.

Here's what I came up with for my networking script:
Code: [Select]
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
chmod 666 /dev/net/tun

##Player1
ip -f link tuntap add dev tap-mess-1001-0 mode tap user player1 pi
ip link set tap-mess-1001-0 up arp on
ifconfig tap-mess-1001-0 192.168.1.1

##Player2
ip -f link tuntap add dev tap-mess-1002-0 mode tap user player2 pi
ip link set tap-mess-1002-0 up arp on
ifconfig tap-mess-1002-0 192.168.1.2

brctl addbr br0
brctl addif br0 tap-mess-1001-0
brctl addif br0 tap-mess-1002-0
ifconfig br0 up

I put the above script in /etc/rc.local then enabled rc-local in systemd.

note, interfaces will show NO-CARRIER until mame actually opens them up.

BTW, I verified network play using SanFrancisco Rush 2049 Special Edition.. NOT Ridge Racer.. Ridge/Rave Racer networking is still a WIP as of this writing.

More on this stuff as I continue.  Jury is still out on if I'll keep this setup, or switch to virtual machines, or use windows, or what...

« Last Edit: October 27, 2021, 12:41:20 am by JoeShmo »

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 twin cab conversion
« Reply #2 on: October 27, 2021, 12:23:29 am »
Controller Setup
I'm using the Ultimarc A-Pac controller interface with the standard arcade steering wheel (HAPP).  Instructions found at https://www.ultimarc.com/control-interfaces/a-pac/a-pac/ 
The board will automatically figure out the value of the potentiometer, and adjust accordingly.  I still had to go into SF Rush's test menu and calibrate for limits.

One thing to note is you'll have to restart the A-PAC if it turned on WITHOUT the steering wheel connected (I had just the board connected just to verify Linux saw it, and to assign it to the right "seat".).  So at first, the wheel reported zero, and reported no movement at all until full lock, at which it reported 1024.  This was because with nothing hooked to A-PAC at boot, it was treating those inputs as buttons (digital) instead of the wheel (analog).

(So far, just the wheel, as the game itself is out in the garage, and the wheel was easily removed, so I can bring it in to my bench to hook it up for proof of concept).

So far, the A-PAC is plug and play, no drivers, or any OS config needed, it just worked.

Update: Added pic of A-PAC after the pedals (only have gas and brake).  Green wire is center tab of the Gas potentiometer, and Blue wire is center tab of Brake potentiometer.  BOTH pots have their "first" pin connected to eachother (represented by the black wire on upper left), and "third" pins connected (red wire), I did not bother jumpering the red wire over to the 3rd analog port (upper right), yet it still worked.  (And I think thats a big piece of dust just above the capacitor on the bottom)

« Last Edit: November 10, 2021, 10:03:31 pm by JoeShmo »

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7787
  • Last login:Yesterday at 05:41:39 am
Re: Ridge Racer 2 twin cab conversion
« Reply #3 on: October 27, 2021, 10:03:32 am »
Really cool project.  Always wished I had room for a racing cabinet...

Namco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 620
  • Last login:June 01, 2022, 12:11:40 pm
  • Now addicted to Williams pins... all of them.
    • Freddo Mame Project
Re: Ridge Racer 2 twin cab conversion
« Reply #4 on: November 02, 2021, 01:02:22 pm »
Great write-up. Thanks for documenting this as I love Ridge Racer/Rave Racer. It looks like there's no FFB motor on this one despite it having been an original RR2? I wonder how much of a pain getting that working in emulation would be? Does the FFB plugin work with arcade motors?

Anyway, can't wait to see it all working, that's a beautiful cabinet.

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 twin cab conversion
« Reply #5 on: November 10, 2021, 09:51:37 pm »
@javeryh, I always wanted a cabinet too, and I STILL don't have the space, thus, it's in the garage...  Saw it come up for sale, and just had to get it. lol..
@Namco, As far as I know, Ridge Racer 1 and 2 did not have FFB, but SOME of the Rave Racers did(?)  I'm still perplexed by this having a Rave Racer marquee.
As for FFB and Mame, nipsmg was setting it up over here:  http://forum.arcadecontrols.com/index.php/topic,162932.msg1717985.html#msg1717985 with his SF Rush wheel (with FFB).  I THINK there might be enough room for the motors in my wheels, ideally, if I can get ahold of some Rush wheels, or I think the cruisin series had FFB, I could go that route, replacing the whole wheels.  Since the RR2 controls ONLY have a sequential shifter, it might be nice to have an H shifter and/or a few buttons kicking around, as I currently need to see if I can drill some holes on the panel on the left and see if I can fit some buttons in there (view, music, abort, coin, etc...)  We'll see.

Since I'm a native Linux user, I am really wondering if I can get FFB to work in Linux, as pure guess is that the drivers and such are for windows.  I may have to see if I can do it in WINE or something, at least then I can run LaunchBox.  it just kills me to have to do that though.

As for progress, I've replaced BOTH monitors now with flat panels.  The one on the right is a Dell 3007wfp (30 inch 16:10), and looks awesome, but exceeds the alotted space by about 1/2 inch, and removing the bezel won't help, as the screen itself has a metal border.  The display on the left is an Acer AL2216w (22 inch, 16:10).  I'll probably see if I can find two 27 inch that are 16:10, or another Dell 3007 (or 3008) and just have them overlap a little.

I still had the right-hand steering wheel in the house when I took this picture, I should re-take this with both wheels!  But was sort of just proofing everything out, and getting the actual computer out there, and hooking up things, and playing on the one side.  Navigating without a keyboard and mouse was sort of impossible, so had to bring those out as well.