LinuxMCE Forums

General => Users => Topic started by: tschak909 on January 30, 2008, 07:39:02 am

Title: COMING SOON: MAME Media Type
Post by: tschak909 on January 30, 2008, 07:39:02 am
Coming soon (no determinate date yet, I am working on this in my spare time), a new media type for LinuxMCE: MAME.

What does it do?


Simply? it allows for you to play games from MAME inside LinuxMCE by copying them to the games folder in your public or private user directories, and then selecting Games from your Media scenario menu.

So, are there screenies, or what?

Why, yes. I hope these are self explanatory. I used the game 10 Yard Fight as an example. Yes, it also works under UI1 just fine, I tested it.

http://www.localeconcept.com/pub/scratch/games/game_playing_with_menu.png (http://www.localeconcept.com/pub/scratch/games/game_playing_with_menu.png)
http://www.localeconcept.com/pub/scratch/games/game_playing_with_media.png (http://www.localeconcept.com/pub/scratch/games/game_playing_with_media.png)
http://www.localeconcept.com/pub/scratch/games/game_playing_on_floorplan.png (http://www.localeconcept.com/pub/scratch/games/game_playing_on_floorplan.png)
http://www.localeconcept.com/pub/scratch/games/from_orbiter.png (http://www.localeconcept.com/pub/scratch/games/from_orbiter.png)


Why are you doing this?


Honestly? I have an X-Arcade Tank Stick that has been collecting dust in the corner of my main room for quite some time now, since I moved over from a MythTV-only installation almost a year ago.

This is dumb, why don't you just compile MythGame and bolt it on?

Because quite frankly, I like things that are nicely integrated. Making games a first class media type inside LinuxMCE allows for some really cool possibilities that the other game emulator front-ends are not capable of doing, and it allows me to select games using the same stream-lined UI for selecting audio and video.

What can it currently do?


It can currently launch a game from the games list, they can be serially selected like audio or video into playlists, which can then be saved and shown in the Playlists. There is no joystick configuration, so the /root/.mame/mame.ini file currently must be modified to switch on joysticks, etc..

What's Left to do?

Well gee, if it can do that? why don't you just release it?

Heh, it barely does this. There is still so much to _do_.

* finish process management, thread monitoring mame process which will fire CMD_Stop_Media() when mame dies.
* Event Processing
* Proper media identification, so that game snapshots will be placed in the thumbnails, and game titles will properly be identified.
* Proper Attribute creation, so that typical media filtering can be done. (i.e. filtering by game type, manufacturer, year, etc.)
* new Orbiter UI made in Designer, I am currently using the remotes for Stored Video, this is not exactly a correct fit.
* CMD_Move_Media implemented so that games can be moved from one media director to another via floor plan.
* CMD_Leave_Room/CMD_Enter_Room implemented so that Follow Me will work correctly.
* CMD_Get_Video_Frame - so that I can get screen captures to use both in Thumbnail and for using the video display view on the orbiters normally used to display DVD Menus
* CMD_Simulate_Mouse_Click/Keypress - Need this for a LOT of reasons, too many to list.
* Create DCE devices for Joysticks and Gamepads, so that they can be used to control BOTH LinuxMCE and the MAME plugin. This is especially important for the features described in the REALLY HARD SECTION below.
* Create package definitions, so that they can be included in the LinuxMCE build process..the end result is to have something that can be enabled in the Install Additional Software screen in the Setup Wizard.

In addition, there are some HARD ones that I will ATTEMPT to implement, I have no idea if they will actually WORK in practice... Hell, this whole THING is a proof of concept exercise!, Particularly:

