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: Skip Startup Frames reborn as MAME Plugin  (Read 5302 times)

0 Members and 1 Guest are viewing this topic.

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Skip Startup Frames reborn as MAME Plugin
« on: November 12, 2024, 07:33:42 pm »
Maybe some of the older folks around here remember the cool Skip Startup Frames patch that was floating around back in ~2004 and made it into some long-forgotten MAME forks.

I recently recreated it as a MAME Plugin:

https://github.com/Jakobud/skipstartupframes

Just install it in MAME, enable it and MAME will automatically skip the startup sequences for your roms.

MAME 0.253 or newer required.


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #1 on: November 13, 2024, 12:16:42 am »
Nice plugin, Jakobud.   :cheers:

It ran well with many of the games I tried in MAME 0.262 using MAME's UI.

The plugin is a little flaky with Defender and Stargate.
- Occasionally the game reports a RAM error on startup, but hitting F3 (reset) always clears it.
- I have the "defenderlr" plugin in the .ini for those games so I added skipstartupframes in the game .inis as well.
Code: [Select]
plugin         defenderlr
plugin         skipstartupframes

One game that completely blows up with this plugin is S.T.U.N. Runner. (stunrun)
- Running it from MAME's UI, it spams the attached error message message in an endless loop, drops out of fullscreen, and the game runs muted and fast-forward.
- Running it from command line, it does the same except it does not drop out of fullscreen.
- Tried to disable the plugin by putting this in stunrun.ini, but it had no effect.
Code: [Select]
noplugin         skipstartupframes
-  The good news is that you can disable the plugin by either deleting the game's entry in the ssf.txt file or launching the game from the command line using "-noplugin" to disable the plugin.
Code: [Select]
mame stunrun -noplugin skipstartupframes


Scott

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #2 on: November 13, 2024, 12:31:44 am »
Thanks for the report. I will look into that. I was wondering if any issues would happen with games with multiple screens but I don't think Stunrunner has any type of weird screen setup. Thanks,

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #3 on: November 13, 2024, 02:30:32 am »
Fixed: https://github.com/Jakobud/skipstartupframes/releases

On a side note it seems like the ssf.txt frames for stun runner are WAY too high

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #4 on: November 13, 2024, 07:06:04 am »
When people submit entries, should the frames skipped only cover the bootup items like RAM checks that aren't part of the attract mode cycle, or should it also skip company logos, region code screens, FBI message screens, etc. so it goes straight to the title screen or eye-catching attract mode animation?
- For example, the current setting "macross,104" shows the Banpresto logo for four seconds before the eye-catching animation kicks in and Kono e Tako shows two company logos before it gets to the title screen.  The logos are part of the attract mode cycle for these games.

Fixed: https://github.com/Jakobud/skipstartupframes/releases

On a side note it seems like the ssf.txt frames for stun runner are WAY too high
S.T.U.N. Runner is confirmed working.   :cheers:
- The setting is indeed WAY too high -- it should be 180.

There are lots of other values that look insanely high like Dangerous Seed "dangseed,10510".   :o

Some entries have a negative number like Seibu Cup Soccer "cupsoc,-1".   :dizzy:

Bottom line:  Looks like the whole list needs a sanity check.

The following submissions skip straight to the title screen or the beginning of the attract mode animation.

  Updates:
Cyber Sled - cybsled,360
Eco Fighters - ecofghtr,1000
Ikari Warriors - ikari,350
Ms. Pac-Man - mspacman,294
Pole Position - polepos,372
Prop Cycle - propcycl,20
S.T.U.N. Runner - stunrun,180
Warlords - warlords,0

  New entries:
Kono e Tako - konotako,535
Omega (Nihon) - omega,40
Polygonet Commanders - plygonet,1710
Shooting Gallery - shootgal,52


Scott

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #5 on: November 13, 2024, 05:34:20 pm »
The frame to skip to can kind of be whatever you want. There is no definitive answer. I think ideally getting the game AT LEAST to the point where you can insert credits and start a game would be the minimum. Going past FBI screens and other logos may or may not be desired.

