ARpiCADE 3.8 Release!

Latest on ARpiCADE new releases, release notes, and history of previous versions.

Moderator: dee2eR

User avatar
FrizzleFried
Legendary Contributor
Legendary Contributor
Posts: 328
Joined: Sat Nov 25, 2017 5:35 pm
Location: Idaho
Contact:

Re: ARpiCADE 3.8 Release!

Post by FrizzleFried » Sun Feb 04, 2018 7:34 am

OK...

Fixed Astro Blaster.

FILE LOCATION/NAME: home\pi\mame4all\mame.cfg

Change samplepath=sample to read samplepath=boot\sample

Also, I can say for sure that not ALL emulators are effected by the sound delay issue. For example, Batsugun plays fine... however games like Dig Dug, Pacmania, and Avengers all play with the sound delay. Astro Blaster, now with the samples path set correctly, also plays at the proper time... no delay.

EDIT - It appears that all the games that I am having troubles with appear in the MAME106 ROM folder... Tomorrow I will check to see if the other MAME emulators are affected...

EDIT #2 - Thus far only MAME106 is affected. FBA... no problem. MAME094... no problem. Can you think of a setting that could have "accidently" been set for only MAME106? EDIT #2-2: I can now confirm that MAME094 is also working fine. So the problem is ADVMAME 106... I tried replacing the launch file with the one from my working older build... no go. I tried replacing the .rc file from the same working old build... no go. I am now not sure what to do short of trying to move over ADVMAME completely from the old build? EDIT #2-3: Unfortunately this issue presents itself to me pretty much out of the box. Well, close. I wrote another SD Memory Card... then simply moved ROMS and PREVIEWS over only... nothing else... and 106 still has the audio lag??!

EDIT #3 - I've documented the behavior of the SDArcade (all versions, but using v2) in regards to the "speed color selector" issue. The behavior is as this: Upon loadup the layout looks perfect. Select a game... exit the game... the layout looks great but the selector box runs about 5x-10x the normal speed for a time then slows to normal.

Here is the key... the length of time that it runs super fast directly correlates with how long you play the game. Pop in and immediately exit, and the colors run super fast for 3 seconds or so. Hang out for 15 - 20 seconds in game and the colors run maybe 7 seconds. Hang out and play a game... the colors run for 20...30...40 seconds.

MY UNINFORMED NON-PROGRAMMER BARELY A HACK HYPOTHESIS: While the game is running... for some reason... the color changes (each tick/frame) is being buffered waiting to be unleashed in a speedy color explosion when the game exits.

NOW, if this is true... i wonder what would happen if i played a game (or just left it sitting there) for a long time... would some buffer overflow somewhere?

Hmmmmm....
Visit my arcade blog ... www.idahogaragecade.com (Updated: 10/28/21)

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: ARpiCADE 3.8 Release!

Post by wboy » Tue Feb 06, 2018 1:28 am

FrizzleFried wrote:
Sun Feb 04, 2018 7:34 am
... and 106 still has the audio lag??!
Going from memory here as I only tested it last night... but if you edit both of following files...

Code: Select all

nano /home/pi/.advance/advmame.sdl.rc
nano /home/pi/.advance/advmame.rc
Set ...

Code: Select all

device_sound sdl
... instead of the default of auto (alsa I assume), the audio lag should go away for all advmame 106 roms on the 3.811 build.

dee2er can probably confirm if other .rc file may need ideal editing. Still very new to arpicade and advmame setups.

Have been messing with vsync and buffering within 106 too, but not getting the game sync smoothness like when you disable throttle and enable waitvsync in 172. Will post my finding in my original thread later to see if a tweak can be found for 106.

User avatar
FrizzleFried
Legendary Contributor
Legendary Contributor
Posts: 328
Joined: Sat Nov 25, 2017 5:35 pm
Location: Idaho
Contact:

Re: ARpiCADE 3.8 Release!

Post by FrizzleFried » Tue Feb 06, 2018 3:06 am

wboy wrote:
Tue Feb 06, 2018 1:28 am
FrizzleFried wrote:
Sun Feb 04, 2018 7:34 am
... and 106 still has the audio lag??!
Going from memory here as I only tested it last night... but if you edit both of following files...

Code: Select all

nano /home/pi/.advance/advmame.sdl.rc
nano /home/pi/.advance/advmame.rc
Set ...

Code: Select all

device_sound sdl
... instead of the default of auto (alsa I assume), the audio lag should go away for all advmame 106 roms on the 3.811 build.

