DIY Pi2Jpac Jamma Adapter

Zipper

User
Credits
76CR
I'm getting there, but needed to fiddle around to get the USB sound working so am feeding this back hoping it's helpful...

After setting up my wifi (and not clicking any other menu items), I had a look around and notice I'm not set up for usb sound in the menu config:

pi@JammaPiThingy:/etc $ grep usbsound /boot/menu.cfg

usbsound="no"

However the menu offers to disable it (rather than enable):

pi@JammaPiThingy:/etc $ grep toggleusbsound /home/pi/.attract/romlists/servMenu.txt

toggleusbsound;Disable USB Sound;servMenu;;;;;;;;;;;;;;

... and there isn't any 'live' asound.conf file. Just this one:

pi@JammaPiThingy:/etc $ ls -alrt asound*

-rw-r--r-- 1 root root 80 Feb 1 2018 asound.conf.onboard

When I look at that file, it actually looks like it's the USB settings, rather than onboard (card1)...

pcm.!default {

type hw

card 1

}

ctl.!default {

type hw

card 1

}

... so I renamed it to asound.conf, and USB sound works.
 

chunksin

Active member
vacBacker
Feedback
21 (100%)
Credits
733CR
Zipper said:
I'm getting there, but needed to fiddle around to get the USB sound working so am feeding this back hoping it's helpful...

After setting up my wifi (and not clicking any other menu items), I had a look around and notice I'm not set up for usb sound in the menu config:

pi@JammaPiThingy:/etc $ grep usbsound /boot/menu.cfg

usbsound="no"

However the menu offers to disable it (rather than enable):

pi@JammaPiThingy:/etc $ grep toggleusbsound /home/pi/.attract/romlists/servMenu.txt

toggleusbsound;Disable USB Sound;servMenu;;;;;;;;;;;;;;

... and there isn't any 'live' asound.conf file. Just this one:

pi@JammaPiThingy:/etc $ ls -alrt asound*

-rw-r--r-- 1 root root 80 Feb 1 2018 asound.conf.onboard

When I look at that file, it actually looks like it's the USB settings, rather than onboard (card1)...

pcm.!default {

type hw

card 1

}

ctl.!default {

type hw

card 1

}

... so I renamed it to asound.conf, and USB sound works.

My bad, there should be 2 files, an asound.conf and an asound.conf.onboard or asound.conf.usb depending on what option is enabled, card 0 is onboard and card 1 is USB. The script in the background updates the option file for the service menu. Thought I'd fixed this as there was a bug in v5.2, thanks for pointing it out, I'll get it fixed in the next version.
 

Zipper

User
Credits
76CR
Thanks Chunksin
smiley20.gif


Bytestorm said:
this looks awesome!! just wish we get RPI4 soon so we can use a newer mame :/.
Thanks for sharing!

It really is great. Likewise - really looking forward to seeing what they can do with a PI 4.

Windows Groovymame is great, but Windows has blue screened / failed on me too many times now. How trivial things like a driver issue, cmos battery change etc. can send the entire OS and GUI into an unrecoverable collapse is beyond me. Linux all the way for my mame from now on I think.
 

Zipper

User
Credits
76CR
Just a quick bit of feedback incase anyone needs it. My monitors (MS8 and MS9) just cannot sync with a few advancemame games that have a "height greater than 248"... These include NBA Jam, Kung Fu Master amongst others.
To get around it, you can comment out these lines in /boot/launchers/advmame.sh:

# if [ $h -gt 248 ]; then

# echo switching to 256p

# vcgencmd hdmi_timings 1920 1 113 192 175 256 1 6 3 16 0 0 2 56 0 37560000 1

#vcgencmd hdmi_timings 1888 1 48 184 232 278 1 3 10 6 0 0 0 55 0 38400000 1

# tvservice -e "CEA 65 HDMI"

# fbset -depth 8 && fbset -depth 16

# fbset -g 960 256 960 256 16

# else

echo switching to 240p

tvservice -e "CEA 8 HDMI"

fbset -depth 8 && fbset -depth 16

fbset -g 720 240 720 240 16

# fi




Or you can drop a rom in mame078 etc.
 

Flinnster

The Dino King
vacBacker
Feedback
29 (100%)
Credits
2,566CR
Zipper said:
Just a quick bit of feedback incase anyone needs it. My monitors (MS8 and MS9) just cannot sync with a few advancemame games that have a "height greater than 248"... These include NBA Jam, Kung Fu Master amongst others.
To get around it, you can comment out these lines in /boot/launchers/advmame.sh:

# if [ $h -gt 248 ]; then

# echo switching to 256p

# vcgencmd hdmi_timings 1920 1 113 192 175 256 1 6 3 16 0 0 2 56 0 37560000 1

#vcgencmd hdmi_timings 1888 1 48 184 232 278 1 3 10 6 0 0 0 55 0 38400000 1

# tvservice -e "CEA 65 HDMI"

# fbset -depth 8 && fbset -depth 16

# fbset -g 960 256 960 256 16

# else

echo switching to 240p

tvservice -e "CEA 8 HDMI"

fbset -depth 8 && fbset -depth 16

fbset -g 720 240 720 240 16

# fi




Or you can drop a rom in mame078 etc.

I have a feeling that this will simply disable that 256p mode timing, meaning games over 240 vertical res will have bits missing from the bottom. ie. the 'beam' bar and score on R-Type 1 & 2.

Did you try uncommenting just the 1888 timing mode line, and commenting out the 1920 one?
Flinnster2019-02-08 18:27:19
 

Kev A

Active member
vacBacker
Feedback
8 (100%)
Credits
744CR
Managed to get my setup in the cab and all up and running, thanks for all the work on this guys.

Just one question regarding racing games, chase hq etc, how on earth do you get the hi/low shifter to function, I can kind of get it to work in some games by holding button 3, is there a way to get a button to toggle hi/low?

I'm using ADVMAME 106 for these games.
 

Flinnster

The Dino King
vacBacker
Feedback
29 (100%)
Credits
2,566CR
Good stuff.

Sadly what you are talking about is due to the mechanical design of the driving cabs. Some sat on a switch when 'hi' (so in mame need a button to be held down). Others swiped past a switch mid gearchange (so in mame you just tap the button and toggle up/down).

Without some kind of extra control layer, I think you'll just need to put up with holding down a button on chase HQ. Or.. make yourself a repro control panel with a similar style gearstick mech.
 

ColinD

Active member
Feedback
6 (86%)
Credits
1,367CR
You could modify the source code by removing the 'toggle' part in the various machine drivers and doing a rebuild (worked for me years ago) and there was also a driving cab build of mame.
 

Flinnster

The Dino King
vacBacker
Feedback
29 (100%)
Credits
2,566CR
Very niche feature! So you can turn the toggle off so it's a 'hold down'... but not the reverse?

Ie. turn a hold down gearshift to to a toggle by using toggle=”yes” for use on ChaseHQ
Flinnster2019-02-15 13:51:11
 

Kev A

Active member
vacBacker
Feedback
8 (100%)
Credits
744CR
Ah cool, I will have a play around with it later, I might try one of the later flavours of MAME on there too, see if its any different. Its just in a BAS cab so its mainly for stick games but still nice to have a couple of driving games on there to mess about with. I was having lots of issues with my bootleg GA so decided to give this a go instead. and it works great, really nice that it boots straight into the game too.
 

Zipper

User
Credits
76CR
Flinnster said:
I have a feeling that this will simply disable that 256p mode timing, meaning games over 240 vertical res will have bits missing from the bottom. ie. the 'beam' bar and score on R-Type 1 & 2.

Did you try uncommenting just the 1888 timing mode line, and commenting out the 1920 one?

Yeah - drops to 240p instead, but i'm happy with that. Nothing missing on the picture (that I can notice), but it's having to emulate these games at a less appropriate resolution i guess.

I did try the other commented out mode, but with no luck.

I'm more than happy though! I plugged an i-pac into the Pi and have it plugged into my 4 player cab (the groovymame setup died). I love it! Advancemame and this image is superb.
 

karlcdoe

Active member
vacBacker
Feedback
7 (100%)
Credits
879CR
Zipper said:
I'm getting there, but needed to fiddle around to get the USB sound working so am feeding this back hoping it's helpful...

<snip>

... so I renamed it to asound.conf, and USB sound works.

Perfect! That just saved me further flailing around trying to work out why I couldn't get any sound out of the beast. Cheers.
 

Kev A

Active member
vacBacker
Feedback
8 (100%)
Credits
744CR
Just to update, it seems FBA default's to shifting using the toggle action, rather than having to hold down the button. Makes it much easier.
 

chunksin

Active member
vacBacker
Feedback
21 (100%)
Credits
733CR
Brief update: I've been working on adding analog inputs directly to the raspberry pi using an add on board called an analog zero https://rasp.io/analogzero/ - you can add analog sticks, driving cab pots, homebrew spinners etc .. to add more functionality to your setup. It's a nice small form factor and can just be installed onto the GPIO pins of the pi so is perfect for the DIY solution, no modifications needed!

The new code is still in testing and will be ready soon as an add-on module, it creates new analog joystick devices that work in the various versions of mame included in the image.

I'm also working with some custom Arduino firmware that will run on the Leonardo/Uno/Mega2560/ProMicro to provide analog and digital inputs plus LEDWiz compatible outputs over USB, this takes a bit more work to get running but has the advantage of offloading the input processing to an external board.
 

chunksin

Active member
vacBacker
Feedback
21 (100%)
Credits
733CR
Kev A said:
Just to update, it seems FBA default's to shifting using the toggle action, rather than having to hold down the button. Makes it much easier.

Flinnster and I had some fun with this the other weekend getting a driving cab working with the pi, the default setting in most of the emulators in the image are gear shift as a toggle which is great if you are using a controller or keyboard but not so good on original hardware! As Flinnster says the original cab design had a single switch to activate the gears - switch not being pressed = low gear and switch being held down = high gear. In practice this means when you change up to high gear the switch is being held down but not released so the gear never changes until you change back into low and then low=high!

To get around the issue I wired the gear switch directly to the GPIO on the pi and monitored the connected pin for state changes via interrupt, if the pin goes low or high a keyboard press and release is sent to change the gear, worked really well!

The toggle=no setting would have fixed this but didn't get into mainstream mame until version .151 so way after advmame .106 and sadly the game we wanted to emulate doesn't play very well at all in mame 172 or FBA
smiley19.gif


Still, the new shifter code will be going in to the next release as part of the analog support update
smiley4.gif
 
Top