I agree some of the frame values are wacky. I'm not sure if the ssf.txt that I tracked down for the project was the newest possible version from back in ~2004.

I don't know if you have any experience with Github, but the easiest place to submit updates to the ssf.txt would be to edit it in the Repository here:

https://github.com/Jakobud/skipstartupframes/blob/main/ssf.txt

And then you can create a "pull request" that would allow me to look over the changes and add them into the code base. It makes things more collaborative and easier to manage. And don't feel like you need to do it for every little change one at a time. Just make a bunch of changes and them submit the changes once a week or however often you like.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #6 on: November 13, 2024, 08:46:10 pm »
I don't know if you have any experience with Github
I frequently use the site to look for info in MAME source code or download code, but have no account there and don't plan on making one.

The changes above are for all of the limited number of ROMs I currently have on an install of MAME 0.262.
- I usually use that install for retro-computing, lua scripts, and things that need a relatively recent version of MAME.


Scott

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 718
  • Last login:December 31, 2024, 11:07:53 am
  • I want to build my own arcade controls!
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #7 on: November 14, 2024, 03:31:18 pm »
This is super cool. I will check it out this weekend. Thank you very much.

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 718
  • Last login:December 31, 2024, 11:07:53 am
  • I want to build my own arcade controls!
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #8 on: November 15, 2024, 02:42:05 pm »
Very very cool and functional plugin! It will be a lot of work going through my personal collection of games and adjusting the values on some of the games - usually more modern ones (3D).

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 718
  • Last login:December 31, 2024, 11:07:53 am
  • I want to build my own arcade controls!
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #9 on: November 16, 2024, 02:23:16 pm »
Any chance you make the plugin work in a way we can actually change the frame value from inside mame?

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #10 on: November 16, 2024, 10:27:05 pm »
Any chance you make the plugin work in a way we can actually change the frame value from inside mame?

Hmmmm... that is a good idea. Yes I think it would be possible. Technically at least very possible. Being able to change any game from in the menu would not work well because there are 2000's games to pick from and it wouldn't work from a UX perspective in the menu system. But being able to change the frames for the current game.... yeah I think I could implement that. Thanks for the idea.

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 718
  • Last login:December 31, 2024, 11:07:53 am
  • I want to build my own arcade controls!
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #11 on: November 17, 2024, 04:30:32 am »
yes just the current game of course! Now when I launch a game and the settings are outdated I have to exit the game, exit the frontend, launch my explorer, got to the text file, then open cmd, launch the game, activate debug, get the number, exit the game, change the number in the text file, check again....uff :D

My good friend Foxhole just had the idea that you might be able to set it with a keyboard key. Press a defined key and it will write the current frame value for the game!
« Last Edit: November 17, 2024, 04:44:19 am by Endprodukt »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #12 on: November 17, 2024, 06:17:50 am »
But being able to change the frames for the current game.... yeah I think I could implement that.
Given the huge range of possible values, are you thinking about a slider or some other input method in the plugin menu?
- Even with limited testing, values between 0 and 1710 were confirmed good.
- I assume the plan is something like reading the value from ssf.txt when a game is launched and injecting it into a variable used  by an adjustable slider in the plugin menu.

Right now, ssf.txt is only read when MAME first starts up.  If you Alt-Tab from MAME over to the text file, change a value, save the file, and Alt-Tab back to MAME, the updated value won't be recognized when you "F3" reset in the game or restart the game from MAME's UI.  You have to fully exit and relaunch MAME for the new value to be recognized.

If the slider or other menu-based adjustment method doesn't work, can the plugin re-read ssf.txt either when an "F3" reset is triggered or when a game is launched?


Scott

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #13 on: November 18, 2024, 05:12:17 pm »
But being able to change the frames for the current game.... yeah I think I could implement that.
Given the huge range of possible values, are you thinking about a slider or some other input method in the plugin menu?

