MAME4ALL for Pi


434 posts   Page 16 of 18   1 ... 13, 14, 15, 16, 17, 18
by bidinou » Sat Aug 30, 2014 3:10 pm
Thanks for the advice, I'll try to force the Pi output to 640x480... I always thought it would be better to upscale to a higher resolution but I get the monitor will do a better job ? Let's see... [I used to have a NUC which is gave to someone, and I could use some nice pixel shaders on SDLMAME that would mimic a CRT screen, and it looked awesome]

@Vanfanel : you're right : the developer never mentioned the input lag (but some other people on this thread).

My assumption is that the problem is a combination of some specific emulation core + the way SDL handles events + USB stack overhead. (like I said, even on the PC, some MAME drivers do have some latency some others don't -- R-Type Leo).
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France
by Nitrogen_Widget » Mon Sep 01, 2014 8:15 pm
Just my findings.
I've had to play with overscan settings but otherwise I think the monitor does a good job of upscaling.

Even on advanced mame, i keep the rpi at 640x480 & then I scale the games themselves up to 640x480 in game and apply scanlines and they still run very smooth.
well the ones that ran smooth without any of the affects do.

advancemame does have more games available but also more games that chug also.
Posts: 39
Joined: Tue Aug 28, 2012 5:52 pm
by bidinou » Mon Sep 08, 2014 11:36 am
Well, I tried to set a 640x480 screenmode (I have a 17" 1280*1024 monitor).
- with scanlines enabled, scanlines now look HUGE (half the lines). But there still seems to be a problem because I can still feel distortion when scrolling (as if some lines were thicker than others or something like that -- the game resolution not corresponding properly to the LCD matrix.) So I'm not sure it's better than when using the effect in my screen native resolution
- without scanlines, the bilinear filtering still makes the picture extremely blurry (more than when using MAME on a regular PC).

So well, I'm still lost. I wish there were an option like "unevenstretch" in MAME which could be disabled in order to reduce the picture distortion.

Anyway :) I'll stop bothering everyone about this as I think there is no "solution" ; we just have to get used to this specific rendering, until someone decides to tinker with the code :)
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France
by bidinou » Fri Sep 12, 2014 11:27 am
Could anyone please provide me with a build of mame4all which includes the fixed sound for the system16 system ? I heard about it but I'm not sure it really exists ? That would be great, there are quite a few cool games that are perfectly emulated apart from the lack of sound :)
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France
by datajerk » Tue Sep 16, 2014 3:57 pm
Is there a completely list of mame.cfg options for mame4all. I've been unable to find. I'll be checking the source soon. Specifically I'd like to nail down the stretch. E.g. I do not want 288x224 games stretched to 640x480. Thanks.
Posts: 7
Joined: Tue Sep 16, 2014 3:52 pm
by hicksonj » Tue Sep 16, 2014 5:39 pm
Don't know where cfg options are documented. In the end I had to look at the source file src/rpi/config.cpp, function parse_cmdline. Options appear to be as follows:
Code: Select all
artwork
samples
vsync
waitvsync
dirty
antialias
translucency
depth
skiplines
skipcolumns
beam
flicker
gamma
frameskip
norotate
ror
rol
flipx
flipy
soundcard
ym3812opl
samplerate
stereo
volume
force_stereo
mouse
joystick
cheat
debug
cheatfile
historyfile
mameinfofile
resolution
vector_width
vector_height
language
uclocks
uclock
fastsound
rotatecontrols
display_border
display_smooth_stretch
display_effect
kioskmode

The resolution parameter is by default set to "auto". If you wanted to change this you would need something like "resolution=288x224". I've never tried this so I don't know what will happen. I run mame4all-pi at 1080p, so pixel variations (from up-scaling) are not really noticeable to me.

John
User avatar
Posts: 13
Joined: Wed Aug 01, 2012 11:51 am
by datajerk » Tue Sep 16, 2014 6:54 pm
hicksonj wrote:The resolution parameter is by default set to "auto". If you wanted to change this you would need something like "resolution=288x224". I've never tried this so I don't know what will happen. I run mame4all-pi at 1080p, so pixel variations (from up-scaling) are not really noticeable to me.

Thanks John, I found the same list looking at the code. If the game resolution is 288x224, then resolution=288x224 changes nothing. If you want to reduce stretch, then you have to have the resolution be > than the game resolution, the math is pretty simple.

resolution=native res/(native pixels/game pixel).

E.g. if the native game resolution is 288x224 and my VGA output is set to 640x480, then resolution=320x240 fixes the problem and every game pixel is exactly 2 VGA pixels. mame4all will stretch the 320x240 over 640x480 but not stretch the 288x224 to 320x240. Instead I get the 288x224 pixel perfect with a small black boarder. I tested with VGA and composite capture devices using 342x256 for VGA (1024x768) and 360x228 for composite (720x576) output and got perfect results.

BTW, the resolution setting only applies to games and not the front end. That continues to run edge-to-edge even if overscan settings are in effect.

Using a Sony PVM 2030 as my monitor with a GBS-8100 to convert VGA to RGB. Also disabled antialiasing, etc... in mame.cfg. Looks "real".
Posts: 7
Joined: Tue Sep 16, 2014 3:52 pm
by Setka » Sun Sep 28, 2014 7:31 pm
Hi all,

i'm a noob with raspberry pi and with linux.
I just download mame4all and some 37B5 rome.
When i consol that :
./mame pacman

i just get a black unnamed windows with nothing (that i can't close)
in the terminal i got : Puckman (Kapan set 1 (packman) ...

Any idea
Posts: 6
Joined: Sat Sep 27, 2014 10:01 am
by hicksonj » Sun Oct 05, 2014 9:02 am
Sound latency problem
This problem has been driving me nuts on mame4all-pi. When an emulation session first starts, there is hardly any latency (delay) in sound vs. video. However after about 2 minutes the latency starts to increase until there is nearly 1 second latency. (this is for 8-bit 80s games).

I'm using the latest version of mame4all-pi running on raspbian (RetroPie) with all the lasted updates. I've tried recompilation of a fresh mame4all-pi source*, but to no effect. I realise this may not be a massive problem to some. Any other ideas :?:

* BTW to get mame4all-pi to compile I needed to update the Makefile. Specifically I was getting the following error:
sound.o: undefined reference to symbol 'snd_pcm_hw_params_malloc@@ALSA_0.9
libasound.so.2: error adding symbols: DSO missing from command line
To fix this I updated the "LIBS" definition in Makefile and added "-lz -lrt -lasound", so it now looks like:
Code: Select all
LIBS = -lm -lz -lrt -lasound -lpthread -lSDL -L$(SDKSTAGE)/opt/vc/lib -lbcm_host -lGLESv2 -lEGL -lglib-2.0
User avatar
Posts: 13
Joined: Wed Aug 01, 2012 11:51 am
by hicksonj » Fri Oct 10, 2014 8:52 am
Sound latency problem: UPDATE
I'm getting better results (less sound latency "drift" over time) after making some adjustments to a local copy of the original code:

  1. In src/rpi/sound.cpp: Reduce the size of the FIFO queue used to queue up sound requests. Line 322, change from 6 to 2 buffers lengths:
    Code: Select all
    alsa->buffer = fifo_new(alsa->buffer_size_bytes*2);
    Bear in mind this may impact some games which do not run at full speed. 80s games should be fine.
  2. In some game drivers, set the correct frame rate. I'm less convinced this is making a difference, but cannot be sure. The frame rate can be set in src/drivers/<game>.cpp files. Look at later version of MAME on the PC to find the correct frame rate, which are not always exactly 60fps (for example is often 60.6060607 fps)
Change (a) seems to have made the biggest difference so far. BTW at this point please be aware I don't full understand what I'm do here.
User avatar
Posts: 13
Joined: Wed Aug 01, 2012 11:51 am
by kraken667 » Mon Oct 13, 2014 5:17 pm
Probably already somewhere in this thread, but just a quick question:

Is it possible to strech the image to full screen in MAME4ALL?

I have a small 800x600 HDMI monitor, and I got big black borders on both sides. I know differnet MAME games have different aspect ratios, but when I play Metal Slug for example, you can clearly see that the image is squeezed, horizontal that is. Any way to solve this?

I changed aspect ratio in cfg to 1.8, and all the other emulators ran fullscreen after that. All exept for MAME4all, left unchanged.
Posts: 59
Joined: Mon Jan 13, 2014 5:05 pm
by hicksonj » Tue Oct 14, 2014 10:20 am
kraken667 wrote:...
I have a small 800x600 HDMI monitor, and I got big black borders on both sides. ...

Hi.
In your /boot/config.txt file, what are the following 3 parameters set to?

hdmi_drive
hdmi_group
hdmi_mode
User avatar
Posts: 13
Joined: Wed Aug 01, 2012 11:51 am
by bidinou » Fri Oct 24, 2014 12:28 pm
Oh, as I see you guys are trying to tweak the code ! Could any of you check why it's not possible to get a proper result when using both scanlines and bilinear filtering ? Isn't there a way to fix this issue ? :) I know, I always bring up this issue :)

(Edit : my guess is that the scanlines are applied to the buffer which resolution corresponds to the game and not the actual screen, probably for performance reasons... then the bilinear seems to be applied above this but this time in the full resolution, by the hardware)
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France
by Pisuke » Thu Oct 30, 2014 10:23 am
Hi. Is it possible to use raspberry pi with a 32'' TV in a cocktail mode? Where can I setup it? I want to divide video in two and play in two person one in front of the other... Thanks
Posts: 2
Joined: Tue Oct 28, 2014 3:07 pm
by bidinou » Wed Nov 05, 2014 9:50 am
I made a quick and absolutely dirty hack to force the scanlines mode of mame4all to display a picture that would be a integer multiply of the game base resolution. And, it looks definitely better, scrolling is better, less flickering etc.

I wish I could do it cleanly, and also in smooth_stretch_mode.

It kinda shows that an "no uneven stretch" option as in the current regular MAME would help a lot get a clean, albeit smaller, picture :)
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France
by RyuX » Fri Dec 19, 2014 1:08 pm
Hey guys.. i am looking for scanlines in this Emulator.. I have a 17" (16:10) LCD and will get my Raspberry Pi soon.
Anyone can help me ?
Would be really great because i am building a small Arcade Station to play Neo Geo Games and Scanlines would be perfect (if the performance is not suffering to much).

