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: groovymame 0193 compilation on arm dev board - debian 9  (Read 2698 times)

0 Members and 1 Guest are viewing this topic.

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
groovymame 0193 compilation on arm dev board - debian 9
« on: May 21, 2018, 06:25:05 am »
Hi,

I am playing around with an arm dev board and I want to compile GroovyMame 0193 but I have an issue.

I compile mame0193 with make clean && make -j6
The board has 8 cores and to obtain best speed I should do -j9 but I can bake eggs on it if I do that hence -6
mame0193 runs fine

Took the same mame 0193, extracted it, put 0193groovymame.diff in folder. Wrote a small script to convert the source files to unix line endings and , successfully applied diff, issued make clean && make -j6
Compilation failed - needed to change two files (xf86drm.h and ... I forgot - apologies) to read #include <libdrm/drm.h> instead of #include <drm.h>

ok - go

linker error - undefined reference to 'drmWaitVBlank' and a bit further libdrm.so.2 error adding symbols : DSO missing from command line

my libdrm is ok :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libdrm-dev is already the newest version (2.4.74-1).

the issue has something to do with it but I can't solve it. I don't know the mame build system - where is the linker logic? Or better, how do I solve this specific one?

thx


Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #1 on: May 21, 2018, 06:56:20 am »
Check in /scripts/src/osd/sdl.lua

You probably need to change the path to libdrm, the same way you did for the includes.

Curious to know if it can be done, you're the first one to try, I serioulsy doubt it'll work since it relies on libxrandr to create custom modes.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #2 on: May 21, 2018, 11:54:00 am »
I managed to compile the groovymame0193 arm binary and it sure does 'something' :)
When I start it I get a black screen and I can barely switch to a text based session. Killing the process doesn't bring back the desktop though.
By black screen I mean the monitor starts looking on its vga and hdmi inputs. It is as if nothing gets put out anymore.
I'm running a std 4.14.40+ kernel atm. Should I compile one with the 15khz patches for starters?
I planned on getting me a hdmi to vga+audio active adapter and I have a spare umsa.
Can you elabrate just a little bit with the info above? All this 15khz is still a bit fuzzy for me though I have an amd64 debian 9 with a custom 4.14 kernel running on tv.
as for libxrandr - xrandr gives me:
****@debian-arm:~$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 4096 x 4096
HDMI-1 connected primary 1920x1200+0+0 518mm x 324mm
   1920x1200     59.95*+
   1600x1200     60.00 
   1280x1024     60.02 
   1280x960      60.00 
   1152x864      75.00 
   1024x768      60.00 
   800x600       60.32    56.25 
 If it doesn't work no harm done...
I compiled mame to support the 8 cores I have. 8 is the max mame spawns atm if has been compiled specifically for it. I really want to see its performance on the soc.
« Last Edit: May 21, 2018, 12:11:06 pm by ZoOl007 »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #3 on: May 21, 2018, 12:31:04 pm »
Are you running this on a Raspberry Pi?

I'd like to see a full log to verify what commands GM is sending to xrandr and what the output is.

There's nothing esoteric about 15 kHz, just a video mode like any other, it's only that the pixelclock or the resolutions themselves may hit some minimum limit hardcoded in the drivers.

Besides, not all graphic hardware may be able to support arbitrary pixelclocks.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #4 on: May 21, 2018, 02:59:20 pm »
No PI no. I got me an ODROID XU4Q - this should be the fastest thing in that ecosystem that exists atm.

normal mame 0193:
I ran some preliminary tests - at first speed was disappointing. Lowering the resolution to 800*600 made a difference though. I also got errors initializing the video system.
This system does not support OpenGl - Gles errors... it is correct that it does't support OpenGl fully - only a subset. The weird thing is I don't have the errors anymore atm.
I will investigate further. I really only build the binaries and got my distro more or less on an acceptable level - graphics have been the least of my worries :) 'till now that is.

groovymame0193:
upon starting I get a black screen and I need to reboot - this is the log content upon starting wboy

