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: how i get running groovymame at 15khz on gnu/linux debian  (Read 4622 times)

0 Members and 1 Guest are viewing this topic.

chukione

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:July 15, 2016, 08:42:44 pm
  • I want to build my own arcade controls!
how i get running groovymame at 15khz on gnu/linux debian
« 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 :
Code: [Select]
cd /usr/src
Code: [Select]
wget [url]https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.2.tar.gz[/url]
Code: [Select]
tar xvf linux-4.2.tar.gz
get the patches:
Code: [Select]
wget [url]https://github.com/philenotfound/linux-stable-15khz/commit/36c95067a5248e0609a568f5d0f414daaa46c6c2.patch[/url] -O linux-4.2.diff
Code: [Select]
wget [url]https://github.com/philenotfound/linux-stable-15khz/commit/80bc22d36821ae8c230b4acb2b353b82227afb25.patch[/url] -O  ati9200_pllfix-3.19.diff
Code: [Select]
wget [url]https://github.com/philenotfound/linux-stable-15khz/commit/d1f0f9de24f0ce522ebecada214a9bd2675bc7e6.patch[/url] -O avga3000-3.19.diff
patch the sources:
Code: [Select]
cd linux-4.2 linux/
Code: [Select]
patch -p1 < ../ati9200_pllfix-3.19.diff
Code: [Select]
patch -p1 < ../avga3000-3.19.diff
Code: [Select]
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



Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
fakeroot make-kpkg --initrd --revision=1.0-15khz kernel_image kernel_headers
Code: [Select]
dpkg -i linux-image-4.2.015khz_1.0-15khz_amd64.deb
reboot with the new kernel, now build groovymame:

Code: [Select]
wget [url]https://github.com/mamedev/mame/releases/download/mame0171/mame0171s.zip[/url]
get the groovymame patches:
Code: [Select]
wget [url]https://54c0ab1f0b10beedc11517491db5e9770a1c66c6.googledrive.com/host/0B5iMjDor3P__aEFpcVNkVW5jbEE/v0.171_015m/0171_groovymame_015m.diff[/url]
Code: [Select]
wget [url]https://54c0ab1f0b10beedc11517491db5e9770a1c66c6.googledrive.com/host/0B5iMjDor3P__aEFpcVNkVW5jbEE/v0.171_015m/hi_0171.diff[/url]
convert the patches to unix filetypes:

Code: [Select]
dos2unix 0171_groovymame_015m.diff hi_0171.diff
and patch the mame sources:

Code: [Select]
patch -p0 < ../hi_0171.diff
Code: [Select]
patch -p0 < ../0171_groovymame_015m.diff
install mame dependencies:

Code: [Select]
apt-get build-dep mame
Code: [Select]
apt-get install qt5-default qtbase5-dev qtbase5-dev-tools
uncoment and change QT_HOME in the makefile to
Code: [Select]
QT_HOME = /usr/lib/x86_64-linux-gnu/qt5/
now build groovymame
Code: [Select]
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.



in my case im using a ati hd4350 patched using atom15:



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://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:

Code: [Select]
switchres64 640 480 60 --monitor arcade_15 --edidcopy the generated edid file to /lib/firmware/edid/ directory

Code: [Select]
cp edid.bin /lib/firmware/edid/edid-15khz.bin -v
create the file /etc/modprobe.d/drm-kms-helper.conf with this content:

Code: [Select]
options drm_kms_helper edid_firmware=edid/edid-15khz.bin
conect again your 15khz screen and reboot, you get a nice 15khz desktop:



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.




« Last Edit: June 02, 2016, 09:52:26 am by chukione »

ozfalcon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Last login:April 28, 2019, 09:07:10 pm
  • ZSystem
Re: how i get running groovymame at 15khz on gnu/linux debian
« Reply #1 on: May 02, 2016, 07:44:25 pm »
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

« Last Edit: May 02, 2016, 07:46:31 pm by ozfalcon »

pelanas

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:November 17, 2016, 04:50:24 am
  • Love classics
Re: how i get running groovymame at 15khz on gnu/linux debian
« Reply #2 on: May 04, 2016, 07:44:24 am »
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:

« Last Edit: May 13, 2016, 11:17:39 am by pelanas »

vicmarto

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:January 22, 2017, 03:10:30 am
  • I want to build my own arcade controls!
Re: how i get running groovymame at 15khz on gnu/linux debian
« Reply #3 on: June 29, 2016, 09:23:55 am »
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!

chukione

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:July 15, 2016, 08:42:44 pm
  • I want to build my own arcade controls!
Re: how i get running groovymame at 15khz on gnu/linux debian
« Reply #4 on: July 07, 2016, 12:54:55 pm »
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"