* Implementing the ability to stream a game to multiple media directors, replicating DCE joystick events across them, assigning them to player slots as needed, so that you can play the same game in different rooms in a house by assigning it on the floorplan.
* Implementing transport control, so that if you use the rewind/fast forward, it will pause the game and rewind a captured stream of the game that you can pause and fast forward through (yes, I've contemplated every single possible question you may ask to that. Please just let me try to get the basic transport control implemented!)

What version of MAME are you basing this on?

I am using SDLMAME 0.122u7, currently, it is currently not modified, and god I hope it can stay that way!

When are you gonna release this sucker?

When I think it's ready. I am under no obligations of any kind to release this. I am doing this as my primer into creating advanced Pluto/LinuxMCE functionality.

Are you doing more media types?

Hopefully, but let me get this one done first! Are you impatient? either (a) help me code it, or (b) ask me for my code, and use it as a pattern to create your own set of wrapper devices.

What version will this run under?

I am developing it for 0710 and above. I am developing this currently on 0710 beta 3, using the SVN sources from the primary LinuxMCE trunk.

Can I get the code?

Yes, PM me and I will give you a tarball with the current code. When it is more ready, I will ask for permission to shift it into the development tree. You will need a development environment to unpack it into and compile. There is also a lengthy set of database additions which must be made in order for it to work. A Scenario also must be created in the web admin, the games directory created, and roms put into it in zip format.

Anything else?

Not at the moment, I will paste more as time progresses. I do have a development thread over here in the Developers forum. This is just an announcement thread.

http://forum.linuxmce.org/index.php?topic=3433.0 (http://forum.linuxmce.org/index.php?topic=3433.0) --- start of the thread.

Out for now, fellas.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: lon22 on January 30, 2008, 02:18:58 pm
Good stuff. Out of curiosty, what other media types do you think a wrapper would be useful for?


lon22
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on January 30, 2008, 07:25:14 pm
not sure yet, but the point being that we don't know, we need to figure that out.. (and more to the point, we need to adapt Pluto to add these media types..currently, this is slightly more difficult than it should be.)

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on January 31, 2008, 04:29:43 am
I have created an initial movie of this plug-in in action:

http://www.localeconcept.com/pub/scratch/games/lmce_out2.html (http://www.localeconcept.com/pub/scratch/games/lmce_out2.html)

Showing:

* Game Selection
* Playing games
* overlay of orbiter atop games
* Playlist management/usage for keeping tabs on favourite games.

There are a couple of mistakes made, but I think you get the drift.

Oh yes, if you have a Fiire Chief, you can use the on-screen playlist feature. It works very well when switching between games.

My Nokia 770 also works VERY well for selecting games. :-D

yes, there are some little window management bugs to squash, but I'll get those. This functionality is still VERY NEW!

I am using the remote to insert coins and start the game.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: Hipper on January 31, 2008, 04:42:47 am
Forget the coming soon! I can’t wait to play Mario! How do I make it work now! :D
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on January 31, 2008, 07:40:09 am
currently, i've only built code for 0710, and it requires a nice chunk of database work to get it integrated. I will not release it yet, because there are missing pieces.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: ddamron on January 31, 2008, 08:04:28 am
*GREAT* work TS!

Title: Re: COMING SOON: MAME Media Type
Post by: nite_man on January 31, 2008, 01:43:25 pm
Good job, Thom! I saw screen shots on your site - http://www.localeconcept.com/pub/scratch/games/media_scenarios.png (http://www.localeconcept.com/pub/scratch/games/media_scenarios.png). could you tell me, please (if it isn't secret) what button Weather does and how did you add it?
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on January 31, 2008, 01:47:45 pm
nothing special, it's a media scenario that triggers media type 11 (Non Pluto LiveTV), and tunes the channel to 047, which here is the weather channel. I use it as a jump-off point for my wake-up event. :-)

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: totallymaxed on January 31, 2008, 04:37:19 pm
Coming soon (no determinate date yet, I am working on this in my spare time), a new media type for LinuxMCE: MAME.

What does it do?


Simply? it allows for you to play games from MAME inside LinuxMCE by copying them to the games folder in your public or private user directories, and then selecting Games from your Media scenario menu.

So, are there screenies, or what?

Why, yes. I hope these are self explanatory. I used the game 10 Yard Fight as an example. Yes, it also works under UI1 just fine, I tested it.

http://www.localeconcept.com/pub/scratch/games/game_playing_with_menu.png (http://www.localeconcept.com/pub/scratch/games/game_playing_with_menu.png)
http://www.localeconcept.com/pub/scratch/games/game_playing_with_media.png (http://www.localeconcept.com/pub/scratch/games/game_playing_with_media.png)
http://www.localeconcept.com/pub/scratch/games/game_playing_on_floorplan.png (http://www.localeconcept.com/pub/scratch/games/game_playing_on_floorplan.png)
http://www.localeconcept.com/pub/scratch/games/from_orbiter.png (http://www.localeconcept.com/pub/scratch/games/from_orbiter.png)


Why are you doing this?


Honestly? I have an X-Arcade Tank Stick that has been collecting dust in the corner of my main room for quite some time now, since I moved over from a MythTV-only installation almost a year ago.

This is dumb, why don't you just compile MythGame and bolt it on?

Because quite frankly, I like things that are nicely integrated. Making games a first class media type inside LinuxMCE allows for some really cool possibilities that the other game emulator front-ends are not capable of doing, and it allows me to select games using the same stream-lined UI for selecting audio and video.

What can it currently do?


It can currently launch a game from the games list, they can be serially selected like audio or video into playlists, which can then be saved and shown in the Playlists. There is no joystick configuration, so the /root/.mame/mame.ini file currently must be modified to switch on joysticks, etc..

What's Left to do?

Well gee, if it can do that? why don't you just release it?

Heh, it barely does this. There is still so much to _do_.

* finish process management, thread monitoring mame process which will fire CMD_Stop_Media() when mame dies.
* Event Processing
* Proper media identification, so that game snapshots will be placed in the thumbnails, and game titles will properly be identified.
* Proper Attribute creation, so that typical media filtering can be done. (i.e. filtering by game type, manufacturer, year, etc.)
* new Orbiter UI made in Designer, I am currently using the remotes for Stored Video, this is not exactly a correct fit.
* CMD_Move_Media implemented so that games can be moved from one media director to another via floor plan.
* CMD_Leave_Room/CMD_Enter_Room implemented so that Follow Me will work correctly.
* CMD_Get_Video_Frame - so that I can get screen captures to use both in Thumbnail and for using the video display view on the orbiters normally used to display DVD Menus
* CMD_Simulate_Mouse_Click/Keypress - Need this for a LOT of reasons, too many to list.
* Create DCE devices for Joysticks and Gamepads, so that they can be used to control BOTH LinuxMCE and the MAME plugin. This is especially important for the features described in the REALLY HARD SECTION below.
* Create package definitions, so that they can be included in the LinuxMCE build process..the end result is to have something that can be enabled in the Install Additional Software screen in the Setup Wizard.

In addition, there are some HARD ones that I will ATTEMPT to implement, I have no idea if they will actually WORK in practice... Hell, this whole THING is a proof of concept exercise!, Particularly:

* Implementing the ability to stream a game to multiple media directors, replicating DCE joystick events across them, assigning them to player slots as needed, so that you can play the same game in different rooms in a house by assigning it on the floorplan.
* Implementing transport control, so that if you use the rewind/fast forward, it will pause the game and rewind a captured stream of the game that you can pause and fast forward through (yes, I've contemplated every single possible question you may ask to that. Please just let me try to get the basic transport control implemented!)

What version of MAME are you basing this on?

I am using SDLMAME 0.122u7, currently, it is currently not modified, and god I hope it can stay that way!

When are you gonna release this sucker?

When I think it's ready. I am under no obligations of any kind to release this. I am doing this as my primer into creating advanced Pluto/LinuxMCE functionality.

Are you doing more media types?

Hopefully, but let me get this one done first! Are you impatient? either (a) help me code it, or (b) ask me for my code, and use it as a pattern to create your own set of wrapper devices.

What version will this run under?

I am developing it for 0710 and above. I am developing this currently on 0710 beta 3, using the SVN sources from the primary LinuxMCE trunk.

Can I get the code?

Yes, PM me and I will give you a tarball with the current code. When it is more ready, I will ask for permission to shift it into the development tree. You will need a development environment to unpack it into and compile. There is also a lengthy set of database additions which must be made in order for it to work. A Scenario also must be created in the web admin, the games directory created, and roms put into it in zip format.

Anything else?

Not at the moment, I will paste more as time progresses. I do have a development thread over here in the Developers forum. This is just an announcement thread.

http://forum.linuxmce.org/index.php?topic=3433.0 (http://forum.linuxmce.org/index.php?topic=3433.0) --- start of the thread.

Out for now, fellas.

-Thom


Nice! Can't wait to give it a try :-)
Title: Re: COMING SOON: MAME Media Type
Post by: Matthew on January 31, 2008, 07:29:16 pm
Thom, you are cool :).

I have created an initial movie of this plug-in in action:

http://www.localeconcept.com/pub/scratch/games/lmce_out2.html (http://www.localeconcept.com/pub/scratch/games/lmce_out2.html)
(...)
* Playlist management/usage for keeping tabs on favourite games.
(...)
Oh yes, if you have a Fiire Chief, you can use the on-screen playlist feature. It works very well when switching between games.

Does the playlist work with a game ending to start up the next game in the list automatically?
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on January 31, 2008, 07:48:25 pm
no, because there is no way to get at that within MAME. for all it knows, it is an emulator, maintaining a self contained state machine. So I just select the playlist view to get at the next game in my favourites list.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: Matthew on January 31, 2008, 10:30:02 pm
no, because there is no way to get at that within MAME. for all it knows, it is an emulator, maintaining a self contained state machine. So I just select the playlist view to get at the next game in my favourites list.

Can you quit MAME (and its process dies) from the LMCE UI? What happens next if you do?
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on January 31, 2008, 11:52:12 pm
yes.

and if you hit esc, the watchdog thread will catch it and do the same thing.

that is,

it will stop the media type entirely, and the orbiter will return to nothing playing (Photo_Screen_Saver will resume).

Title: Re: COMING SOON: MAME Media Type
Post by: Matthew on February 01, 2008, 05:33:05 pm
yes.

and if you hit esc, the watchdog thread will catch it and do the same thing.

that is,

it will stop the media type entirely, and the orbiter will return to nothing playing (Photo_Screen_Saver will resume).

Seems to me that if the games are in a playlist, then quitting out of one would start the next one in the list, rather than exit the playlist.
Title: Re: COMING SOON: MAME Media Type
Post by: Zaerc on February 01, 2008, 06:09:52 pm
Seems to me that the "playlist" is in this case intended as a list of favorites.
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on February 01, 2008, 06:29:34 pm
technically, I should be blocking the ESC key, but it's a vestige left over from the fact that the program is wrapped. It would be inconsistent to have the stop button be off, the Off menu item be off, and have the ESC button be "Go to next in playlist"

if you want to go to the next one in the playlist:

* use the up and down rocker buttons on your remote
* use the media button or F6 to go to the on-screen playlist view and select the next game.
* select it via manage playlist
* select it from the visible playlist menu on one of the orbiters (I've even done this on my Cisco phone)

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: schaferj on February 01, 2008, 07:49:19 pm
Thom,
much thanks.  I was looking at mythgame, but this is much more elegant!
good show.
joseph
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on February 05, 2008, 07:41:12 pm
And Now: The Next Screencast..

MAME Media Type: WITH PROPER METADATA AND PICTURE EXTRACTION!

http://www.localeconcept.com/pub/scratch/games/lmce_with_pics.html

:D

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: Visti on February 26, 2008, 03:39:16 pm
Yay!
Title: Re: COMING SOON: MAME Media Type
Post by: totallymaxed on March 22, 2008, 02:35:57 pm
And Now: The Next Screencast..

MAME Media Type: WITH PROPER METADATA AND PICTURE EXTRACTION!

http://www.localeconcept.com/pub/scratch/games/lmce_with_pics.html

:D

-Thom


Very cool :-)
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on April 15, 2008, 07:01:47 am
for those who haven't been following the developer threads:

The MAME plugin is nearing a first release. The majority of the work has been done, and I am doing the necessary HADesigner work for all the orbiters (yes, every single variation).... Sans the Designer changes, the necessary bits have been pushed to our sqlcvs server, and will show up in the 0710 release... the code is in SVN for those interested...and I will be working to get it rolled into the package system after the 0710 release.

For now, some Youtube movies to tide you guys over:

http://www.youtube.com/watch?v=knachk4FcLc <-- the first video
http://www.youtube.com/watch?v=4LQcQ9ecTLk <-- Infra-Red remotes work now!
http://www.youtube.com/watch?v=dXfJlnut4r0 <-- Parents Monitor Mode, Part I
http://www.youtube.com/watch?v=9Ji8zzUY5zM <-- Monitor Mode II, even from the Cisco Phone!
http://www.youtube.com/watch?v=Xx25HgCQt_U <-- Preliminary Atari 5200 Games support!
http://www.youtube.com/watch?v=KjwEj6DwV_8 <-- Star Wars on the WiiMote!

I will be posting more, soon!

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: geoffrey on April 15, 2008, 05:46:42 pm
i guess you will have to take my word for this but at this very moment I am bowing in adoration  ;D

ohh my ROMs are excited too!
Title: Re: COMING SOON: MAME Media Type
Post by: Raul102801 on July 09, 2008, 08:29:42 pm
Did you not post a video of this on youtube? I could swear I have seen it.
So is this currently working? I just installed linuxmce and am pretty new to it but this is a feature I most definitely want.
How can I get it to work?
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on July 09, 2008, 08:41:40 pm
MAME Installation , in the wiki.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: Enigmus on September 25, 2008, 02:58:01 pm
Having MAME integrated into LinuxMCE will be an awesome new feature. I just wanted to thank you for making it possible.
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on September 25, 2008, 03:06:06 pm
Thank you. it's very time consuming because of the sheer amount of integration work and testing involved, but it is worth it. Primarily because I am dead set against seeing most anything appear in the Computing window.

MAME will be the first type implemented, with MESS being added on soon after (with specific emulator types added on one by one.) Not every emulator can be a candidate for being added, most of them are very cantankerous badly written beasts, who tend to take over the screen, have no source code, or have very little way to integrate wanted features. (The biggest problem is that most emulators don't make a window that can be resized by window management to full screen, much less stacked, this is crucial to orbiter integration.)....

anyway, it's been a long time in the making. I've had to pause work on it because of release duties, but there is enough of it that an early beta can be grafted onto existing 0710 installations (thankfully the majority of the database work required was already done by the time that 0710 was plucked for release.), but I will return to improving it soon, alongside my work with the IM system.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: Enigmus on September 25, 2008, 10:54:41 pm
The IM system?  Do have a link for that.  It sounds like a feature of interest.
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on September 25, 2008, 11:54:32 pm
currently, it only exists on my lab bench...but, there are notes in the wiki..

"Instant Messaging in LinuxMCE"

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: Enigmus on October 18, 2008, 02:36:05 pm
Out of curiosity, is there a chance this Media type will be integrated in the next release?
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on October 18, 2008, 04:53:02 pm
I want it to be, so it probably will be. The issue right now is we're trying to get the community build process functioning. I stopped all my work on the MAME plugin until we get the builders up and running again.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: Enigmus on October 25, 2008, 02:06:22 pm
Maybe I missed this, but will there be new default folders to house the various ROMS?  Will there be any file structure changes regarding this feature?
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on October 25, 2008, 04:32:08 pm
There will be a games folder to hold the roms.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: totallymaxed on October 25, 2008, 05:21:37 pm
There will be a games folder to hold the roms.

-Thom


Thom,

Whats the situation on ROM's with respect to licensing? Are there any ROM's in the public domain? Do you know of any companies that will license ROM's? My question relates to LinuxMCE and our ability to include a few sample ROM's in the default installation and secondly my company would like to include ROM's in our Dianemo installation and would be prepared to license these if it were possible to do so.

All the best

Andrew
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on October 25, 2008, 05:49:28 pm
The current public domain roms are here:

http://mamedev.org/roms/

as for other roms, you can contact companies like x-arcade, to get more rom packs.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: cancerkazoo on November 25, 2008, 01:59:50 am
And Now: The Next Screencast..

MAME Media Type: WITH PROPER METADATA AND PICTURE EXTRACTION!

http://www.localeconcept.com/pub/scratch/games/lmce_with_pics.html

:D

-Thom


That is great, thanks.

Any way we could link the the cabinet art. instead of the screenshots? not sure if it would even look better or be easier to find games or not, but it may look good or more consistent.
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on November 25, 2008, 02:07:38 am
already tried, doesn't work very well.

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: Dale_K on December 04, 2008, 04:40:13 pm
I love this.  Build a state of the art home automation system, distribute media, control lighting, hvac, alarm, surviellance and telcom.  Oh, and I want to play Galaga too.  LOL

This has to say something about our level of geekness, but I'm not sure what it is.

hehe
Title: Re: COMING SOON: MAME Media Type
Post by: tschak909 on December 04, 2008, 05:51:17 pm
Dale_K: well, it came about because I needed to understand the system architecture, and it seemed the quickest way that I could dig into every single part of the system, was to write a new media player and media stream plugin.

I have since touched and learned every single line of code in the system. :)

-Thom
Title: Re: COMING SOON: MAME Media Type
Post by: vikkevest on February 26, 2009, 09:32:26 pm
Yay great idea, want SNES & NES too  :)!
Title: Re: COMING SOON: MAME Media Type
Post by: skatingn330 on February 27, 2009, 03:58:14 pm
Don't forget about n64, I got 4 gigs of n64 games that I need a good reason to use. Also support for the ps3 sixaxis and xbox 360 wireless controllers that some ubuntu users are alreAdy using for their emulators. But none the less great job tschak909!