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 16497 times)

0 Members and 1 Guest are viewing this topic.

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #40 on: January 16, 2025, 05:22:48 pm »
New release with fixes to everything recently reported:

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

Note: The Vsync issue I don't believe can be addressed at this time. There is no LUA API to control vsync or even detect if it's enabled or not. If MAME dev's are able to support such a venture in the future I could update the plugin to support that.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9669
  • Last login:Yesterday at 11:59:47 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #41 on: January 16, 2025, 08:39:29 pm »
Looks great, Jakobud.    :applaud:   :notworthy:   :applaud:

All of the new features test good in both MAME and MAMEUI.
- Blackout and mute settings work and persist. (saved in options.cfg)
- ROMnames with an "_" work.


Scott

Sky25es

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 173
  • Last login:July 03, 2025, 01:08:02 am
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #42 on: January 18, 2025, 08:18:13 pm »
Wow! Great job.  :applaud: Thanks a lot

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9669
  • Last login:Yesterday at 11:59:47 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #43 on: March 08, 2025, 10:52:58 pm »
For those of you who aren't following the progress on GitHub, work continues on checking all of the frame values in ssf.txt.
- Tested all games with values over 700.
- 34.32% checked. (1005 of 2928)

As these checks are done, I send Pull Requests to the Develop branch of Jakobud's skipstartupframes Github.

When he's ready to do a new official release, he'll update the Main branch with all of the merged Pull Requests from the Develop branch.

Since it can take a while between official releases, the number of pending updates can really add up.
- Currently there are 24 commits pending with a total of 761 updates to ssf.txt.

If anyone wants the latest bleeding edge version of ssf.txt, you can get it from the "ssf_txt" branch of my fork.
https://github.com/PL1-Arcade/skipstartupframes/tree/ssf_txt
- Click on the green "code" icon and download the .zip file.
- Copy the ssf.txt file from the .zip to your "mame\plugins\skipstartupfiles\" folder (replaces the old one) and you're good to go.   :cheers:


Scott
EDIT: Updated link to point to the "ssf_txt" branch of my fork since that is where I make the changes (Commits) and submit the updates (Pull Requests) for the ssf.txt file.
« Last Edit: April 25, 2025, 05:33:20 am by PL1 »

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #44 on: April 10, 2025, 10:39:34 am »
New release of this plugin today v2.2.0. Contains a crazy amount of updates from the extremely dedicated PL1!

https://github.com/Jakobud/skipstartupframes

10yard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 141
  • Last login:Yesterday at 05:10:47 pm
  • L BREAK into program
    • DKAFE Frontend
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #45 on: May 02, 2025, 06:08:12 am »
Thank you for this amazing plugin!

I made a fork of your github repo to add support further back to MAME 0.227.   This allowed me to include the plugin within my custom built arcade frontend (currently running on MAME 0.241).
The fork is at https://github.com/10yard/skipstartupframes

To get this running on the older versions I had to register your machine notifications using the now deprecated emu.register_start and emu.register_stop.  See below.