Unfortunately I think the only option would be a increase/decrease frame value 1 frame at a time. There is limited functionality in the MAME Menu system API and it's completely undocumented and tricky to work with. One of the MAME Dev's told me that they need to rewrite it into something better because of it's current state.

In the meantime though I can make the ssf.txt reload on each game start/restart though. That's pretty easy.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #14 on: November 18, 2024, 07:54:36 pm »
I can make the ssf.txt reload on each game start/restart though. That's pretty easy.
Excellent.   ;D


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #15 on: November 20, 2024, 01:29:09 pm »
I was wondering if any issues would happen with games with multiple screens
Tried it with Buggy Boy (3 screens) and it works great.   :cheers:
- In debug mode, the ROMname and frame count is shown on all three screens.


Scott

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #16 on: November 20, 2024, 05:45:45 pm »
I was wondering if any issues would happen with games with multiple screens
Tried it with Buggy Boy (3 screens) and it works great.   :cheers:
- In debug mode, the ROMname and frame count is shown on all three screens.


Scott

That was what I expected. After fixing the stunrunner bug I adjusted to code to write the frames to all screens that exist for the game.

Also thank you for the pull request!
« Last Edit: November 20, 2024, 05:47:56 pm by Jakobud »

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #17 on: November 20, 2024, 06:29:16 pm »
Soon...

The "left/right" controls for this are unfortunately the best that I think can be done in MAME's menu system. So not ideal if you need to adjust frames a bunch, but for fine tuning it should work fine.


Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #18 on: November 21, 2024, 01:27:21 am »
Updated with the above changes:

https://github.com/Jakobud/skipstartupframes/releases/tag/v1.3.0

ssf.txt is now loaded anytime a game is started or reset
You can edit frame target for the currently loaded game in the Plugin Options Menu
Any changes to the frame target will be saved when exiting the game
Several frame updates for games thanks to PL1

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #19 on: November 21, 2024, 01:49:58 am »
thank you for the pull request!
Glad to assist.   :cheers:

If anyone wants to contribute updates for ssf.txt but they don't have a GitHub account, post them in this thread and I'll generate a pull request that credits you. (or doesn't credit you, if you prefer)

The "left/right" controls for this are unfortunately the best that I think can be done in MAME's menu system. So not ideal if you need to adjust frames a bunch, but for fine tuning it should work fine.
The new v1.3.0 release works great!   :notworthy:   :applaud:   :notworthy:
- If anyone needs to do a huge adjustment, the easiest way is to edit ssf.txt.
- The "left/right" controls and F3 reset are ideal for fine tuning.


Scott

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 718
  • Last login:December 31, 2024, 11:07:53 am
  • I want to build my own arcade controls!
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #20 on: November 21, 2024, 02:10:49 pm »
Great updates. If we had a button to record the current frame and then use the cursor for fine adjustments we are golden.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #21 on: November 22, 2024, 03:24:54 am »
Feature suggestions: Restore default frame setting and/or a custom "diff" file.

1. Would it be possible to modify ssf.txt to add a default value and add a way to reset to default in the menu--either a separate menu entry or pressing ENTER while the frame target menu entry is highlighted?

  Current format for ssf.txt:
[romname],[current frame target value]

  Proposed format for ssf.txt:
[romname],[current frame target value],[default frame target value] or
[romname],[default frame target value],[current frame target value]

2. If users make changes to the frame target, those changes will be lost when they update to a new version of the plugin.

Would it be possible to write changes to a separate custom.txt "diff" file that overrides ssf.txt?

If you use this approach, ssf.txt can keep the [romname],[default frame target value] format and write [romname],[current frame target value] to custom.txt on game exit when the value is changed.

New releases of the plugin would not include a custom.txt file so the user's old custom settings would not be overwritten by the new ssf.txt file.

As with the first suggestion, it would be great to have a way to reset frame target to default from the menu.


Scott

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #22 on: November 22, 2024, 10:52:40 am »
That is a good idea. I had not considered the fact that the ssf.txt would get completely overwritten when upgrading. I will look into it.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #23 on: December 06, 2024, 07:27:20 pm »
Here's a partial solution if anyone has a problem with the plugin currently not seeing a change of the "Slow Motion" switch until you:
  1.) Pass the Frame Target value,
  2.) Turn off "Debug Mode", and
  3.) Exit/restart the game.