dee2er can probably confirm if other .rc file may need ideal editing. Still very new to arpicade and advmame setups.

Have been messing with vsync and buffering within 106 too, but not getting the game sync smoothness like when you disable throttle and enable waitvsync in 172. Will post my finding in my original thread later to see if a tweak can be found for 106.
I am happy to confirm that this fix DOES work! THANK YOU!
Visit my arcade blog ... www.idahogaragecade.com (Updated: 10/28/21)

dee2eR
Inventor
Inventor
Posts: 1857
Joined: Tue Aug 22, 2017 2:07 pm

Re: ARpiCADE 3.8 Release!

Post by dee2eR » Tue Feb 06, 2018 5:46 am

wboy wrote:
Tue Feb 06, 2018 1:28 am
edit both of following files...

Code: Select all

nano /home/pi/.advance/advmame.sdl.rc
nano /home/pi/.advance/advmame.rc
Set ...

Code: Select all

device_sound sdl
... instead of the default of auto (alsa I assume), the audio lag should go away for all advmame 106 roms on the 3.811 build.

dee2er can probably confirm if other .rc file may need ideal editing. Still very new to arpicade and advmame setups.

Have been messing with vsync and buffering within 106 too, but not getting the game sync smoothness like when you disable throttle and enable waitvsync in 172. Will post my finding in my original thread later to see if a tweak can be found for 106.
Awesome thanks for posting this, I will fix this up for the next release. Surprised it doesn't break the non SDL version... the other rc files are for different configs so I'll update the lot, if you don't use any other config you will be fine not doing so.