Code: [Select]
  -- MAME 0.254 and newer compatibility check
  if emu.add_machine_reset_notifier ~= nil and emu.add_machine_stop_notifier ~= nil then
    startNotifier = emu.add_machine_reset_notifier(start)
    stopNotifier = emu.add_machine_stop_notifier(stop)
    menuNotifier = emu.register_menu(menu_callback, menu_populate, _p("plugin-skipstartupframes", "Skip Startup Frames"))

  -- MAME 0.227 and newer compatibility check
  elseif tonumber(emu.app_version()) >= 0.227 then
    emu.register_start(function()
startNotifier = True
        start()
end)
    emu.register_stop(function()
stopNotifier = True
        stop()
end)
    menuNotifier = emu.register_menu(menu_callback, menu_populate, "Skip Startup Frames")

  else
    ---- MAME version not compatible (probably can"t even load LUA plugins anyways)
    print("Skip Startup Frames plugin requires at least MAME 0.227")
    return
  end


Also,  to accelerate the start,  I made use of frameskip to launch most of my games instantly.  I set to 11 after blacking out the screen and back to 0 after resetting the throttle.

Code: [Select]
video.frameskip = 11

« Last Edit: May 02, 2025, 07:41:33 am by 10yard »
Check out my Donkey Kong Arcade Frontend at https://github.com/10yard/dkafe#readme


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9669
  • Last login:Yesterday at 11:59:47 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #46 on: May 02, 2025, 05:25:08 pm »
I made a fork of your github repo to add support further back to MAME 0.227.   This allowed me to include the plugin within my custom built arcade frontend (currently running on MAME 0.241).
The fork is at https://github.com/10yard/skipstartupframes

To get this running on the older versions I had to register your machine notifications using the now deprecated emu.register_start and emu.register_stop.  See below.

Code: [Select]
  -- MAME 0.254 and newer compatibility check
  if emu.add_machine_reset_notifier ~= nil and emu.add_machine_stop_notifier ~= nil then
    startNotifier = emu.add_machine_reset_notifier(start)
    stopNotifier = emu.add_machine_stop_notifier(stop)
    menuNotifier = emu.register_menu(menu_callback, menu_populate, _p("plugin-skipstartupframes", "Skip Startup Frames"))

  -- MAME 0.227 and newer compatibility check
  elseif tonumber(emu.app_version()) >= 0.227 then
    emu.register_start(function()
startNotifier = True
        start()
end)
    emu.register_stop(function()
stopNotifier = True
        stop()
end)
    menuNotifier = emu.register_menu(menu_callback, menu_populate, "Skip Startup Frames")

  else
    ---- MAME version not compatible (probably can"t even load LUA plugins anyways)
    print("Skip Startup Frames plugin requires at least MAME 0.227")
    return
  end
Hey Jon,

Thanks for adding support back to v0.227.   :cheers:

To implement a best practice recommended by Robbbert, you may want to change the 0.227 compatibility check in your code from a number check to a string check like this.
Code: [Select]
elseif emu.app_version() >= "0.227" then

That change will allow it to also work with MAME forks that use hyphenated/alternate numbering systems like NegaMAME (v0.277-1), MAMEUI (v0.277.0), and -- most importantly -- the currently unsupported HBMAME (v0.245.24) which is stuck at v0.245 due to a major restructuring in mainline MAME that took place in v0.246.

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


Scott

10yard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 141
  • Last login:Yesterday at 05:10:47 pm
  • L BREAK into program
    • DKAFE Frontend
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #47 on: May 06, 2025, 03:38:50 am »
To implement a best practice recommended by Robbbert, you may want to change the 0.227 compatibility check in your code from a number check to a string check like this.
Code: [Select]
elseif emu.app_version() >= "0.227" then
Hey Scott.  Thanks.  I've updated the compatibility check in my forked version.
Check out my Donkey Kong Arcade Frontend at https://github.com/10yard/dkafe#readme


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9669
  • Last login:Yesterday at 11:59:47 pm
  • Designated spam hunter
Re: Skip Startup Frames reborn as MAME Plugin
« Reply #48 on: May 06, 2025, 07:08:44 am »
Hey Scott.  Thanks.  I've updated the compatibility check in my forked version.
Glad to assist.   :cheers:

I have a few questions about changing the frameskip value to 11 then back to 0 to speed up the plugin.

1. Some of the values in ssf.txt need to be exactly accurate so the game starts after the bootup video and before attract mode sound starts playing.
- Can changing frameskip to 11 cause the exact starting frame to be different than leaving frameskip at 0?

2. Some people use a non-zero frameskip value to get full speed emulation for a game/system that would otherwise be too demanding for their computer.
- I assume it is possible to read/use that frameskip value from MAME or the .ini files for each game, right?
- Maybe have the plugin set a variable when starting a game/system that holds the correct frameskip for that game/system.

3. Shouldn't frameskip also be set back to default when the ssf plugin is in debug mode so it is easier to find accurate values for ssf.txt?


Scott
EDIT: Thinking more about question #1.

The frameskip value equals how many frames per group of 12 frames will be skipped.

If frameskip = 11 does cause a problem with starting on the correct frame because MAME is rendering one frame then skipping the next eleven (1 rendered + 11 skipped = 12), the starting frame accuracy could be increased by using smaller frameskip values.

If frameskip = 10 (2 rendered + 10 skipped = 12), you'd get 1 rendered then 5 skipped -- doubles the accuracy with only a slight decrease in speed.

If frameskip = 9 (3 rendered + 9 skipped = 12), you'd get 1 rendered then 3 skipped.

If frameskip = 8 (4 rendered + 8 skipped = 12), you'd get 1 rendered then 2 skipped.

If frameskip = 6 (6 rendered + 6 skipped = 12), you'd get 1 rendered then 1 skipped -- the lowest value that makes sense and accuracy is always either the target frame or target plus 1 frame.
« Last Edit: May 06, 2025, 06:22:38 pm by PL1 »