The "Slow Motion" switch change will register if you turn off "Debug Mode" then press "Shift" + "F3". (hard reset)

---------------------------------------------------------------
The "Shift" + "F3" (hard reset) also gives you the same Frame Target value as an exit/restart where a simple "F3" (reset) often needs less frames to get to the same screen.

For example, one game where this difference is very obvious is Dangerous Seed. (dangseed,990)
- When you first launch the game or exit and restart or "Shift" + "F3" (hard reset) , Frame Target 990 is at the screen where the Namco letters start to fly in.
- When you "F3" (reset) the game, Frame Target 990 is at the next screen with the Dangerous Seed logo -- about 9 seconds later.


Scott
EDIT: Issue fixed in release v2.0.0.
« Last Edit: December 15, 2024, 06:11:48 pm by PL1 »

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #24 on: December 15, 2024, 12:44:19 pm »
New release with lots of updates

https://github.com/Jakobud/skipstartupframes

https://github.com/Jakobud/skipstartupframes/releases

- Added support for soft reset frames
- Added ssf_custom.txt for saving custom frame values
- Fixed debug and slow motion toggling

« Last Edit: December 15, 2024, 05:17:41 pm by Jakobud »

Sky25es

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 165
  • Last login:Today at 01:39:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #25 on: January 02, 2025, 02:51:23 am »
Thank you very much for your work.  :cheers:
Now, I don't know why but it doesn't work for me with galaga. I have tried other games without problem...

edit:
Apparently there are other games that don't work either. Salamander, i.e.
I'm using Mameui64 0.273 btw.
« Last Edit: January 02, 2025, 03:00:49 am by Sky25es »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #26 on: January 02, 2025, 01:27:05 pm »
Now, I don't know why but it doesn't work for me with galaga. I have tried other games without problem...

edit:
Apparently there are other games that don't work either. Salamander, i.e.
I'm using Mameui64 0.273 btw.
What value does the MAME plugin menu show for the games that aren't working?

Does an .ini file for those games enable a different plugin instead of SSF?

Both Galaga (galaga,870) and Salamander (salamand,465) are working fine in mainline 0.262 and 0.272.   :dunno

In the original SSF release, Salamander had a really high value (salamand,10809) that was later corrected.
- One odd thing I've noticed about Salamander is that if you "F3" Reset the game, it goes through the power-on test sequence then goes to a black screen instead of going into attract mode, but that isn't caused by the SSF plugin.  If you do a normal game start or a "Shift" + "F3" Hard Reset/Restart it works correctly.


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #27 on: January 02, 2025, 04:30:45 pm »
SSF plugin spot tested good with Galaga, Salamander, Defender, Stargate, and Donkey Kong in MAMEUI v0.273.

If the plugin doesn't start, check these things:

1. Is the SSF plugin enabled in Options -- Default System Options ("LUA" tab) as shown in the attached image?
- Exit and restart MAMEUI after you change these settings for them to take effect.

2. Is the SSF plugin enabled in mame.ini and the game's .ini file? (plugins=1 and plugin=skipstartupframes)
Code: [Select]
#
# SCRIPTING OPTIONS
#
autoboot_command         
autoboot_delay            0
autoboot_script           
console                   0
plugins                   1
plugin                    skipstartupframes

3. If it still doesn't want to start, try launching the game and plugin from command line.
Code: [Select]
mameui galaga -plugin skipstartupframes


Scott
« Last Edit: January 02, 2025, 06:07:25 pm by PL1 »

Sky25es

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 165
  • Last login:Today at 01:39:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #28 on: January 04, 2025, 03:18:47 am »
Hey Scott, thanks a lot for your assistance.  :)
Ok. I discovered why it didn't work, at least for me. For some strange reason I have to disable waitvsync in mame.ini.
With vsync on, the plugin doesn't work with some games.
Another issue: The "Black out screen during startup" option doesn't work, even if I change it inside the "options.cfg" file. I can disable it only if I modify the "src/options.lua" file.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #29 on: January 04, 2025, 07:07:35 am »
Ok. I discovered why it didn't work, at least for me. For some strange reason I have to disable waitvsync in mame.ini.
With vsync on, the plugin doesn't work with some games.
Glad you figured that out.   :cheers:

If you can post which games were and weren't working with vsync on, that might help Jakobud refine the plugin.

Another issue: The "Black out screen during startup" option doesn't work, even if I change it inside the "options.cfg" file. I can disable it only if I modify the "src/options.lua" file.
Now that you mention it, I haven't tested that option or "Mute audio during startup" yet -- another thing to add to the To-Do list.


Scott
EDIT:  Both settings work and save properly in mainline MAME.

Both settings can be turned off in MAMEUI and stay off when you "F3" (Reset) or "Shift" + "F3" (Hard Reset), but they are not saved when you exit the game and restart.  As you mentioned, editing the options.cfg file does not make any difference.

There are definitely differences in LUA script handling between mainline and MAMEUI.  For example, the defenderlr plugin works in mainline, but errors out when you launch Defender or Stargate in MAMEUI.
« Last Edit: January 04, 2025, 08:09:09 am by PL1 »

Sky25es

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 165
  • Last login:Today at 01:39:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #30 on: January 04, 2025, 11:32:43 am »
Quote
If you can post which games were and weren't working with vsync on, that might help Jakobud refine the plugin.

A couple of games with the issue:

88games
gaiden
galaxian
gradiusb
gradius2
pacman
galaga
salamand

Quote
EDIT:  Both settings work and save properly in mainline MAME.

Both settings can be turned off in MAMEUI and stay off when you "F3" (Reset) or "Shift" + "F3" (Hard Reset), but they are not saved when you exit the game and restart.  As you mentioned, editing the options.cfg file does not make any difference.

There are definitely differences in LUA script handling between mainline and MAMEUI.  For example, the defenderlr plugin works in mainline, but errors out when you launch Defender or Stargate in MAMEUI.

As you said, there must definitely be some problem with MameUI...

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #31 on: January 04, 2025, 04:18:47 pm »
Asked Robbbert about it.  Hopefully he can provide some insight or advice.
https://github.com/Robbbert/mameui


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #32 on: January 07, 2025, 09:16:44 am »
Robbbert explained why the MAME version check in the defenderlr plugin fails but the one in skipstartupframes plugin doesn't.
Quote
The reason for that particular failure is because the version number is a number or a string in MAME, but only a string in MAMEUI. You'll note that MAMEUI's version number is 0.273.1, which is a not a number but can only be a string. MAME's version of 0.273 could be considered a number or a string, as needed.
There are other MAME forks that could return version numbers that would be a string, but not a number such as NegaMAME version "0.273-1".
- Maybe plugin authors can use the first 5 digits of the version to run the check -- not sure how to code that, though.   :dunno

No word yet on what could be causing the problem with the ssf "black out screen" or "mute audio" settings not saving on game exit with MAMEUI.