As far as vsync goes, you want it set to off for SDL rendering as it done by SDL/dispmanx. In some versions of advmame (I think pre 3.0 off the top of my head) vsync is broken (it works but you have to toggle it to get it working so it's not very useful), the newer releases of AdvMAME have working vsync at a slight performance penalty. The newer versions also use the Pis hardware more effectively for framebuffer rendering but I haven't noticed any advantage compared to using SDL/dispmanx rendering (and the changes made to the later AdvMAME versions for RPi specific use seem to have slowed AdvMAME down a little bit in use on an RPi).

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: ARpiCADE 3.8 Release!

Post by wboy » Tue Feb 06, 2018 1:59 pm

dee2eR wrote:
Tue Feb 06, 2018 5:46 am
As far as vsync goes, you want it set to off for SDL rendering as it done by SDL/dispmanx. In some versions of advmame (I think pre 3.0 off the top of my head) vsync is broken (it works but you have to toggle it to get it working so it's not very useful), the newer releases of AdvMAME have working vsync at a slight performance penalty. The newer versions also use the Pis hardware more effectively for framebuffer rendering but I haven't noticed any advantage compared to using SDL/dispmanx rendering (and the changes made to the later AdvMAME versions for RPi specific use seem to have slowed AdvMAME down a little bit in use on an RPi).
Me thinks I need to educate myself more on SDL/dispmanx and AdvMAME for that matter. I thought a few vsync etc. config tweaks I made for 1.4/106 made an improvement on select roms I tested (not all), but not enough to be certain of that yet.

The in-game res when using AdvMame definitely seems more native (e.g. 256x224 for snowbros) but as the game runs at 57.5Hz the sync is not right, noticed as I've mention before on the level up jump screen animation... which appears choppy.

snowbros in 172 seems to use a wider screen res emulated (512x224 maybe? as [tab] menu looks squashed when you bring it up the in-game?). The stock mame.ini exhibits the same sync issue, but with throttle 0 and waitvsync 1 it looks bloody perfect, as does any other game I throw at it with those changes configured.

<noobalert> Any idea why this is the case? Is dispmanx used with 172 and later? These are just compiles of (SDL)mame if I am not mistaken? </noobalert>

172 works in soft(ware) rendering mode yeah? Is AdvMAME any different? Just trying to understand why 172 is visually out performing AdvMAME form all my tests and just looks better/like a real PCB's output IMO.

dee2eR
Inventor
Inventor
Posts: 1857
Joined: Tue Aug 22, 2017 2:07 pm

Re: ARpiCADE 3.8 Release!

Post by dee2eR » Wed Feb 07, 2018 1:59 am

re. the difference in rendering 172 v AdvMAME: current MAME (and 172) use SDL 2.0 (which is hardware accelerated on RPi), AdvMAME uses SDL 1.2. The version of SDL 1.2 on ARpiCADE is one made for hardware accelerated output on RPi using dispmanx with further adjusted scaling code to produce scan line correct output on low res monitors.

Are you running AdvMAME from the command line for testing or from Attract-Mode like normal use? The rendering on 172 and AdvMAME should look about the same if run from Attract-Mode. If you run AdvMAME from the command line after exiting A-M (and AdvanceMenu that loads after it) the SDL variable set in the run.sh script unloads when the script finishes so the rendering looks about thinner than normally. Daphne is also effected by SDL1.2 in the same way.

The differences in UI menu rendering between AdvMAME and 172 will just be down to code changes in the 65 MAME versions between them. When running at 240p 172 is using a different to default font for the menu to be readable, it's possible there's a better font for the task out there that would make the menu look more natural/wider while still being readable.

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: ARpiCADE 3.8 Release!

Post by wboy » Wed Feb 07, 2018 9:16 am

Many thanks for mini mame/advmane/sdl history lesson... greatly appreciated!

According to the MAME milestones page 0.137 was the first version that include SDLMAME as part of the main source package. Do you know if this is also the first SDL 2.0 ready version that will compile on an RPi 2/3?

I'm assuming with all your uber talents you compiled 0.172, 0.181 and 0.192 yourself. Not there yet myself but happy to learn to help the cause. Found https://choccyhobnob.com/mame-on-raspberry-pi2/ to get me start one day when I find the time.

In regards to your question, yes all test definitely ran out of Attract-Mode for advmame 0.106.

0.172 tweaks definitely the sync and performance output king by all my tests. Looks simply superb! Just rebuild me a 0.172 romset to test further.

Also had a look at the mame172.sh launcher and noticed your logic to set 720 x 240p for most common resolution horizontal games. Will sticky beak there a little more later! :D

dee2eR
Inventor
Inventor
Posts: 1857
Joined: Tue Aug 22, 2017 2:07 pm

Re: ARpiCADE 3.8 Release!

Post by dee2eR » Thu Feb 08, 2018 8:19 am

Having swapped between mame172 and advmame a few times running Snowbros based on the other thread about the refresh rate I'm not seeing the difference in the video output. What am I missing? Im testing on a 14inch monitor maybe it's not obvious at that size. Is it a scrolling thing? It just occured to me I'm testing on a static screen game...

Not sure if MAME0.137 was the first to use SDL2.0. It will probably be a harder compile than current MAME as I'm pretty sure post 170 (ish) there has been some ARM hardware specific code added. I only started compiling current MAME at 0.170. I haven't checked for a long time now but I always hoped someone would port MAME4Droid to RPi, it's based on 137 and reportedly has great performance on phones but only runs on Android (lr-MAME2010 has some of it's tweaks but isn't fantastic on Pi - I may need to update it again, maybe it will improve).

The main resolutions in use currently are 480i (used in menus and rotated and vector games), 240p@60, 256p@56 and 288p@50 controlled by the launchers as you've noticed. Today I've tried 240/224p @57.5 as per the other thread.

wboy
Contributing Member
Contributing Member
Posts: 45
Joined: Mon Jan 29, 2018 1:20 pm

Re: ARpiCADE 3.8 Release!

Post by wboy » Thu Feb 08, 2018 12:34 pm

Interesting re: MAME4droid port idea. Never even crossed my mind it could be effectively done. Think it is uses the 0.139u1 romset as I obtained a complete set back in the day when I used MAME4droid off my MINIX/Android 4.x boxes which had serious input lag using Wireless USB gamepads... twas painful gamplay at times when input had a major lag.

If what you say is accurate re: ARM specific code then 0.172 is pretty much a well timed build. It plays most of what I'll need of it, and can live with anything it cant do for now. It's a shame that site I linked to earlier has seeming removed the 164 build, as I was hoping to at least qucikly download and test/benchmark it again 172. I still may have a go a compiling it myself as per the well documented instructions (and initial compile failures) just for the learning experience.

dee2eR
Inventor
Inventor
Posts: 1857
Joined: Tue Aug 22, 2017 2:07 pm

Re: ARpiCADE 3.8 Release!

Post by dee2eR » Thu Feb 08, 2018 2:50 pm

Just had a quick look and I have a MAME 0.146-5 arm-hf binary I can't remember the origin of so I was probably wrong about the around 0.170. I can't remember having 146 so it probably has (or had at the time) some sort of issue that kept me from using it. I don't have the source but can upload the binary if you want it.

Post Reply