MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

dracos2112
MAME Fan
Reged: 05/16/16
Posts: 1
Send PM


Any way in mame to add a video file before game starts?
#354287 - 05/16/16 06:58 AM


Hi, I'm a total beginner here and am making a mame machine for the kids at my church and have successfully set up mame and mala for my frontend. I'm going for a superhero theme with the cabinet since most the kids are ages 4-10 and are into super heros. I'd like to know if there is any way of adding a short 10 sec video file to play before the game starts, after the game info screen of course. I've read that some people compile their own version of mame to illegally remove the game info before the game starts and I was thinking somebody with some programming skills would be able to add in some code to play a random video before the game starts. I'd like to make a few short videos like portraying Jesus as the ultimate super hero, sharing the gospel message, bible character trivia, etc. If anybody has done something like this and would be willing to share, I'd be really appreciative. Or if this is something someone would be willing to undertake for me I could compensate, within limits. Thanks



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: Any way in mame to add a video file before game starts? new [Re: dracos2112]
#354292 - 05/16/16 01:09 PM


To my knowledge, no frontend has the ability to play a video before loading the emulator.



Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
e-mail: [email protected]



Envisaged0ne
MAME Fan
Reged: 08/29/06
Posts: 543
Send PM


Re: Any way in mame to add a video file before game starts? new [Re: dracos2112]
#354293 - 05/16/16 01:32 PM


You don't have to recompile MAME to disable the gameinfo from showing up before it plays the game. That's just adjusted in the MAME.ini file. Just switch skip_gameinfo to 1. Or just adjust it within the MAME UI. But as previously stated, there probably isn't a way to add a video. At least not an easy one

Edited by Envisaged0ne (05/16/16 09:35 PM)



Windows 11 64 bit OS
Intel Core i7-10700
Nvidia GeForce RTX 2060 6GB
32GB DDR4 RAM



Traso
MAME Fan
Reged: 01/15/13
Posts: 2687
Send PM


First off, I'm the ultimate hero. Sheeez. ((:-)) new [Re: dracos2112]
#354325 - 05/17/16 12:27 AM


Second, an event pre-game-load is a front end thing. Been around for ages, though apparently Mala doesn't have that for MAME, just other emus.



Scifi frauds. SF illuminates.
_________________

Culture General Contact Unit (Eccentric)



casm
Cinematronics > *
Reged: 08/27/07
Posts: 668
Send PM


Re: Any way in mame to add a video file before game starts? new [Re: CiroConsentino]
#354335 - 05/17/16 02:15 AM


> To my knowledge, no frontend has the ability to play a video before loading the
> emulator.

Agreed, but I can see a way that might (note the conditional) make it doable.

If the front end allows the user to explicitly specify the location of the emulator executable, it may be possible to alter that string so that it calls the video player first, then calls the emulator immediately at the end of the video player's run.

Example: if the frontend defines the location of the emulator as /opt/local/bin/mamearcade64, changing that location to something like the following may work:

/path/to/videoplayer [path to video to play] && /opt/local/bin/mamearcade64 [insert variable containing commandline options for MAME here]

Total conjecture on my behalf, though, as I haven't tried it, and converting that to whatever Windows would use in this instance is an exercise left to the reader

My guess is that whether it works or not is going to be highly dependent on the frontend in use, however.



uman
MAME Fan
Reged: 04/15/12
Posts: 455
Send PM


Re: Any way in mame to add a video file before game starts? new [Re: casm]
#354376 - 05/18/16 09:54 AM


The frontend GameEx can do this for sure , but not after MAMEs own gameinfo screen. Possible maybe only with a script.

Edited by uman (05/18/16 09:58 AM)



Mamesick
Troll Lamer
Reged: 09/21/03
Posts: 1649
Loc: Italy
Send PM


Re: Any way in mame to add a video file before game starts? new [Re: CiroConsentino]
#354377 - 05/18/16 10:24 AM


It could be doable in MAMEUI(FX) due to its integration with the core:

- The user select a game after setup an interface option like "Play Game Video before emulation starts".
- A simple call to ShellExecute Windows API will launch the video associated to selected game name. Example: pacman.avi. This will open the associated video player like MPC-HC.
- Then execute the core commands to launch pacman as usual.

Main problem is I believe only how to tell to the video player to close itself automatically at the end of the video. I know VLC and MPC-HC have some command-line options to do this. Also, another problem could be create a loop waiting for the video to be played and finished, because ShellExecute will open another process and so RunMAME will be exuuted immediately after, while the video is still playing. I'm not sure of this, I should do a test.

Example of preliminary code:

Code:

If (PlayGameVideo)
ShellExecute(blah, blah, blah);
RunMAME(gamename);



Edited by Mamesick (05/18/16 10:27 AM)



zambr
MAME Fanatic
Reged: 04/12/09
Posts: 144
Send PM


Re: Any way in mame to add a video file before game starts? new [Re: dracos2112]
#354379 - 05/18/16 11:49 AM


To get the eye candy effects before playing a game, i'd suggest Hyperspin.

https://www.youtube.com/watch?v=KuAbSQDWve4

The animations + video would work well with superhero themes.

Edited by zambr (05/18/16 02:29 PM)


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 137 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1945