SwitchRes: v0.017f, Monitor: generic_15, Orientation: horizontal, Modeline generation: enabled
SwitchRes: Monitor range 15625.00-15750.00,49.50-65.00,2.000,4.700,8.000,0.064,0.192,1.024,0,0,192,288,448,576
SwitchRes: xrandr version 1.5
SwitchRes: Found output connector 'HDMI-1'

SwitchRes: Entering switchres_modeline_setup
SwitchRes: v0.017f:[wboy] Calculating best video mode for 512x224@60.096153 orientation: normal

SwitchRes: (   1)x(   1)_(60=60.000000Hz)
   rng(0):  512 x 224_60.096153p 15.625000 [integ] scale(1, 1, 1) diff(0.00, 0.00, 0.0000) ratio(1.000, 1.000)

SwitchRes: [wboy] (1) horizontal (512x224@60.096153)->(512x224@60.096153)
   rng(0):  512 x 224_60.096153p 15.625000 [integ] scale(1, 1, 1) diff(0.00, 0.00, 0.0000) ratio(1.000, 1.000)
SwitchRes: Modeline "512x224_60 15.625000KHz 60.096153Hz" 10.374999 512 536 584 664 224 233 236 260   -hsync -vsync
Switchres: CRTC 0: mode 0x41, 1920x1200+0+0.

is this the kind of log you need?

the fact that I got a significant speed boost lowering res and given the fact that the games are normally much lower res perhaps means some decent speed on arm with gm and 15khz could be obtainable.

Edit: I've had a look at the graphics - as I understand it now I need to build a loadable kernel module for the mali t628-mp6 and I'll need a user space binary blob. I'll try to find some time.
« Last Edit: May 22, 2018, 04:03:54 am by ZoOl007 »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #5 on: May 22, 2018, 08:02:09 am »
That log is not complete, is that because GM crashes in the middle?
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #6 on: May 22, 2018, 09:26:00 am »
I never produced a log with GM hence I didn't realize it wasn't complete. I'll check for a crash, check the system logs and report back. Seem plausible... If you can think of anything obvious GM depends on that could cause it to crash knowing its normal 0193 sibling 'runs' do say so please. I'll try to make hardware accelerated graphics work too. It could take a while.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #7 on: May 22, 2018, 10:15:30 am »
A log is the complete file you get with -v >log.txt

It contains more stuff that the Switchres part, that may help diagnosing the problem. The part you posted seems like it's ripped from the file. Anyway it's missing the end part where Switchres restores the state, that's why I think GM has crashed.

GM depends on the OpenGL backend in order to work, so first of all you'll need video acceleration through OpenGL. That is a major undertaking if the platform has no support for it.




Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #8 on: May 22, 2018, 02:52:39 pm »
The video acceleration is OpenGL ES based not OpenGL. I switched to an ubuntu image because I couldn't get the acceleration going on my debian install.
Is OpenGL a GM specific dependency or does mame itself depend on it too? If not, it might be doable to convert your work to use GLES as a test case.
What do you think? y/n? easy/difficult/insane?
GM still crashes at the same point in the ubuntu with hw acceleration as in the debian without.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #9 on: May 22, 2018, 03:38:30 pm »
OpenGL requirement is GM specific, basically we've only bothered patching that specific backend for Linux. If you check what's changed in the diff, you may figure out what the requirements are, it shouldn't be too complicated.

Still waiting for that complete log, so I can dig in the specific point where it crashes.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #10 on: May 23, 2018, 01:02:43 am »
it doesn't create anything more. I did ./mame cabal -v >cabal.txt
The screen goes black.
I switch to a text terminal and look at he process and it it still there doing nothing - 0 cpu time - it is like it is stuck and nothing more gets logged.
I attached the file.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: groovymame 0193 compilation on arm dev board - debian 9
« Reply #11 on: May 24, 2018, 03:32:36 am »
I'd say it gets locked at some point in switchres_sdl.cpp, set_custom_video_mode. Probably by the XSync call. If you add some extra logging in that function we may get more information.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi