Author Topic: MAME Plugin Progress Thread  (Read 80757 times)

mchapman

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #60 on: January 28, 2008, 10:02:29 am »
Congrats on your breakthrough....do you have any hair left ;)

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #61 on: January 28, 2008, 10:29:44 am »
Hi,

great work.... Finally we're getting into LMCE's internals.... I'd kindly ask if you could devote some time to put more info on Wiki and teach the rest of us how to do it. This would surely multiply efforts for all kinds of other contributions... And we all will always remember the first one who did it....

Braaaavo,

thanks in advance

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #62 on: January 28, 2008, 02:54:24 pm »
HUGE Progress!
(...)
What do you all think?

I think I can't wait to play atari800 Star Raiders in 1080p/5.1 :).

Does LMCE let me play a CD through the same MD that's running MAME at the same time? I want to blast "Flight of the Valkyries" as I blast Zylons.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #63 on: January 28, 2008, 03:00:56 pm »
Typically, the orbiter only does one media type at a time... I did not tell it to stop other media in the same EA, so if you have a squeezebox etc.. it will still trigger.

I am going to try to support other stuff, after I do MAME....but I need others to help jump in here, not to finish THIS one...but to also become familiar with this setup, so that, while a totally generalised version won't be practical..at least make it extensible to add more emulator types.

-Thom

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #64 on: January 28, 2008, 05:27:11 pm »
Typically, the orbiter only does one media type at a time... I did not tell it to stop other media in the same EA, so if you have a squeezebox etc.. it will still trigger.

I am going to try to support other stuff, after I do MAME....but I need others to help jump in here, not to finish THIS one...but to also become familiar with this setup, so that, while a totally generalised version won't be practical..at least make it extensible to add more emulator types.

I'm looking forward to seeing your HowTo on this project (please :)). LMCE should be able to play multiple simul media streams as long as they are "compatible", like screensaver+audio, or even allow override like (muted) video + (independent) audio. Really it should be up to a device what to do with commands to play media when it's already busy (replace, mix, override components, etc).

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #65 on: January 28, 2008, 07:25:12 pm »
in order to do this, the Media Plugin and the Orbiter need to be refactored somewhat. I suggest looking at both.

-Thom

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: MAME Plugin Progress Thread
« Reply #66 on: January 28, 2008, 07:47:21 pm »
Way to go Thom!!!!
Great work!
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #67 on: January 29, 2008, 04:16:03 am »
Have now added the rest of a very basic response to CMD_Play/Stop_Media. Currently, the App Server is used to spawn instances of MAME, which are killed when media is stopped. This works well, although, I think I need to do a little bit of thread locking, because:

* if I select a new game from the list, the orbiter properly re-maps the window, however
* if I select one of the games in a playlist from the orbiter's playlist, the old game disappears, the new one appears in a bordered window, in the middle of the screen, non-resized. This is not correct, and I will track this down.

After I am satisfied that the media stuff is working properly for single stream usage, I will start work on a media identifier to properly thumbnail these games.

-Thom

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #68 on: January 29, 2008, 07:24:21 am »
I have just tried it under UI1, and the window management works as expected, fantastic! when the remote is clicked, the display shrinks to allow room for the on-screen control panel. Works very well..

also, I have successfully played my first game of Bubble Bobble, tonight.

Which got me thinking.. Basically, to make this work... i'm going to have to make /dev/input to DCE joystick devices, and special joystick devices for certain devices like the Tankstick, etc...

"Why? it works now."

yes, it works NOW.. but the idea will fall apart when I start bouncing games to multiple media directors.... I need the joystick movements as DCE... mouse may be a bit....trickier.... hell, it may not work at all...but i'll try...as soon as i am happy with process management and media identification....

-Thom

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #69 on: January 29, 2008, 04:19:08 pm »
I have just tried it under UI1, and the window management works as expected, fantastic! when the remote is clicked, the display shrinks to allow room for the on-screen control panel. Works very well..

also, I have successfully played my first game of Bubble Bobble, tonight.

Which got me thinking.. Basically, to make this work... i'm going to have to make /dev/input to DCE joystick devices, and special joystick devices for certain devices like the Tankstick, etc...

"Why? it works now."

yes, it works NOW.. but the idea will fall apart when I start bouncing games to multiple media directors.... I need the joystick movements as DCE... mouse may be a bit....trickier.... hell, it may not work at all...but i'll try...as soon as i am happy with process management and media identification....

I'd love to see a PS3 sixaxis work over Bluetooth. I might even buy you one to test with :).

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: MAME Plugin Progress Thread
« Reply #70 on: January 29, 2008, 04:54:15 pm »
I have just tried it under UI1, and the window management works as expected, fantastic! when the remote is clicked, the display shrinks to allow room for the on-screen control panel. Works very well..

also, I have successfully played my first game of Bubble Bobble, tonight.

Which got me thinking.. Basically, to make this work... i'm going to have to make /dev/input to DCE joystick devices, and special joystick devices for certain devices like the Tankstick, etc...

"Why? it works now."

yes, it works NOW.. but the idea will fall apart when I start bouncing games to multiple media directors.... I need the joystick movements as DCE... mouse may be a bit....trickier.... hell, it may not work at all...but i'll try...as soon as i am happy with process management and media identification....

I'd love to see a PS3 sixaxis work over Bluetooth. I might even buy you one to test with :).

you can use that already:
"The PS3 SIXAXIS controller follows the USB HID class specification and should automatically be detected as a joystick by any Linux kernel:"
http://ps3.jim.sh/sixaxis/usb/
rock your home - http://www.agocontrol.com home automation

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #71 on: January 29, 2008, 05:33:24 pm »
I have just tried it under UI1, and the window management works as expected, fantastic! when the remote is clicked, the display shrinks to allow room for the on-screen control panel. Works very well..

also, I have successfully played my first game of Bubble Bobble, tonight.

Which got me thinking.. Basically, to make this work... i'm going to have to make /dev/input to DCE joystick devices, and special joystick devices for certain devices like the Tankstick, etc...

"Why? it works now."

yes, it works NOW.. but the idea will fall apart when I start bouncing games to multiple media directors.... I need the joystick movements as DCE... mouse may be a bit....trickier.... hell, it may not work at all...but i'll try...as soon as i am happy with process management and media identification....

I'd love to see a PS3 sixaxis work over Bluetooth. I might even buy you one to test with :).

you can use that already:
"The PS3 SIXAXIS controller follows the USB HID class specification and should automatically be detected as a joystick by any Linux kernel:"
http://ps3.jim.sh/sixaxis/usb/


I mean the sixaxis data getting sent as DCE. If the sixaxis can pair to multiple BT dongles throughout the Floorplan, it could roam among different MDs, too.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #72 on: February 03, 2008, 10:30:09 am »
http://www.localeconcept.com/pub/scratch/games/now_with_title.jpg

More progress..this time pretty small, but getting here was an interesting voyage of discovery....

MediaStream objects contain metadata about a given set of playlist items, and in particular, what is displayed on the OSD displays of the orbiters in regards to program title, section title, time code etc.

I wrote a new little stub of namespaced functions which will be used for the DCE router plugin, MAMEUtils, which currently only has one function in it TitleFromROMName...which, given a rom name (i.e. bublbobl), it will call mame with ProcessUtils and get the full title using the -listfull option.

This will probably be replaced later by a full class, that grabs all the related mame data from the -listxml function, but I wanted to get this working as soon as possible for the first pass.

The trick was, after I had debugged the initial function that grabbed the title, the individual stream items were not showing up on the OSD, even though I had updated them, indicating they were being overwritten somewhere else.....turns out, I was right.

If you look at the code for MediaStream, you'll find that there is a function, called UpdateDescriptions.... (this code contains yet another terrible example of why this code bugs the hell out of me, it has knowledge of child classes by default, but I digress!)... at the first of this code is a short circuit which checks if m_bPluginWillUpdateDescriptions... if this is set to true in the subclass, this method will immediately exit. Setting this to true in my subclass's constructor alleviated the issue and I was able to see my custom descriptions, properly....sheezus.....

Guys, we _REALLY_ need to refactor this code. It really could be written so much better.

So, I have attached a screenshot, showing the result of ....um...6 hours of exploratory hacking....

Now, I am going to investigate doing the automatic media identification and tagging....

ONWARD AND UPWARD!

-Thom

Screenshots attached.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #73 on: February 04, 2008, 02:11:58 am »
More progress... no screenie this time, but soon...

I have figured out, after looking extensively at MythTV_PlugIn that I can use AlarmManager to periodically trigger a method, CheckForNewROMs(), which will scan the pluto_media database for new entries, with ".zip" in them, if it finds them, it will run a new class on them (MAMEROM), and get all the appropriate metadata for that rom by parsing the output from -listxml, including a URL to a picture, which it will retrieve and pass back to be thumbnailed.

another major chunk of code, about to be accomplished :-)

-Thom

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: MAME Plugin Progress Thread
« Reply #74 on: February 05, 2008, 07:39:55 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