FortyRock
Posts: 24
Joined: Fri Mar 08, 2013 5:33 pm
Location: Canada

Re: MAME4ALL for Pi

Mon Mar 11, 2013 12:03 am

pudding wrote:On older versions of Raspbian it works without any problems.
I tried 2013-02-09 and 2012-12-16. Neither worked. I'll try 2012-09-16 tonight (is that one ok?)

UPDATE: Guess it isn't. After installing that version of wheezy, updating the apt-sources (not upgrade) and installing pistore (to get the mame4all package), launching it yields the notorious black screen I've been getting with the other releases.

Assuming this isn't the same as you've tried, can you specify which one I should be using?
welshy wrote:Which "Raiden" are you refering to?
I only know of the one. What I was saying, though, is that this mame4all did the best job of everything I've tried so far.

macca
Posts: 119
Joined: Tue Oct 16, 2012 9:14 am

Re: MAME4ALL for Pi

Mon Mar 11, 2013 12:18 pm

I have downloaded and compiled the source code from the repository, there are some bits missing from the makefile, here is a diff:

Code: Select all

diff --git a/makefile.rpi b/makefile.rpi
index caef7c3..4511418 100644
--- a/makefile.rpi
+++ b/makefile.rpi
@@ -33,7 +33,7 @@ DEFS = -DGP2X -DLSB_FIRST -DALIGN_INTS -DALIGN_SHORTS -DINLINE="static __inline"
 CFLAGS = -fsigned-char $(DEVLIBS) \
        -Isrc -Isrc/$(MAMEOS) -Isrc/zlib \
        -I/usr/include/SDL \
-       -I$(SDKSTAGE)/opt/vc/include -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads \
+       -I$(SDKSTAGE)/opt/vc/include -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux \
        -march=armv6 -mfpu=vfp -mfloat-abi=hard \
        -O3 -ffast-math -fomit-frame-pointer -fstrict-aliasing \
        -mstructure-size-boundary=32 -fexpensive-optimizations \
@@ -43,7 +43,7 @@ CFLAGS = -fsigned-char $(DEVLIBS) \
 
 LDFLAGS = $(CFLAGS)
 
-LIBS = -lm -lpthread -lSDL -L$(SDKSTAGE)/opt/vc/lib -lGLESv2 -lEGL
+LIBS = -lm -lpthread -lSDL -L$(SDKSTAGE)/opt/vc/lib -lGLESv2 -lEGL -lasound
 
 OBJ = obj_$(TARGET)_$(MAMEOS)
 OBJDIRS = $(OBJ) $(OBJ)/cpu $(OBJ)/sound $(OBJ)/$(MAMEOS) \
Also make sure you have installed libasound2-dev.

