-
From what I understand you would typically use However I recently came across a MAME rom: I noticed that this game has a startup procedure like most games (checking roms, sound, etc). It lasts for maybe 10+ seconds or so. But if you hit reset (F3) for this game, it restarts the game but the startup sequence is shortened to only 1-2 seconds. It appears to skip a lot of the sequence from when you start the game initially. Are these two different events in LUA? the There are probably other games with this behavior but this is the first I've noticed. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
Not sure about precise names but initial startup is hard reset which calls "start+reset" and can be reinitiated with Shift+F3 |
Beta Was this translation helpful? Give feedback.
-
MAME has a defined order of operations. When you start up an emulated machine, it first calls "start" on everything, and then it calls "reset" on everything. This is pretty much how all digital hardware works if you think of the "start" as turning the power on. First you apply power, and then some circuit automatically resets (at least) the CPU so that it can start running in a known state. |
Beta Was this translation helpful? Give feedback.
-
There currently isn’t a way to get a callback on start. |
Beta Was this translation helpful? Give feedback.
-
Perhaps an extra bool parameter to the reset callback? Lua is very
permissive there.
…On Thu, Nov 21, 2024 at 6:11 PM Jake Wilson ***@***.***> wrote:
Thank you for the insight and brilliant work you do!
—
Reply to this email directly, view it on GitHub
<#161 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGSF4JPPX3FYP3FGI4BX532BYH2HAVCNFSM6AAAAABSFWIAXSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMZTHEZDOOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Okay I found a workaround to this.
Then at start of my
And then in my
This appears to accurately differentiate between a start/hard reset and a soft reset. |
Beta Was this translation helpful? Give feedback.
There currently isn’t a way to get a callback on start.
emu.register_start
was named misleadingly – it was called on reset. It’s something I’d like to add, but I don’t want to go changing the callbacks without thinking it through properly – I don’t want to create churn, particularly when it might affect core classes like the running machine and the externally visible Lua API.