Thanks for your help guys!
Greets
Posts: 5
Joined: Fri Dec 19, 2014 12:51 pm
by bidinou » Fri Dec 19, 2014 2:19 pm
Scanlines support is built-in in MAME4ALL (and PiFBA), so no problem. They come at no cost as they are implemented in a shader. Enable them in the .ini file (but you have to disable smooth stretch before unfortunately).

As I said above, there are 2 issues however : 1) as you cannot have both effects (bilinear & scanlines) it looks quite blocky 2) as there is no "unevenstretch" option, scrollings sometimes are not smooth when using scanlines as the screen resolution is not a multiple of the game resolution... IMHO, both problems should be fixable (?) unfortunately I don't have the time nor the skill to fix them. I only made a dirty hack for problem nb. 2 and it was indeed better but I gave my Pi meanwhile and didn't keep the code...
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France
by RyuX » Fri Dec 19, 2014 2:39 pm
Thanks for your reply..
I am pretty new to this.. would you recommend using Mame4All or better the Final Burn Alpha in terms of compatability ?

I wanted to install the RetroPie image.

But most important for me are the Neo Geo Games.

Thanks
Posts: 5
Joined: Fri Dec 19, 2014 12:51 pm
by bidinou » Fri Dec 19, 2014 3:11 pm
I've not tried RetroPie for a long time ; I'm not sure they use the right versions of MAME / FinalBurnAlpha. But if they use Squid's MAME4ALL / PiFBA this is good. Those are definitely the best compromises in terms of speed and compatiblity !