The emulator runs very well, unfortunately my roms collection seems too new for it (I'm using xmame 0.106 on my desktop PC) and very few games are working, well, few of the games I like most, haven't tried all the others.

One thing I have noticed is a lag on the command response from the keyboard. I mean, when your character is running there is a small but noticiable lag between when you relese the arrow key and when the character actually stops. Tried with ladybug and burgertime. I'm using a wireless keyword, it works well on Windows but maybe it has some problems with the Raspberry Pi.

Martin3232
Posts: 22
Joined: Fri Mar 01, 2013 5:25 pm

Re: MAME4ALL for Pi

Mon Mar 11, 2013 2:38 pm

Installed this from the piStore and worked fine within startX but just got a blank screen from the console. Downloaded, built and installed DispManx and it all started working.

I'm currently building a Arcade cabinet http://www.raspberrypi.org/phpBB3/viewt ... 78&t=36191, and cant wait for the joystick to get implemented. I use a usb controller for ajoystick interface but if I run ./mame without a keyboard and just the joystick it hangs on start up.

Great work, great speed.

FortyRock
Posts: 24
Joined: Fri Mar 08, 2013 5:33 pm
Location: Canada

Re: MAME4ALL for Pi

Mon Mar 11, 2013 2:51 pm

Martin3232 wrote:Installed this from the piStore and worked fine within startX but just got a blank screen from the console. Downloaded, built and installed DispManx and it all started working
Are you still using composite video and the 3.5mm jack for audio? Also, what is the speed like when leaving a game (let me know which one and I'll compare times)?

pudding: My problem definitely seems to be directly related to the HDMI-to-DVI hookup (just like the composite problems you've recorded). I removed the custom dispmanx installation, connected the pi to my HDTV and it ran fine. Speed leaving a rom was faster, too.

There was a small difference, though - when running with dispmanx in place, the console shows messages related to connectiong to display(0), resolution information, destroying the dispmanx elements, etc. With the stock ones, nothing goes to stdout but mame bitmap appears after 3-4 seconds.

After crafting some new google-fu, I came across these:
http://www.raspberrypi.org/phpBB3//view ... 33&t=14693
http://www.raspberrypi.org/phpBB3/viewt ... =33&t=8454

HTH

Martin3232
Posts: 22
Joined: Fri Mar 01, 2013 5:25 pm

Re: MAME4ALL for Pi

Mon Mar 11, 2013 6:42 pm

Are you still using composite video and the 3.5mm jack for audio? Also, what is the speed like when leaving a game (let me know which one and I'll compare times)?
Yes im using composite and 3.5 mm jack for audio. Speed is fine when leaving a game around 4seconds but I do have over 100 roms.

When I tried today ./mame would not load it just displayed a message "opening display[0]" which I beleive to be a dispManx message. After a reboot all was ok and mame worked fine. I wonder now if a reboot was the issue before i installed dispmanx? I'll uninstall dispmanx and retry later.

pudding
Posts: 95
Joined: Sat Jan 12, 2013 3:55 pm
Location: UK

Re: MAME4ALL for Pi

Tue Mar 12, 2013 9:44 am

Thanks FortyRock for the information. I had seen these posts before but unfortunately it all relates to SDL problems. Dispmanx is the low level drivers for the Pi's GPU and doesn't have problems with the video, the problem is SDL when it initialises the video, which is required for keyboard/joystick input even though I don't use the SDL video. The SDL-dispmanx driver is a patched version of SDL to use dispmanx for graphics that appears to workaround these issues but really isn't a final solution. Those messages you're seeing are from SDL-dispmanx drivers, must be for debugging. I'm going to try and debug the SDL initialisation problems to see what is causing it when I get some time.

I'm pretty sure I used the 2012-12-15 image for my two Pis. They work without problems with the Console & composite but I tried the 2013-09-02 and that has the Console & composite problem. What is confusing is I've upgraded software and the kernel to the latest using apt-get etc so I would assume it would then be the same as the 2013-09-02 but it isn't.
Author of MAME4ALL for Pi, PiSNES, PiFBA & PiMenu

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: MAME4ALL for Pi

Tue Mar 12, 2013 2:22 pm

I see that 'Issue 5: not possible to change keyboard layout' has been closed and fixed in v1.1.
I don't see this version on your code.google page.

pudding
Posts: 95
Joined: Sat Jan 12, 2013 3:55 pm
Location: UK

Re: MAME4ALL for Pi

Tue Mar 12, 2013 7:18 pm

Version 1.1 released on the Pi Store.

- Added multiple USB joystick support.
- Full keyboard support.
- Added DrZ80 cpu core. Enabled by default for sound to improve performance for many games.
- Fixed "slow" sound in dkong, williams and rampage games.
- Slightly higher sound mixer quality.
Author of MAME4ALL for Pi, PiSNES, PiFBA & PiMenu

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: MAME4ALL for Pi

Tue Mar 12, 2013 7:59 pm

Many thanks for your updated version!
I'm especially happy that you fixed keyboard mapping.
However, when I started the new version I noticed that the cursor was constantly moving UP as if UP keyboard button is pressed but it wasn't.
I was able to select a game by pressing DOWN key to stop it on the game I wanted to start.
Once I got into the game, keyboard started behaving normally.
I got into TAB menu and didn't notice this strange behavior with UP button there so it seems only confined to the game select screen.
BTW, keyboard mapping works great!

pudding
Posts: 95
Joined: Sat Jan 12, 2013 3:55 pm
Location: UK

Re: MAME4ALL for Pi

Tue Mar 12, 2013 9:20 pm

I've just uploaded a newer version that clears the input buffers on startup. Try that and let me know.
Author of MAME4ALL for Pi, PiSNES, PiFBA & PiMenu

pudding
Posts: 95
Joined: Sat Jan 12, 2013 3:55 pm
Location: UK

Re: MAME4ALL for Pi

Tue Mar 12, 2013 11:21 pm

For those with Console/composite problems, have you set overscan in /boot/config.txt? Commenting those out seems fix the black screen isue.
Author of MAME4ALL for Pi, PiSNES, PiFBA & PiMenu

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: MAME4ALL for Pi

Wed Mar 13, 2013 6:55 am

pudding wrote:I've just uploaded a newer version that clears the input buffers on startup. Try that and let me know.
Have you commited that change to code.google?
I don't compile but just unzip the archive.
I redownloaded you archive after this post and tried it again but it's the same behaviour.

FortyRock
Posts: 24
Joined: Fri Mar 08, 2013 5:33 pm
Location: Canada

Re: MAME4ALL for Pi

Wed Mar 13, 2013 1:49 pm

pudding wrote:For those with Console/composite problems, have you set overscan in /boot/config.txt? Commenting those out seems fix the black screen isue.
You, sir, are the man!

It didn't work with the 1.0 binary, but whatever you did in 1.1 seems to have done the trick with my black screen problem HDMI -> DVI, sound via USB, Linux 3.6.11+ #389

(I have disable_overscan=1 set)

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: MAME4ALL for Pi

Wed Mar 13, 2013 6:52 pm

pudding wrote:I've just uploaded a newer version that clears the input buffers on startup. Try that and let me know.
I tried it but it didn't fix the issue.

Martin3232
Posts: 22
Joined: Fri Mar 01, 2013 5:25 pm

Re: MAME4ALL for Pi

Wed Mar 13, 2013 9:54 pm

Martin3232 wrote:
I'll uninstall dispmanx and retry later.
I'm unsure how to remove/uninstall displmanx - can anyone advise?

I've installed the latest Mame4All (1.1) and is great, the only issue I have is with my joystick and buttons via a usb controller (supplied by ultacabs) The Player 1 joystick (buttons 1 to 4) is recognised along with buttons 5 to 8 but buttons 9 & 10 (which I'm trying to assign to coin1 and coin2) are not been recognised and none of Player 2 buttons.

I too get the issue with the selector cursor moving up on its own, but only when i disconct the usb controller leaving just the keyboard plugged in.

Keep up the great work, absolutely superb.

FortyRock
Posts: 24
Joined: Fri Mar 08, 2013 5:33 pm
Location: Canada

Re: MAME4ALL for Pi

Wed Mar 13, 2013 10:04 pm

Martin3232 wrote:
Martin3232 wrote:
I'll uninstall dispmanx and retry later.
I'm unsure how to remove/uninstall displmanx - can anyone advise
"sudo apt-get install --reinstall libsdl1.2debian"
will overwrite the dispmanx binaries.
(To reinstall them afterwards, just do "make install" from the dispmanx source dir again)

pudding
Posts: 95
Joined: Sat Jan 12, 2013 3:55 pm
Location: UK

Re: MAME4ALL for Pi

Wed Mar 13, 2013 11:34 pm

Martin3232 wrote:The Player 1 joystick (buttons 1 to 4) is recognised along with buttons 5 to 8 but buttons 9 & 10 (which I'm trying to assign to coin1 and coin2) are not been recognised and none of Player 2 buttons.
MAME 0.37 only supports 6 buttons. Additionally I mapped 9 to Key1 (or Key2 on joystick2), 11 to Key5, 8 to KeyESC. These match my Saitek joystick. Only way to customise those is to edit the code.
I too get the issue with the selector cursor moving up on its own, but only when i disconct the usb controller leaving just the keyboard plugged in.
I don't understand this. You can't hot swap USB devices whilst MAME is running, you need to restart it.
Author of MAME4ALL for Pi, PiSNES, PiFBA & PiMenu

Martin3232
Posts: 22
Joined: Fri Mar 01, 2013 5:25 pm

Re: MAME4ALL for Pi

Thu Mar 14, 2013 9:49 am

pudding wrote:MAME 0.37 only supports 6 buttons. Additionally I mapped 9 to Key1 (or Key2 on joystick2), 11 to Key5, 8 to KeyESC. These match my Saitek joystick. Only way to customise those is to edit the code..
I had a quick look at the code in src/rpi/input.cpp at joyprocess and can see where you have mapped the joystick to the buttons. I'm guessing that this means currently that the keyboard keys can be configured to do any action, but the joystick buttons are fixed to those actions??
pudding wrote: I don't understand this. You can't hot swap USB devices whilst MAME is running, you need to restart it.
Sorry what I meant was I quit and restart MAME, so if I start with keyboard only I get the issue with the selector cursor moving up on its own. If I quit and plug in my joystick at the same time as the keyboard (or just the joystick only) then run MAME again the selector cursor works correctly.

Martin3232
Posts: 22
Joined: Fri Mar 01, 2013 5:25 pm

Re: MAME4ALL for Pi

Thu Mar 14, 2013 9:51 am

FortyRock wrote:["sudo apt-get install --reinstall libsdl1.2debian"
will overwrite the dispmanx binaries.
(To reinstall them afterwards, just do "make install" from the dispmanx source dir again)
I'll give this ago, thanks.

pudding
Posts: 95
Joined: Sat Jan 12, 2013 3:55 pm
Location: UK

Re: MAME4ALL for Pi

Thu Mar 14, 2013 11:05 am

I've changed the joystick initialisation code to see if it helps with the UP key problem (it's never happened to me). Can you please test it out? It's here http://mame4all-pi.googlecode.com/git/mametest.zip
Author of MAME4ALL for Pi, PiSNES, PiFBA & PiMenu

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: MAME4ALL for Pi

Thu Mar 14, 2013 12:53 pm

I doesn't fix it.
Still got the same automatic UP scrolling.

mongrol
Posts: 76
Joined: Wed Aug 01, 2012 2:43 am

Re: MAME4ALL for Pi

Fri Mar 15, 2013 4:12 am

Any way to get a build without using the store? (I'm anti-store)

Bzzzzt! Just found it in git. I must say it runs amazing. Every game I have runs fulls speed so far. Awesome work.

Does this source a mame.ini like normal mame? Wondering how to setup dirs and keyboard etc.

etherbest
Posts: 25
Joined: Wed Jul 25, 2012 10:39 am

Re: MAME4ALL for Pi

Fri Mar 15, 2013 10:37 am

Wow. Performance is amazing! Thanks so much for this port!

kadams2929
Posts: 31
Joined: Sat Aug 25, 2012 2:32 am

Re: MAME4ALL for Pi

Fri Mar 15, 2013 3:14 pm

I will also have to say the performance is incredible as well. I'm running my setup in X and as a good test, running Pacmania in AdvMame vs. Mame4All for Pi.

Hands down, Mame4All for Pi runs Pacmania full speed and is conservatively 3 times faster than AdvMame.

Nice work! Do you accept donations for future upgrades and enhancements? :)

pudding
Posts: 95
Joined: Sat Jan 12, 2013 3:55 pm
Location: UK

Re: MAME4ALL for Pi

Fri Mar 15, 2013 6:18 pm

Thanks all, glad you enjoy it.

The next version will have 10 button joystick support and the major fix is much better colour palette support to fix the funky colours and fades. :D

You can donate "Tip" if you like on the Pi Store on my MAME4ALL app page.
Author of MAME4ALL for Pi, PiSNES, PiFBA & PiMenu

Return to “Gaming”