Switch back to MAME2003 and how to force refresh to 60

Questions about arcade game emulation support on the ARpiCADE (MAME, DAPHNE, Picodrive, etc...)

Moderator: dee2eR

Post Reply
User avatar
MikeH482
Community Member
Community Member
Posts: 9
Joined: Tue Jun 14, 2022 3:43 pm
Location: Pittsburgh, PA USA

Switch back to MAME2003 and how to force refresh to 60

Post by MikeH482 » Wed Aug 10, 2022 2:28 pm

Two questions here:

1. I want to use MAME2003 emulator, not MAME2003-PLUS. What do I need to change in order for it to use the original MAME2003 emulator? I'm running the 3.X software on a Pi3b.

2. Is there a way to force a game (or all games) to run at 60hz instead of the games native refresh rate? I have my Arpicade displaying on a 19" Wells Gardner K4900 monitor and have run into a lot of games where the sync is off and I have to adjust the monitor's horizontal or vertical hold pots in order to get the game to display properly, but then when I exit back to the AttractMode frontend or to another game, the sync is off again and I have to adjust the monitor back again. I tried to find a common monitor adjustment for all games but there just isn't one. I'm hoping that forcing games to a constant 60hz will mean all games will display properly and prevent me from having to constantly open the back of my arcade cab to tweak the monitor pots.

As always, thanks in advance to @dee2eR for the superb customer service and product support.

EDIT: I'm running the 3.X software on a Pi3b, horizontal monitor, low resolution setting.

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

Re: Switch back to MAME2003 and how to force refresh to 60

Post by dee2eR » Wed Aug 10, 2022 2:52 pm

I'm sure both are possible but I don't have an easy answer offhand for either.

I think lr-MAME2003 (regular version) is still installed (I'd have to check to be sure at this point) and it may be as easy as adjusting the launcher to use that core rather than 2003-plus. BUT... there maybe issues with the core retroarch config file if they're not compatible between 2003 and 2003-plus (again offhand I'm not sure).

The quickest hackiest way to force everything to 60hz would be to modify the resSwitch script /boot/launchers/resSwitch.sh . Backup the file first. Then using a good text editor (not the builtin Windows ones) comment out lines 159 through 347 and also line 351 and save the file. It can now only switch to 60hz 240p, you may want to also have at least one 288 line mode available, perhapps there are a few refresh rates that you find work together - you can always modify the script a bit more sparringly and use what works well for you.

Otherwise you could edit the various emulator launchers to not use the res switch script or run it in dryrun mode as the res switch script supplies the rom info for the launcher too. Probably not ideal to do it this way if you boot in 480i

It maybe easier to use an earlier version of ARpiCADE before I made all the changes to resolution/refreshs and changed to 2003-plus.

What is the advantage of 2003 over plus out of curiosity?

User avatar
MikeH482
Community Member
Community Member
Posts: 9
Joined: Tue Jun 14, 2022 3:43 pm
Location: Pittsburgh, PA USA

Re: Switch back to MAME2003 and how to force refresh to 60

Post by MikeH482 » Wed Aug 10, 2022 3:21 pm

Thanks @dee2eR! I will try those options and report back.

Instead of hashing out those lines in the ResSwitch file, can I just delete them? If so, that would be a fast way for me to test it. I'll be sure to make a backup of the file to revert to if needed.

MAME2003_Plus is a good emulator but because it is under active development (forked from Mame2003), some of the roms in the mame 078 romset won't work anymore (unless you update the romset for the correct version of Plus) and that will continue happening as development of that emulator continues. I don't really like updating romsets unless there's a really big benefit, and my standard 078 romset has always worked great in regular MAME2003. If it isn't broke, don't fix it, right? :D Regular MAME2003 is kind of frozen in time so it removes the variable of new versions / updates and incompatibility when troubleshooting.

I typically use Advmame1.4, and then mame2003 is my trusty fallback.

Where can I get an older version of the ArPiCade software? The download links (for v3.7 for example) on the main webpage don't seem to work anymore.

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

Re: Switch back to MAME2003 and how to force refresh to 60

Post by dee2eR » Wed Aug 10, 2022 3:47 pm

Fair enough.

Yeah deleteing the lines will also work. Let me know how it goes.

You're in luck with the launcher for 078. I just checked and it has the old MAME2003 version commented out including refering to it's own config file (that I have left, I just checked). If you check out the launcher script /boot/launchers/mame078.sh it should be obvious how to swap the version in use from plus to normal 2003. - let me know if you need better instrucitons or if it doesn't work and I need to check it out.

On the older versions:
3.84 should still be online. Although checking the release notes it's the version where the change to 2003-plus happened so that doesn't help you there...

The multi part download version of 3.7 should still be online, at least it's still in my google drive... I can copy the links if you like, assuming they're different to what you already tried. Generally I wouldn't recommend it at this point as it is starting to seem like more work than adjusting 3.X to suit...

User avatar
MikeH482
Community Member
Community Member
Posts: 9
Joined: Tue Jun 14, 2022 3:43 pm
Location: Pittsburgh, PA USA

Re: Switch back to MAME2003 and how to force refresh to 60

Post by MikeH482 » Wed Aug 10, 2022 11:36 pm

Tried your suggestions regarding the ResSwitch.sh file and went down a bit of a rabbit hole but I'll sum it up. Hashing out or deleting those lines in the ResSwitch.sh file took care of the refresh issues, but introduced resolution issues where most of the games only displayed in the center third of the screen. I'm guessing this is because they were displaying in 1920x240 system resolution per the other parameters I saw in the ResSwitch and config files. So that wasn't a viable solution.

What DID WORK was editing the advmame emulator launcher to not use the res switch script (/boot/launchers/advmame.sh), hashing out the line:
# set resolution
# /boot/launchers/resSwitch.sh $1

This got rid of the refresh issues for advmame106 games and they still display in the proper aspect ratio from my initial testing. This solution ONLY WORKS IN 240P MODE though, it does not work in low res mode. I was surprised that this one worked while the other suggestion didn't, because in theory they should produce the same result! But that's not what I experienced. Obviously this is a bit of a hack and not for the purists, but I'm guessing purists aren't using an rpi emulation setup. Also, I noticed system performance improvements (games load faster, etc) for the few dozen games I tested so far using this hacked setting.

Most games in MAME2003 (mame078) don't experience the same refresh issues as AdvMame so I'm leaning towards using the mame078 roms and emulator when possible.

I haven't played with the MAME2003 vs MAME2003-Plus emulator selection yet. Will try that later.

Thanks again for your help and guidance @dee2eR, I'll update this again once I test a bit more, hopefully it will help anyone else who runs into a similar issue.

Post Reply