You need both MAME4ALL and PiFBA. PiFBA supports fewers but better (more recent) systems like CPS2. It's also more optimized. However it does not support highcores.

So you really need both :)
Posts: 68
Joined: Fri Sep 27, 2013 8:53 am
Location: France
by RyuX » Fri Dec 19, 2014 3:31 pm
Ah ok... Well i am also aiming more for the Neo Geo Arcade roms and CPS2.
I dont need highscores at all costs, just scanlines and good support would be awesome.. i will just try the Current RetroPie as soon as the Raspberry Pi arrives and see how i can go from there :D

Maybe others have a workaround for the issues with the scanlines ?
Thanks
Posts: 5
Joined: Fri Dec 19, 2014 12:51 pm
by Nitrogen_Widget » Mon Dec 29, 2014 12:29 am
One of these with an HDMI to VGA adaptor would work if your monitor has VGA in.http://www.ebay.com/itm/Scanline-Genera ... 1e818b25c4
Posts: 39
Joined: Tue Aug 28, 2012 5:52 pm
by mancity » Fri Jan 02, 2015 9:57 pm
I have noticed Metal Slug 2 is very glitchy indeed. Has anyone else noticed this? I don't normally see any issues on NEO GEO rom's.
Posts: 58
Joined: Tue Dec 23, 2014 8:18 pm
by welshy » Sat Jan 03, 2015 4:20 am
mancity
Metal Slug 2 is slightly 'glitchy' in the original Neo-Geo MVS/AES Hardware, this is the reason SNK released Metal Slug 'X' to resolve these issues.(its a 're-aranged' 2.1 version so to speak). For further detail on Neo-Geo Emulation see my reply at your 'MAME4ALL Front end?' post

Link - viewtopic.php?f=78&t=95394
"The list of things I have heard now contains everything!"
Posts: 1648
Joined: Mon Oct 29, 2012 2:07 pm
by mancity » Sat Jan 03, 2015 8:11 am
welshy wrote:mancity
Metal Slug 2 is slightly 'glitchy' in the original Neo-Geo MVS/AES Hardware, this is the reason SNK released Metal Slug 'X' to resolve these issues.(its a 're-aranged' 2.1 version so to speak). For further detail on Neo-Geo Emulation see my reply at your 'MAME4ALL Front end?' post

Link - viewtopic.php?f=78&t=95394


Thank you :)
Posts: 58
Joined: Tue Dec 23, 2014 8:18 pm
by symbios25 » Sun Jan 18, 2015 8:59 am
Hello i`m a little beginner into this but how i can install mame4all manual without the use of PiShop in the raspberry?? there are not any instruction anywhere.thanks
Posts: 23
Joined: Sat Jan 10, 2015 1:42 pm