Posts for CrowdSorcerer

Experienced Forum User
Joined: 4/10/2019
Posts: 5
£e Nécroyeur wrote:
CrowdSorcerer, are you familiar with PinMAME?
Yes, but unfortunately it's not suitable for this project. The only API/interface is a windows COM interface, which right off the top seems to be inappropriate for TAS usage. I don't actually need any of the table modeling or scripting to do what I want, I "just" need a modern version of MAME with a set of callbacks in the Lua interface similar to what mame-RR does.
Experienced Forum User
Joined: 4/10/2019
Posts: 5
My friend points out "memory_registerwrite" ... :)
Experienced Forum User
Joined: 4/10/2019
Posts: 5
@feos : Is there a list somewhere of functionality that mame-RR adds to MAME? A friend who has need of the Lua interface in mainline MAME is potentially willing and able to contribute patches, and so it would be good to understand how exactly mame-RR differs. Even a list of all of the novel callbacks exposed via its lua interface would be a good starting point. Edit : I found https://github.com/TASVideos/mame-rr/wiki/Lua-scripting-functions, but the general question stands!
Experienced Forum User
Joined: 4/10/2019
Posts: 5
Thanks all for the responses! @feos : From what I can tell, the only callbacks MAMEline Lua features are listed here - https://github.com/mamedev/mame/blob/7e623cc8862f7b04a65924a99a9ab354008e2eea/src/frontend/mame/luaengine.cpp#L735 The only one that seems usable for me is the callback at the end of the frame, so my current plan is : a) write code that does things via the end-of-frame callback b) occasionally sleeping for [x] frames c) experimentally determining values of [x] vis a vis the ROM "sampling rate"
Post subject: TASing pinball ROMs in MAME
Experienced Forum User
Joined: 4/10/2019
Posts: 5
Hi! I'm a fan of both TASes and a player of competitive pinball. I found out that MAME supports a limited subset of pinball ROMs, including games from the classic 90s era like The Addams Family and Attack From Mars. I immediately wondered about opportunities for TASing, trying to imagine the ideal set of inputs to complete some objective as fast as possible. I stopped by #tasvideos on IRC, and they suggested that I join the forum and post my progress and ask for needed help. I understand that pinball roms are not an appropriate for the actual TASvideos concept, because ultimately they are not a video game. The visual aspect is likely to be a spastic flurry of conflicting animations, definitely not something that most people would find entertaining. And because most games loop the score back to 0 when the maximum score is reached, even if all the other things were not true, it still wouldn't be eligible. With all that said, my small group of friends and I have been discussing a few different "attacks" for Lua speedrunning of pinball ROMs - High score attack (get to max score) - Wizard mode attack (complete the final "Wizard Mode" which many games feature after completing many other modes) - 100% (complete all game features) I've downloaded a recent MAME mainline and have a basic understanding that a callback occurs once every emulator frame. I'm able to write proof of concept Lua code that would eventually complete a high score attack. I'm not using MAME-rr, unfortunately, because the version it is forked from doesn't support the ROMs in question. The issue that prompts my post has to do with the interaction between the "switches" which serve as the inputs to the ROM and the emulation of the ROM. Briefly : - There is a framerate of the emulation (which is probably the frame rate of the DMD (dot matrix display) - There is the framerate of the actual ROM (which is how long a switch has to be held down in order to register a "1" state) Is there some way, possibly by examining the MAME source, that I could determine non-experimentally how to ensure that all switch presses are registered? I'm not sure of where to start, but iteratively hacking at it out of MAME ignorance is opaque enough to motivate asking for help from the experts!