Scott
EDIT: Just got another update from Robbbert.
Quote
After some investigation I found that the version in MAME is a string. LUA doesn't really care, so if it looks like a number then it can be abused to be a number. So authors should really treat it as a string. I've made a bunch of changes in MAMEUI so that LUA will give the short version (0.273), and so the shaders should work. Wait a few hours for it to build, then you can get it from github. (haven't tested it myself)

I need to update ARCADE64 and HBMAME with these changes as well, but that can wait.
EDIT2: Here's Aaron's version check code update for the defenderlr plugin.
It changes from this number check . . .
Code: [Select]
if tonumber(emu.app_version()) >= 0.254 then
. . . to this string check.
Code: [Select]
if emu.app_version() >= "0.254" then
https://github.com/AaronBPaden/defenderlr/commit/1897ee6c7bf7e997f629591ff84be1d5bd2417d4
« Last Edit: January 08, 2025, 03:52:30 am by PL1 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #33 on: January 07, 2025, 02:18:01 pm »
Did some more testing on the "black out screen" and "mute audio" settings not saving.

When you launch MAME or MAMEUI, both of these settings are always enabled.

These two settings can be changed while in a game, but they do not save like the other settings do.

With MAME, the settings will persist in any other game you launch until you exit MAME.

With MAMEUI, the settings will persist until you return to the MAMEUI game selection page. The settings will persist in MAMEUI only if you change games using the Select New System entry in the built-in MAME menu.

Even editing the plugin's options.cfg file does not allow you to disable these settings.

Shouldn't the default or custom values for these settings save somewhere like the options.cfg (for defaults) or ssf_custom.txt file? (for custom per-game settings)

I know it's an edge case, but picture a user that wants the plugin to work as usual for most games and wants to see the DECO Cassette countdown speeding by instead of a 13 second black screen so guests won't wonder if the system has crashed when those games launch. Should these settings be configurable on a per-game basis?


Scott

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #34 on: January 08, 2025, 10:51:09 am »
I am just getting caught up on this. I am investigating those settings not saving as well as the version check string/number thing.

Also in the future, if you have a bug report, it is helpful to report it here: https://github.com/Jakobud/skipstartupframes/issues

I will most likely see it sooner. Also some other good advantages to posting them on there so I can link fixes to the issues and link to lines of code etc.

Thanks!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9566
  • Last login:Today at 02:28:46 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #35 on: January 08, 2025, 09:03:59 pm »
I am investigating those settings not saving as well as the version check string/number thing.
Your version check starting at line 164 of /src/startplugin.lua . . .
Code: [Select]
if emu.add_machine_reset_notifier ~= nil and emu.add_machine_stop_notifier ~= nil then
. . . is good in MAMEUI v0.273.1 which indicates that your plugin's way of version checking is a not affected by the string/number issue like Aaron's defenderlr plugin was with this number check.
Code: [Select]
if tonumber(emu.app_version()) >= 0.254 then

If you ever want to have different configurations to support different generations of LUA (i.e. one version for 0.254 and newer, another version for 0.227- 0.253 . . .), you could probably use an if/then/else version of Aaron's updated version string check.
Code: [Select]
if emu.app_version() >= "0.254" then

Also in the future, if you have a bug report, it is helpful to report it here: https://github.com/Jakobud/skipstartupframes/issues
https://github.com/Jakobud/skipstartupframes/issues/12
I reported it there, then cross-posted it here for those who aren't on GitHub.   :cheers:


Scott

Sky25es

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 165
  • Last login:Today at 01:39:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #36 on: January 10, 2025, 03:37:02 am »
Thanks Jakobud and Scott for your time and dedication.
Just an idea: would it be possible to add a temporary frame-skipping option to the plugin? I did a test and it's much much faster with frame-skip on,  which would be great for low-end systems or more demanding games....

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1960
  • Last login:January 10, 2025, 02:08:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #37 on: January 10, 2025, 12:26:30 pm »
Just an idea: would it be possible to add a temporary frame-skipping option to the plugin? I did a test and it's much much faster with frame-skip on,  which would be great for low-end systems or more demanding games....

I briefly experimented with this when I was writing the plugin but did not include it (for whatever reason). I will investigate and determine any potential downsides or side effects of this.

Sky25es

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 165
  • Last login:Today at 01:39:55 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #38 on: January 11, 2025, 05:53:54 am »
I briefly experimented with this when I was writing the plugin but did not include it (for whatever reason). I will investigate and determine any potential downsides or side effects of this.

Great! Thanks  :applaud: