Build Your Own Arcade Controls Forum
Software Support => GroovyMAME => Topic started by: chukione on April 23, 2016, 08:30:55 pm
-
hi. new here.
it was a lot of docs to read.
why? because im more confortable with debian than with arch, and i already have a debian box serving files via nfs.
first get the kernel sources and the 15khz patches :
cd /usr/src
wget [url]https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.2.tar.gz[/url]
tar xvf linux-4.2.tar.gz
get the patches:
wget [url]https://github.com/philenotfound/linux-stable-15khz/commit/36c95067a5248e0609a568f5d0f414daaa46c6c2.patch[/url] -O linux-4.2.diff
wget [url]https://github.com/philenotfound/linux-stable-15khz/commit/80bc22d36821ae8c230b4acb2b353b82227afb25.patch[/url] -O ati9200_pllfix-3.19.diff
wget [url]https://github.com/philenotfound/linux-stable-15khz/commit/d1f0f9de24f0ce522ebecada214a9bd2675bc7e6.patch[/url] -O avga3000-3.19.diff
patch the sources:
cd linux-4.2 linux/
patch -p1 < ../ati9200_pllfix-3.19.diff
patch -p1 < ../avga3000-3.19.diff
patch -p1 < ../linux-4.2.diff
also i patch the usb hid because my joystick (mamepanel) appear like only one joystick device insted of two:
http://vusb.wikidot.com/project:mamepanel (http://vusb.wikidot.com/project:mamepanel)
(http://i.imgur.com/urx0Jp3.jpg)
diff -Naur a/linux-4.2/drivers/hid/hid-ids.h b/linux-4.2/drivers/hid/hid-ids.h
--- a/linux-4.2/drivers/hid/hid-ids.h 2015-08-30 13:34:09.000000000 -0500
+++ b/linux-4.2/drivers/hid/hid-ids.h 2016-04-23 18:14:53.727452169 -0500
@@ -1033,4 +1033,7 @@
#define USB_DEVICE_ID_RAPHNET_2NES2SNES 0x0002
#define USB_DEVICE_ID_RAPHNET_4NES4SNES 0x0003
+#define USB_VENDOR_ID_MULTIPLE_16C0 0x16c0
+#define USB_DEVICE_ID_MAME_PANEL 0x05df
+
#endif
diff -Naur a/linux-4.2/drivers/hid/usbhid/hid-quirks.c b/linux-4.2/drivers/hid/usbhid/hid-quirks.c
--- a/linux-4.2/drivers/hid/usbhid/hid-quirks.c 2015-08-30 13:34:09.000000000 -0500
+++ b/linux-4.2/drivers/hid/usbhid/hid-quirks.c 2016-04-23 18:14:53.730785501 -0500
@@ -148,6 +148,7 @@
{ USB_VENDOR_ID_MULTIPLE_1781, USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD, HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES, HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT },
+ { USB_VENDOR_ID_MULTIPLE_16C0, USB_DEVICE_ID_MAME_PANEL, HID_QUIRK_MULTI_INPUT },
{ 0, 0 }
};
install the dependencies:
apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc kernel-package
copy the .config from the Groovyarcade livecd to the sources and create the package:
fakeroot make-kpkg --initrd --revision=1.0-15khz kernel_image kernel_headers
dpkg -i linux-image-4.2.015khz_1.0-15khz_amd64.deb
reboot with the new kernel, now build groovymame:
wget [url]https://github.com/mamedev/mame/releases/download/mame0171/mame0171s.zip[/url]
get the groovymame patches:
wget [url]https://54c0ab1f0b10beedc11517491db5e9770a1c66c6.googledrive.com/host/0B5iMjDor3P__aEFpcVNkVW5jbEE/v0.171_015m/0171_groovymame_015m.diff[/url]
wget [url]https://54c0ab1f0b10beedc11517491db5e9770a1c66c6.googledrive.com/host/0B5iMjDor3P__aEFpcVNkVW5jbEE/v0.171_015m/hi_0171.diff[/url]
convert the patches to unix filetypes:
dos2unix 0171_groovymame_015m.diff hi_0171.diff
and patch the mame sources:
patch -p0 < ../hi_0171.diff
patch -p0 < ../0171_groovymame_015m.diff
install mame dependencies:
apt-get build-dep mame
apt-get install qt5-default qtbase5-dev qtbase5-dev-tools
uncoment and change QT_HOME in the makefile to
QT_HOME = /usr/lib/x86_64-linux-gnu/qt5/
now build groovymame
make
at this point you end with a groovymame binary, in my case mame64, now is time to test if it change the resolution and the frecuency to 15khz, exec ./mame64 and connect your 15khz screen and test.
(http://i.imgur.com/QdIJd7A.jpg)
in my case im using a ati hd4350 patched using atom15:
(http://i.imgur.com/LqNuiM8.jpg)
http://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=64 (http://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=64)
now to to boot the desktop to 15khz directly we need switchres:
http://switchres.groovyarcade.googlecode.com/git-history/4792d82514fd846bb8d3bcf657ea27d0080ffae4/SwitchResLinux-1.52/?r=4792d82514fd846bb8d3bcf657ea27d0080ffae4 (http://switchres.groovyarcade.googlecode.com/git-history/4792d82514fd846bb8d3bcf657ea27d0080ffae4/SwitchResLinux-1.52/?r=4792d82514fd846bb8d3bcf657ea27d0080ffae4)
http://forum.arcadecontrols.com/index.php?action=dlattach;topic=106405.0;attach=308813 (http://forum.arcadecontrols.com/index.php?action=dlattach;topic=106405.0;attach=308813)
build and install to /usr/local/bin
now build an edid suitable for your screen:
switchres64 640 480 60 --monitor arcade_15 --edid
copy the generated edid file to /lib/firmware/edid/ directory
cp edid.bin /lib/firmware/edid/edid-15khz.bin -v
create the file /etc/modprobe.d/drm-kms-helper.conf with this content:
options drm_kms_helper edid_firmware=edid/edid-15khz.bin
conect again your 15khz screen and reboot, you get a nice 15khz desktop:
(http://i.imgur.com/FjTe850.jpg)
now is time to do what yo want, maybe install a mame frontend. in my case i need to adjust the overscan on the and a comet tail problem on my pvm.
(http://i.imgur.com/k7KUlAo.jpg)
(http://i.imgur.com/XdaNq1o.jpg)
(http://i.imgur.com/uC16zwY.jpg)
-
I'm thinking Debian (Stretch) might be a good candidate for a next LiveCD release (If anyone is willing to take on the project).
While ArchLinux is great, Debian's "alternate" application support allowing multiple versions of applications is very convenient.
Example:
Currently on my Debian Stretch Workstation I have
GCC 4.9, G++ 4.9 (To compile older version of Mame)
GCC 5, G++ 5 (To compile current version of Mame)
QT-5 (To compile 1.69+ versions of Mame)
QT-4 (To compile 1.48u2+ versions of Mame)
gtk2 (To compile 1.48u1- versions of Mame)
SDL1 is 1.2.15 (To compile 1.55- versions of Mame)
SDL2 is 2.0.4 (To compile 1.56+ versions of Mame)
Kernel is 4.5.0
-
If were instructions for running the pc2jamma interface your how to would be very useful for me (and other for sure) since I'm having trouble upgranding groovyarcade and I'm trying your method.
Here is a typo, missing "s" at the end: fakeroot make-kpkg --initrd --revision=1.0-15khz kernel_image kernel_header
And [url)[/url) must be removed in order to make wget work
Mus note too this is only for 4.2 kernel
After all succesfull steps my Linux does not found new kernel at boot (shift pressed and other attempts done...). Now trying Tiben approach: https://github.com/TiBeN/15khz-arcade-pkg
Since I'm new to Linux systems I'm having tons of fun!!! :banghead:
-
Thank you very much chukione, this is just what I was looking for. Like you, I prefer Debian over Arch.
Your aproach seems very clean and elegant.
Just a couple of questions please:
1) I thought that patching the video drivers was also necessary. It's not with your aproach? Why not?
2) And, please, can you clarify this part?:
"copy the .config from the Groovyarcade livecd to the sources and create the package"
Thanks for share!
-
hi.
1- the module for the card is already included in the kernel, the patch is in this file:
ati9200_pllfix-3.19.diff, https://github.com/philenotfound/linux-stable-15khz/commit/80bc22d36821ae8c230b4acb2b353b82227afb25.patch
2- i run the las groovyarcade live cd on a virtualbox vm, and then i copy the running kernel config from /proc/config.gz, gunziped to the kernel sources, and i dont remember, but i think i do a "make oldconfig"