LinuxMCE Forums

General => Developers => Topic started by: tschak909 on December 10, 2007, 07:47:59 am

Title: MAME Plugin Progress Thread
Post by: tschak909 on December 10, 2007, 07:47:59 am
I am starting this thread to detail my progress with the MAME Plugin/Player pair that I am coding for LinuxMCE (and perhaps PlutoHome too).

I have made the first bits of necessary database changes in order to make the File list and UpdateMedia daemon start to index and list the files inside the games/ directory in the LinuxMCE structure.

I currently have to manually set attributes for now, but it does index the filename as title currently, and I am able to add pictures, and it does display on a file list on all of my orbiters.

I have assigned a MediaType of 8 (because it was available...) I hope I haven't trampled on anyone's toes for this. I will need to figure out how to use sql2cpp effectively to get the proper media ID (because I know under sqlcvs the PK_ fields will most likely change, I can't assume that they will be constant!).

There is no plugin/player combination yet, so while the new games scenario, file list, and single file/attribute views work properly, it doesn't do anything after that except say, "I have no devices in this entertainment area capable of playing this file!", and the DCERouter file currently gives the message:

Code: [Select]

08      12/10/07 1:20:00.560            Received Message from 80 (Windows XP PC/tablet (Horiz) / Bedroom (Master) #1) to 10 (Media Plug-in / Bedroom (Master) #1), type 1 id 43 Command:MH Play Media, retry none, parameters: <0x727a8b90>
08      12/10/07 1:20:00.560              Parameter 2(PK_Device): 0 <0x727a8b90>
08      12/10/07 1:20:00.560              Parameter 13(Filename): !F50880 <0x727a8b90>
08      12/10/07 1:20:00.560              Parameter 29(PK_MediaType): 0 <0x727a8b90>
08      12/10/07 1:20:00.560              Parameter 44(PK_DeviceTemplate): 0 <0x727a8b90>
08      12/10/07 1:20:00.560              Parameter 45(PK_EntertainArea): 1 <0x727a8b90>
08      12/10/07 1:20:00.560              Parameter 116(Resume): 0 <0x727a8b90>
08      12/10/07 1:20:00.560              Parameter 117(Repeat): 0 <0x727a8b90>
05      12/10/07 1:20:00.561            Play media type 8 in entertain area 1 but nothing to handle it <0x917e6b90>
01      12/10/07 1:20:00.561            Couldn't find any media handlers for type 8 <0x917e6b90>


so, at least the messages are being routed...

I need to finish putting together a stable dev environment now, so I can work on the plugin/player pairs.

I do figure out from the DCERouter logs, that I will need the Plugin AND the Player... the DCE router sends messages to the Plugin first, to determine how to route things... I suspected this, but I would like more information as to why it is separated in this manner...the source code is a little bit foggy in this area, and I am using Xine_Player/Plugin as a reference.... Does anyone know what is going on?

But for now, I am pasting the following screenshots:

http://www.localeconcept.com/pub/scratch/games/media_scenarios.png (http://www.localeconcept.com/pub/scratch/games/media_scenarios.png)
http://www.localeconcept.com/pub/scratch/games/file_list.png (http://www.localeconcept.com/pub/scratch/games/file_list.png)
http://www.localeconcept.com/pub/scratch/games/single_game.png (http://www.localeconcept.com/pub/scratch/games/single_game.png)

more later!  ;D ;D ;D ;D ;D

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Zaerc on December 10, 2007, 01:27:38 pm
The screenshots look awesome, glad to see you making some good progress on this.  I wish I could be of some assistence, but you're obviously way ahead of me.
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on December 10, 2007, 05:02:25 pm
Very exciting. Not just for MAME players, but as an example of an entire architectural expansion. Personally, the only games I'm interested in are the ones that run under the atari800 emulator (I was an Atari geek in the early 1980s). Do you think you could explain how to add a different emulator, for others to follow your lead?

In fact, it would be very useful for developers to see just how you got to the point where you are now. Like setting up a dev env, tools/techniques for finding where the target code resides before you start editing it, tools/techniques for (eg.) finding an unused media type, etc. Maybe you could add a section->page to the Developers Guide (http://wiki.linuxmce.org/index.php/Developers_Guide) wiki entry? That would help me (or someone else) add atari800, and then the next media type, like maybe documents or just arbitrary applications.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 10, 2007, 05:22:43 pm
Very exciting. Not just for MAME players, but as an example of an entire architectural expansion. Personally, the only games I'm interested in are the ones that run under the atari800 emulator (I was an Atari geek in the early 1980s). Do you think you could explain how to add a different emulator, for others to follow your lead?

In fact, it would be very useful for developers to see just how you got to the point where you are now. Like setting up a dev env, tools/techniques for finding where the target code resides before you start editing it, tools/techniques for (eg.) finding an unused media type, etc. Maybe you could add a section->page to the Developers Guide (http://wiki.linuxmce.org/index.php/Developers_Guide) wiki entry? That would help me (or someone else) add atari800, and then the next media type, like maybe documents or just arbitrary applications.

I am an old Atari800 hacker from the 1980s, myself.. still am (looking at my Ben Heckendorn Atari 800 Laptop).

As for doing a generalised emulation framework.... I can't say at this point how possible that will be.

Ideally I want to use a Game Plugin, which forwards messages to individual Game Players, keying off file extensions to do so. This however, may not be possible without looking very awkward for one reason, the parts of the code that determine menu items for a given player are defined IN the Plugin, not the Player (because the Plugin is part of the DCE router's address space), this is a limitation of C++, and would require some sort of IDL type system if we needed to do dynamic introspection of the emulator capabilities.

As it is right now, I am building for ONE emulator type per plugin pair, currently this is MAME, so that I can see where the issues are. It is important that this not be a half-baked integration project, so it's not as simple as just hanging an emulator executable off the system somewhere. I intend to implement ALL of the media plugin features, (follow me, state saving for moving an instance to another MD, etc.).

I will know more once I get my dev environment stabilized. But it is very early in the project.

There are also other scalability issues that this media type will inevitably expose, on a potential system, there will be tens of thousands of ROMs in the file list, before you start applying filters! This will undoubtedly stress test the whole system to find bottlenecks. I've already found some obnoxious ones in the media sync portion of the Web Admin site as a result! (and I've only added my MAME roms!)

More to come soon!

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on December 10, 2007, 06:31:21 pm
Personally, the only games I'm interested in are the ones that run under the atari800 emulator (I was an Atari geek in the early 1980s).

I am an old Atari800 hacker from the 1980s, myself.. still am (looking at my Ben Heckendorn Atari 800 Laptop).

Let's reimplement DCE as CIO and run it on an 800XL! :)

More seriously, I'd love to see you wiki your dev environment and procedures so the rest of us can get up and running. Hopefully 0710 and a standard dev env will dovetail very soon.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 15, 2007, 07:10:07 am
Status update: still trying to get a stable development environment working on my VM. Will let you guys know how things get on. I'm trying to build using the current SVN sources in anticipation for the 0710 release.

-Thom

Title: Re: MAME Plugin Progress Thread
Post by: Matthew on December 15, 2007, 07:36:14 am
Status update: still trying to get a stable development environment working on my VM. Will let you guys know how things get on. I'm trying to build using the current SVN sources in anticipation for the 0710 release.

Is the current version of 0710 that developers are working on the one that's in SVN? I'd love to see a HowTo for building it locally and trying to run it (as well as debugging a few issues that Mantis says haven't been touched in a while).
Title: Re: MAME Plugin Progress Thread
Post by: totallymaxed on December 15, 2007, 10:40:11 am
Status update: still trying to get a stable development environment working on my VM. Will let you guys know how things get on. I'm trying to build using the current SVN sources in anticipation for the 0710 release.

Is the current version of 0710 that developers are working on the one that's in SVN? I'd love to see a HowTo for building it locally and trying to run it (as well as debugging a few issues that Mantis says haven't been touched in a while).

Well it looks to me that the latest checkins at http://svn.charonmedia.org/ are from 2-3 days ago. Some of our work on vdr seems to be there (some have not been committed yet as we are working through some issues related to Myth & vdr coexisting happily without Myth breaking). So overall things are pretty much up to date - i think. But I can't be sure how complete the current version is or what happens to revisions made in the public SVN when the same files are next synced from the non-public SVN and have in intervening time been updated there too.

May be DanielK can comment on this?
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 15, 2007, 06:13:06 pm
well, the overall problem is, once I build from those sources and install the packages, things break horribly, and I wind up with a system that simply refuses to function.

is there a procedure I'm missing?

*hmm*

I just want a build environment so I can work on a fucking plugin pair. AWAY FROM MY PRODUCTION Core and MD.

-Thom

Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 16, 2007, 10:02:01 am
Okay, I've got a stable dev environment working now, and was able to build and launch both a plugin and player combination into my dev vm

I've also done much of the necessary database work to implement the file list, updatemedia etc work....

and I understand how the plugin and player pairs interact.....

but i seem to be missing one link, how does the system know to talk with the DCE router plugin? right now it says
"I can't play this media type for this entertainment area" and the DCErouter log confirms this

however, I _know_ there is a database table I'm  missing, probably in pluto_main, which maps what media types go to which entertainment areas etc... totallymaxed: what am I missing?

-Thom


Title: Re: MAME Plugin Progress Thread
Post by: Matthew on December 16, 2007, 05:35:18 pm
Okay, I've got a stable dev environment working now, and was able to build and launch both a plugin and player combination into my dev vm

I've also done much of the necessary database work to implement the file list, updatemedia etc work....

and I understand how the plugin and player pairs interact.....

but i seem to be missing one link, how does the system know to talk with the DCE router plugin? right now it says
"I can't play this media type for this entertainment area" and the DCErouter log confirms this

however, I _know_ there is a database table I'm  missing, probably in pluto_main, which maps what media types go to which entertainment areas etc... totallymaxed: what am I missing?

Would you post a HowTo for getting the dev env up, and the SVN sources down into it, built, and tested? Maybe a walkthru of the net summary of this "Building a dev environment for 0704?" topic (http://forum.linuxmce.org/index.php?topic=2901) and the threads linked from it.

Can you grep the sources for the "I can't play this media type for this entertainment area" string, post the file in which it's defined, and I'll try to figure out in the source where is the "missing link" and how to fix it.
Title: Re: MAME Plugin Progress Thread
Post by: darrenmason on December 16, 2007, 10:41:44 pm

but i seem to be missing one link, how does the system know to talk with the DCE router plugin? right now it says
"I can't play this media type for this entertainment area" and the DCErouter log confirms this

however, I _know_ there is a database table I'm  missing, probably in pluto_main, which maps what media types go to which entertainment areas etc... totallymaxed: what am I missing?

Thom,

There is a routine somewhere called getDeviceForEntertainmentArea or something like that. I remember looking at it, at one stage and it might take a bit of tracing but it should lead you to the tables. If you havn't found anything and I get a chance tonight I will have a bit of a browse and see if I can help (that will be at least 12 hours from this post though)

Regards
Darren
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 17, 2007, 05:45:05 am
been at it all night, still in the same place.

frustrated.

 ???

 :-[

Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 17, 2007, 07:35:32 am
pasted rant about code in this thread. I may have to abort this plugin.

http://forum.linuxmce.org/index.php?topic=3489.0

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on December 17, 2007, 07:49:47 am
pasted rant about code in this thread. I may have to abort this plugin.

http://forum.linuxmce.org/index.php?topic=3489.0

Y'know, of all the different languages that all the world's programmers know, the one we all use in common is foul language ;).
Title: Re: MAME Plugin Progress Thread
Post by: aaron.b on December 17, 2007, 08:10:19 am
I posted a reply in the rant forum...  http://forum.linuxmce.org/index.php?topic=3489.0   If there's a flaw here I welcome having someone point it out.  But I've read the rant and I can't see the flaw Thom is referring to....
Title: Re: MAME Plugin Progress Thread
Post by: darrenmason on December 17, 2007, 12:24:29 pm
Thom,

Try entries in the DeviceTemplate_MediaType table (pluto_main).

From what I can tell the Media_plugin (base class) is responsible for giving back devices in an entertainment area, which are able to play a particular media type. When selected from a datagrid a piece of media will find devices for the entertainment area it was started in and issue a playMedia to the best match. If no devices are found then you get the message you are getting.

HTH
Darren
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 17, 2007, 01:52:58 pm
yeah, i've already messed with this table quite a bit, which is why i am still confused..and what prompted me to actually start digging into the media base classes, and ultimately what caused me to totally lose it.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: aaron.b on December 17, 2007, 05:24:25 pm
Thom.  Do you have Skype?  Or can we have a quick call on the phone?  You can send me a private email to aaron.b [at] plutohome[dot]com.  I think all this talk about the ContainsVideo is kind of getting lost in the weeds and a diversion since it's so trivial and something you'll never need to touch to do a games plugin.  You shouldn't need to touch that table either unless you want to create a custom remote control screen for your plugin.  We were able to add new plugins for VDR and VLC and never touched anything in the database or the base classes.  So I think the real issue is somewhere else and this ContainsVideo is just a red herring.  The big problem is the lack of documentation.  Because there's no clear overview, I understand it must be frustrating to try to reverse-engineer everything and figure out the architecture based on the code.  This has been a major issue with all the coders on the project (myself included) in that nobody likes to write documentation no matter how important we all know it is, and the Pluto code isn't well documented and only a couple people know how all the pieces fit together. 
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 17, 2007, 05:29:21 pm
I will need to do a custom remote at some point.

I won't be able to talk until after 5pm EST, and I wanted this discussion to be done with the community so that documentation could be written, rather than just transferred from one single programmer to another single programmer.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: darrenmason on December 17, 2007, 11:48:24 pm
aaron,

It would be good to see the responses on the forum, as people are now regularly extracting stuff from here and putting them into wiki entries.

I am also quite interested in how the to associate new devices with particular media types (in particular areas) as this impacts what I am working on at the moment as well.

regards
Darren
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on December 17, 2007, 11:54:05 pm
I third that.... 

Documentation, in whatever form beit a forum message, wiki entry, etc..., is helpful..

Dan
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 18, 2007, 03:51:54 pm
Update, had a long talk with aaron.b, and I think I know what's going on with the media subsystem now. I will be pasting the little scribbles of notes that I have later, but it seems that I need to make sure the constructor properly calls the register event of the media plugin so that it knows that it can deal with it.

I'll try again when i get home, wasn't able to last night because I was in the emergency room because of hypertension and heart palpitations.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on December 18, 2007, 03:56:16 pm
I'll try again when i get home, wasn't able to last night because I was in the emergency room because of hypertension and heart palpitations.

Are you joking? If you are, please add instructions to the wiki for setting up a dev env before you take the knowledge with you when you die :).

If you're not joking, maybe you should leave this stuff alone for a little while. Perhaps the 0710 release will relax you. Or just some holiday cheer.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 18, 2007, 03:59:31 pm
i wish i was. on the plus side, the call with Aaron.b (that happened before I went...no that didn't cause it) was fantastic. he answered my questions very straightforward, although he was adamant on my selection of code in the first of the rant thread...other than that..great guy...talked about the future of pluto..of linuxmce (they love us now, we have done more in our 1 year, than pluto has been able to do up to this point)

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: darrenmason on December 18, 2007, 11:32:08 pm
Good stuff, will look forward to your wiki posts.

Take it easy.

Darren
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on December 18, 2007, 11:36:00 pm
Thom,
Heartfelt feelings out to you.  I know what that's like, I am on medical leave right now due to, among other things, stress.
Before you know it, it eats you up, and there's NOTHING you can do.

For me, working on linuxmce is enjoyment.  I'm keeping it that way.  Once it feels like stress, I HAVE to bow out.
That said, I'm having WAY too much fun learning Ruby and coding insteon.. ;)
When I started, I didn't even know ruby.. I'm still learning it...

Hope you feel better soon!
Dan
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 19, 2007, 12:25:26 am
Ruby is a beautiful language. If you don't have it, pick up the PickAxe book.

You'll find that Ruby is _very_ close to Smalltalk...only a few very small differences, and just as powerful. I write a lot of my research software in smalltalk and ruby because they allow me to test ideas very quickly, and flexibly

I will continue to work on LinuxMCE too, it's my one enjoyment right now... my fiancee is 4000 miles away, I'm alone in this city with no friends, and I work in the bowels of a health insurance corporation, the ultimate corporate hell....tack onto that that i am desperately trying to go through school so that maybe...just maybe MIT will grant me entrance for graduate level work, because I want to work towards a Ph.D in computer science to do blue sky systems research (I hate the state of computing today, I want to help change it, even if it is only for myself.).... LinuxMCE is just one aspect of my research.

tack onto that, I've gone into my manic depressive cycle, and basically, I'm amazed i'm still alive....

thanks, and I hope i feel better soon.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on December 19, 2007, 06:39:29 am
Thanks Thom, and I'm finding Ruby to be quite powerful..
Apparently, the next version is supposed to support PROPER threading..
(we can hope.. hehe)
My main problem now is not the ruby language, it's how to communicate with Linuxmce... All the stuff in the wiki is fine.. no problem..
It's more advanced stuff, like reading scenarios in ruby, storing data with my device, etc..
I haven't quite figured it all out yet.. but I'm sure it'll come..
I'll look for that book..

Dan
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on December 19, 2007, 03:43:44 pm
My main problem now is not the ruby language, it's how to communicate with Linuxmce... All the stuff in the wiki is fine.. no problem..
It's more advanced stuff, like reading scenarios in ruby, storing data with my device, etc..
I haven't quite figured it all out yet.. but I'm sure it'll come..

I'm trying to figure out where in the LMCE src is the interface between GSD Ruby and the LMCE API. It looks like it might be the RubyDeviceWrapper and RubyCommandWrapper , which proxy for LMCE devices and commands, but I'm not sure (I don't know how to use Ruby to talk back to LMCE in GSD). I want to use the same LMCE API for Perl, embedding a Perl interpreter in GSD the way Ruby is embedded. If you figure it out, would you update the "GSD Ruby Interface" (http://wiki.linuxmce.org/index.php/Ruby) wiki article?
Title: Re: MAME Plugin Progress Thread
Post by: aaron.b on December 19, 2007, 04:14:56 pm
Get this file: http://plutohome.com/gsdcode.tar.gz

Untar it, and add it to your database: mysql pluto_main < gsdcode

This contains all the Ruby code for all our GSD devices.  Look in InfraredGroup table, and see also Manufacturer table, to see the infrared groups.  I know the GSD for EIB and for Bang & Olufsen use some of the Ruby objects which interface back to LinuxMCE and retrieve device lists, send messages, etc.

Title: Re: MAME Plugin Progress Thread
Post by: Matthew on December 19, 2007, 08:00:50 pm
This contains all the Ruby code for all our GSD devices.  Look in InfraredGroup table, and see also Manufacturer table, to see the infrared groups.  I know the GSD for EIB and for Bang & Olufsen use some of the Ruby objects which interface back to LinuxMCE and retrieve device lists, send messages, etc.

I'm not a Ruby programmer. So before I start learning enough Ruby to understand which LMCE API the Ruby code and objects are calling, if someone can point at that LMCE API itself, that would help me. But that Ruby code dump is certainly a bottom line example of how to do it. Thanks.
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on December 19, 2007, 09:07:45 pm
aaron.b,

Thank you so much for that!  I'll dig into that now!  Don't want to discuss my insteon in this thread...

Dan
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on December 24, 2007, 07:58:44 am
Thom,

How's the MAME Plugin coming??

I've made a ton of progress on my Insteon today.  Tomorrow, I should be able to get it to automagically add new lighting devices...

If all goes well, it'll snap into the Lighting wizard, asking you which light is blinking...

I still have a bit of work, but i'd say it's 90% there. (to what I want it to be)

Hope you're having the same success with MAME...

Dan
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 25, 2007, 12:45:03 am
am off it temporarily. I'm in Texas...my laptop doesn't have a working back-light, so I have to get to a place with a decent monitor so i can continue working on it.

Title: Re: MAME Plugin Progress Thread
Post by: ddamron on December 25, 2007, 01:07:17 am
Sorry to hear that..

When you do get back to it, Good Luck!

Merry Christmas

Dan
Title: Re: MAME Plugin Progress Thread
Post by: bulek on December 25, 2007, 10:36:09 pm
...

If all goes well, it'll snap into the Lighting wizard, asking you which light is blinking...

I still have a bit of work, but i'd say it's 90% there. (to what I want it to be)

...

Dan

Hi,

can anyone please give some more info how you implement light flashing or light selection procedure ? do you have to implement it by yourself or is a part of LMCE ?

Thanks in advance,

regards,

Bulek.
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on December 25, 2007, 10:47:13 pm
Bulek,

That's what I'm working on right now...

From what I can figure, you send an event Report Child Devices to the system..

AFAIK, it should kick in the apropriate wizard...
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on December 25, 2007, 11:41:13 pm
please move this out into a different thread. :-)

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on December 25, 2007, 11:54:56 pm
Sorry Thom ;)

Title: Re: MAME Plugin Progress Thread
Post by: bulek on December 26, 2007, 07:21:59 am
Hi,

sorry also. Have moved discussion to http://forum.linuxmce.org/index.php?topic=3571.0 (http://forum.linuxmce.org/index.php?topic=3571.0).

Regards,

Bulek.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 05, 2008, 07:31:31 am
am sorry, have been having health problems. I'm trying to continue work on this plugin.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 06, 2008, 08:26:29 pm
I have sent a message to aaron.b asking for a little bit of help, but... I have writtten the first pass of the code that lives in the DCE router for the new media type.. Oddly enough, even though the plugin instantiates, and it says it is activated, even going as far as saying it's Registered: Yes, in the admin...

it doesn't seem to jump into my Register() method at all...nor any of the other commands (I see no log messages for them.) I have added appropriate schema to MediaType, MediaType_DesignObj, DeviceTemplate_Mediatype.. am I missing anything here?

I have attached a URL to the code here, and am wondering if anyone else can successfully compile it on their systems? or maybe shed some insight into why this isn't functioning???

http://www.localeconcept.com/pub/development/MAME_Plugin_Player.tar.gz (http://www.localeconcept.com/pub/development/MAME_Plugin_Player.tar.gz)

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: hari on January 06, 2008, 10:55:29 pm
I have sent a message to aaron.b asking for a little bit of help, but... I have writtten the first pass of the code that lives in the DCE router for the new media type.. Oddly enough, even though the plugin instantiates, and it says it is activated, even going as far as saying it's Registered: Yes, in the admin...

it doesn't seem to jump into my Register() method at all...nor any of the other commands (I see no log messages for them.) I have added appropriate schema to MediaType, MediaType_DesignObj, DeviceTemplate_Mediatype.. am I missing anything here?

I have attached a URL to the code here, and am wondering if anyone else can successfully compile it on their systems? or maybe shed some insight into why this isn't functioning???

http://www.localeconcept.com/pub/development/MAME_Plugin_Player.tar.gz (http://www.localeconcept.com/pub/development/MAME_Plugin_Player.tar.gz)

-Thom


did you also compile the dcerouter after running sql2cpp? Don't know if it's needed but may be worth a try.

best regards,
Hari
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 06, 2008, 11:09:59 pm
if that's required, that's just ($#@($#@ retarded!

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on January 06, 2008, 11:12:18 pm
Thom,

You kill me!  lol
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 06, 2008, 11:18:44 pm
Well no, think about it

are we supposed to expect everybody to update their entire system libraries and base executables so that it will know about my plugin? that doesn't make any sense.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on January 06, 2008, 11:22:09 pm
I understand your reasoning, I wasn't talking about the problem, I was referring to YOU!

lol.. If I could, I'd buy you a beer!

Title: Re: MAME Plugin Progress Thread
Post by: hari on January 07, 2008, 12:19:30 am
Well no, think about it

are we supposed to expect everybody to update their entire system libraries and base executables so that it will know about my plugin? that doesn't make any sense.

-Thom

i think "plugin" refers to "get's plugged into the dce router memory space" and not to "a user can plug that into his system" *grin*
but i am just guessing and don't know for sure..

you could try then we know..

best regards,
Hari
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 26, 2008, 11:11:47 pm
Okay, a breakthrough!

I recently upgraded my core from 070.4, to 0710 beta 3, and set up a dev environment on it.

I then went through the following steps:

* Defined device templates for MAME Plugin and MAME player, taking their equivalent parameters from the Xine pair.
* built and ran DCEGen on the new templates
* built and ran sql2cpp, to update all constants.
* built the initial stubs to make sure the build is stable, copied them into /usr/pluto/bin
* added the MAME Plugin as a child to the DCE Router
* added the MAME Player as a child to the primary orbiter, making sure the entertainment areas are properly mapped.
* removed unnecessary methods not needed for standalone use.
* implemented the Register, FindDeviceInEntertainmentArea, CreateMediaStream, StartMedia, StopMedia methods patterning after the Xine Plugin
* implemented MAMEMediaStream subclass
* added my new stream type to MediaHandlerInfo.h in Media_Plugin
* added new row to MediaType for the new media type.
* added new row to DeviceTemplate_Mediatype, pointing to the MAME Player
* added new row to MediaType_DesignObj, patterning after Xine player for now
* added new rows to the appropriate fields in Media database.
* added new scenario to trigger local orbiter->Show File List for my new media type.
* force reload router (any time plugin is compiled, router reload must be forced)

As of now, the file list appears, I can select a game, and it will trigger the CreateMediaStream and StartMedia methods in my plugin, updating the Orbiter display as needed. This works great. Now I have to start implementing the various methods in the MAME_Player to launch mame, and swallow the window correctly.

more to come soon.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 27, 2008, 08:12:54 am
darn! so close.

I have MAME spawning via the App server...however, there are two things that are happening...

* In full screen mode, I see the MAME screen perfectly, but the orbiter will not come to the front when I ask for it.
* In Windowed mode, the Photo Screen Saver immediately draws over it...

I can definitely attach via WM_CLASS and do some window manager re-ordering bits to make it work..but I am wondering if I am missing something as to how it's supposed to be done... oddly enough, every media player DCE device i've seen just tells the target player to launch "full screen"

any ideas???

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on January 27, 2008, 03:30:31 pm
darn! so close.

I have MAME spawning via the App server...however, there are two things that are happening...

* In full screen mode, I see the MAME screen perfectly, but the orbiter will not come to the front when I ask for it.
* In Windowed mode, the Photo Screen Saver immediately draws over it...

I can definitely attach via WM_CLASS and do some window manager re-ordering bits to make it work..but I am wondering if I am missing something as to how it's supposed to be done... oddly enough, every media player DCE device i've seen just tells the target player to launch "full screen"

Seems to me that the screensaver starting up means LMCE isn't know that the MAME plugin is started. When the screensaver initializes (http://wiki.linuxmce.org/index.php/1._Initialization), can you find in the DCERouter log what's happening right before the screensaver gets the "ON" command? Whatever logic (in the Orbiter, I expect) sends the ON command I suppose isn't seeing the MAME plugin's running state. I don't know if the DCERouter shows traffic indicating that, but it might have a clue. Otherwise, tracing the logic that sends the ON command might have that clue. Or maybe the screensaver logic handling the OFF command shows how to set the state to keep the screensaver off. src/Orbiter/Orbiter.{cpp,h} have lots of references to the ScreenSaver child of the Orbiter. Especially interesting looks like src/Orbiter/Orbiter.cpp: Orbiter::ScreenSaver() starting at line 820.
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on January 27, 2008, 04:06:32 pm
Thom,

Great work!

I'm wondering if the screensaver senses another program running? or does the other program need to send a screensaver OFF command first, and then end with and sending it an on?

I'm not that deep into the router, so I could be in left field.

Best of Luck!

Dan
Title: Re: MAME Plugin Progress Thread
Post by: hari on January 27, 2008, 04:29:56 pm
did you sent a media playing event?

best regards,
Hari
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 27, 2008, 06:25:08 pm
from aaron.b:

------

In media_plugin.h notice setnowplaying().  This gets the class name of the window for the active media (comes from one of the mediatype_xxx tables), and forwards it to orbiter as the command
SetNowPlaying. Play media and tail the dcerouter to see this happenng withxine.  When orbitet gets setnowplaying with mediatype!0 it stops photoscreensaver, hides that window, and puts the window described in the classname immediately behind orbiter if orbiter has something to display, or if orbiter has nothing to display other than the full screen media, it puts that window on top with orbiter behind. This is for ui2. For ui1 the media is always on top of orbiter. So if the name of the window class is correctly specified in the db the window management is automatic.

Btw, you know to comment out the loglevels entry in pluto.conf, and reload router (or just reload logs) to get verbose logging. Then you will see in orbiter's log all the window manager commands orbiter is sending, and you can send the same commands with wmctrl

------

I've set the wmclass tuple via the Name property in both the device template, and my device instance... is there somewhere else he is referring to? I don't see a mention of a wm_class anywhere else in the database...
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on January 27, 2008, 07:58:24 pm
from aaron.b:

------

In media_plugin.h notice setnowplaying().  This gets the class name of the window for the active media (comes from one of the mediatype_xxx tables), and forwards it to orbiter as the command
SetNowPlaying. Play media and tail the dcerouter to see this happenng withxine.  When orbitet gets setnowplaying with mediatype!0 it stops photoscreensaver, hides that window, and puts the window described in the classname immediately behind orbiter if orbiter has something to display, or if orbiter has nothing to display other than the full screen media, it puts that window on top with orbiter behind. This is for ui2. For ui1 the media is always on top of orbiter. So if the name of the window class is correctly specified in the db the window management is automatic.

Btw, you know to comment out the loglevels entry in pluto.conf, and reload router (or just reload logs) to get verbose logging. Then you will see in orbiter's log all the window manager commands orbiter is sending, and you can send the same commands with wmctrl

------

I've set the wmclass tuple via the Name property in both the device template, and my device instance... is there somewhere else he is referring to? I don't see a mention of a wm_class anywhere else in the database...

So the MD's Orbiter is the hub for local device state? Is there any other component in the system that keeps state?

A better OOP architecture would make the display itself a device which tracks its own state (stored in the DB), and gets events from other devices about what they're doing (in their own terms, like starting up and stopping)., then decides how to react (like starting a countdown to initiating a screensaver). In the current architecture, that could probably be part of the MD's AppServer. Eventually perhaps the display and inputs (kbd, mouse, etc) could be its child devices. The Orbiter itself should have state and logic for only the UI. That would also make replacing it with new UIs, like UI3, a project with a smaller scope.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 27, 2008, 08:01:25 pm
The On-Screen orbiter handles window management...which does make sense...

but that doesn't really answer my question.... where the hell do I set WM_CLASS???

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 28, 2008, 08:43:08 am
HUGE Progress!

As it turns out, I did indeed have to set DATA #156 (Name) to the WM_Class of the window... this was correct...

HOWEVER

I also needed to subclass MediaStream::ContainsVideo, to return true, so that the window management would ACTUALLY HAPPEN, and the Photo_Screen_Saver would STOP.

I still need to do some basic process management, and some bits of code to dynamically write out the correct config files, so that no matter where the roms are, it will "Just Work" .... but... hey, we're very close to having MAME games in LinuxMCE!

And without further ado, THE SCREENIES.

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)

What do you all think?

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: dopey on January 28, 2008, 09:16:22 am
Wow, that's just F'n awesome :) and reading about all the work and frustrations you had to endure to get this makes it just that much more impressive!
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on January 28, 2008, 09:32:50 am
the irony is, the WORK involved FIGURING OUT how the system actually _worked_. The code to actually DO the grunt work isn't that difficult.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: mchapman on January 28, 2008, 10:02:29 am
Congrats on your breakthrough....do you have any hair left ;)
Title: Re: MAME Plugin Progress Thread
Post by: bulek 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.
Title: Re: MAME Plugin Progress Thread
Post by: Matthew 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.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 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
Title: Re: MAME Plugin Progress Thread
Post by: Matthew 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).
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 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
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on January 28, 2008, 07:47:21 pm
Way to go Thom!!!!
Great work!
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 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
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 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
Title: Re: MAME Plugin Progress Thread
Post by: Matthew 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 :).
Title: Re: MAME Plugin Progress Thread
Post by: hari 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/
Title: Re: MAME Plugin Progress Thread
Post by: Matthew 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.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 03, 2008, 10:30:09 am
http://www.localeconcept.com/pub/scratch/games/now_with_title.jpg (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.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 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
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 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
Title: Re: MAME Plugin Progress Thread
Post by: rrambo on February 05, 2008, 08:04:07 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


gotta admit...  that's kinda bad a$$
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 08, 2008, 07:16:33 am
Further work, This time a solution for game metadata.

After a few different tries at grabbing metadata for roms etc. I have decided that keeping a locally maintained SQLCVS database is the best course of action. I have created a new database on my system, lmce_game, which will house this db.. I have not applied sqlcvs bits to it yet, but I will...

I have made the basic sql2cpp classes to wrap it, and I am writing a bootstrapper to try and populate this initial table. This is mostly needed for MAME, because I have to get this data from elsewhere.....

I will add grabbers for 2600 roms, and other rom formats that do not contain metadata sections...but this is the first step to supporting other game system types later, once I get this first one working.

I will be storing this in my little home spot in the svn trunk.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on February 08, 2008, 03:10:52 pm
Further work, This time a solution for game metadata.

After a few different tries at grabbing metadata for roms etc. I have decided that keeping a locally maintained SQLCVS database is the best course of action. I have created a new database on my system, lmce_game, which will house this db.. I have not applied sqlcvs bits to it yet, but I will...

I have made the basic sql2cpp classes to wrap it, and I am writing a bootstrapper to try and populate this initial table. This is mostly needed for MAME, because I have to get this data from elsewhere.....

I will add grabbers for 2600 roms, and other rom formats that do not contain metadata sections...but this is the first step to supporting other game system types later, once I get this first one working.

I will be storing this in my little home spot in the svn trunk.

That would be an excellent system. But what are the copyright/redistribution constraints on those ROMS, any? If none, swell, but if not, that could be trouble. Even if most ROMs are out of copyright, are there any most recent ROMs that have some restrictions?
Title: Re: MAME Plugin Progress Thread
Post by: Zaerc on February 08, 2008, 03:54:40 pm
Further work, This time a solution for game metadata.

After a few different tries at grabbing metadata for roms etc. I have decided that keeping a locally maintained SQLCVS database is the best course of action. I have created a new database on my system, lmce_game, which will house this db.. I have not applied sqlcvs bits to it yet, but I will...

I have made the basic sql2cpp classes to wrap it, and I am writing a bootstrapper to try and populate this initial table. This is mostly needed for MAME, because I have to get this data from elsewhere.....

I will add grabbers for 2600 roms, and other rom formats that do not contain metadata sections...but this is the first step to supporting other game system types later, once I get this first one working.

I will be storing this in my little home spot in the svn trunk.

That would be an excellent system. But what are the copyright/redistribution constraints on those ROMS, any? If none, swell, but if not, that could be trouble. Even if most ROMs are out of copyright, are there any most recent ROMs that have some restrictions?

Somehow I doubt the roms (like any other media) are going to be included.  ::)
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on February 08, 2008, 04:10:15 pm
Further work, This time a solution for game metadata.

After a few different tries at grabbing metadata for roms etc. I have decided that keeping a locally maintained SQLCVS database is the best course of action. I have created a new database on my system, lmce_game, which will house this db.. I have not applied sqlcvs bits to it yet, but I will...

I have made the basic sql2cpp classes to wrap it, and I am writing a bootstrapper to try and populate this initial table. This is mostly needed for MAME, because I have to get this data from elsewhere.....

I will add grabbers for 2600 roms, and other rom formats that do not contain metadata sections...but this is the first step to supporting other game system types later, once I get this first one working.

I will be storing this in my little home spot in the svn trunk.

That would be an excellent system. But what are the copyright/redistribution constraints on those ROMS, any? If none, swell, but if not, that could be trouble. Even if most ROMs are out of copyright, are there any most recent ROMs that have some restrictions?

Somehow I doubt the roms (like any other media) are going to be included.  ::)

Good point. But if there's no copyright, then why not allow LMCE/MAME serve as a completely easy platform for sharing these games? Finally MAME for the masses, without having to search for and install the ROMs.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 08, 2008, 07:53:17 pm
I can store the metadata, I just can't store the roms. I'm sorry fellas, I love you all...but I don't love you all THAT much.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on February 08, 2008, 11:02:59 pm
I can store the metadata, I just can't store the roms. I'm sorry fellas, I love you all...but I don't love you all THAT much.

Is copyright stopping you, or load on your server, or something else?
Title: Re: MAME Plugin Progress Thread
Post by: jetrich on February 08, 2008, 11:49:56 pm
I hate to interject here, but...

Is copyright stopping you, or load on your server, or something else?

Matthew, it sure would seem that you like to push buttons quite often.

Seriously, what difference does it make? It is his prerogative whether or not he would like to distribute MAME ROMs, whether legal or otherwise.

Quote
From http://www.gaming-nation.net/articles.php?articleId=58 (http://www.gaming-nation.net/articles.php?articleId=58)
Legal Status of MAME
MAME itself is perfectly legal, as it is merely an emulator. The MAME license explicitly forbids people from distributing it along with rom images.
Making emulators is protected by fair use. It's the rom images themselves that are copyrighted.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 11, 2008, 01:51:29 am
Do _NOT_ post links on where to get ROMS!

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on February 11, 2008, 05:01:40 am
I hate to interject here, but...

Is copyright stopping you, or load on your server, or something else?

Matthew, it sure would seem that you like to push buttons quite often.

Seriously, what difference does it make? It is his prerogative whether or not he would like to distribute MAME ROMs, whether legal or otherwise.

Quote
From http://www.gaming-nation.net/articles.php?articleId=58 (http://www.gaming-nation.net/articles.php?articleId=58)
Legal Status of MAME
MAME itself is perfectly legal, as it is merely an emulator. The MAME license explicitly forbids people from distributing it along with rom images.
Making emulators is protected by fair use. It's the rom images themselves that are copyrighted.

I'm not pushing any buttons. I just asked a perfectly legitimate question, because I did not know whether the ROMs were copyrighted or not Since the 1980s were a quarter century ago, it did not seem certain that there were, and since many people are using them who presumably did not buy them in actual ROM, it seemed likely they were not so restricted.

So now I got an actual answer. I never implied that anyone should do anything wrong, I merely asked that question on the subject. If they were stopped because of server load, not copyright, then it wouldn't be "game over". But since it is copyright, it is "game over".

It's not me pushing buttons, its weird headgames people are playing rather than just give a straight answer.

What the hell was the big deal about giving a straight answer to a simple question?
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on February 11, 2008, 05:28:30 am
Aye Karumba!
Title: Re: MAME Plugin Progress Thread
Post by: sk1 on February 11, 2008, 05:30:30 am
What the hell was the big deal about giving a straight answer to a simple question?

It's all about CYA.

Do _NOT_ post links on where to get ROMS!
-Thom

Sorry 'bout that Thom, I knew it was wrong the second I hit post... won't happen again...

-skip
Title: Re: MAME Plugin Progress Thread
Post by: hari on February 11, 2008, 08:59:50 am
I'm not pushing any buttons. I just asked a perfectly legitimate question, because I did not know whether the ROMs were copyrighted or not Since the 1980s were a quarter century ago, it did not seem certain that there were, and since many people are using them who presumably did not buy them in actual ROM, it seemed likely they were not so restricted.
the copyright holders like to earn additional money nowadays with handy games and retro packs so hardly any roms are out there for free.

regards,
Hari
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 11, 2008, 09:17:00 am
I really do wish the situation were different... but it's not... this whole plug-in is one big grey area to begin with...

with that said, there ARE packs out there that you can get from places like x-arcade, that are legally licensed, that you can copy onto the disk and use. :-)

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 11, 2008, 01:46:08 pm
Development work:

Just committed a fix into svn last night that fixes the "somebody hit ESC" bug.

Basically, discovered an interesting aspect of the App Server. When Applications are spawned, you can also attach a text DCE message to them for the App Server to send in the event of the app exiting. MythTV_Player uses this to craft a command message that gets sent back to itself called "Application Exited" to which it contains an MH_Stop_Media command directed to all media player devices on the media director.

What I find especially odd is that this isn't an "event" .. but a "command" ... there must be a bizarre reason for this. I had to add the Myth Player command group to my device template and re-run DCEGen to get the appropriate command stub bits to add, but it worked like a charm.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 21, 2008, 02:53:55 am
Still hacking on the plugin, this time, doing a new external library, WindowUtils, which will currently have two high level functions

GetWindowIDFromTitle() - Gets the Window # from a title fragment. This is used to find the MAME window.
SendKeystrokeToWindowID() - This uses XSendEvent to pass keystrokes to the emulator window. I use XSendEvent _BECAUSE_ the orbiter window may not be in focus at all times, and I need to be able to periodically send events (for example, Screenshot, to grab a video frame.)

work progresses onward, also having to deal with my health, so i am taking this slow.

This may if it becomes mature enough, be a nice replacement for the wmctrl calls all over Orbiter.

-Thom

Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 24, 2008, 03:39:39 am
still hacking on WindowUtils, it compiles now.. but I seem to be having difficulties with my GetProperty routine...very odd...

Code: [Select]
12      02/23/08 21:19:42.000           Calling callback for alarm 0x808e798 id 1 param=(nil) entry->when: 1203819582 time: 1203819582 <0xb7752b90>
10      02/23/08 21:19:42.000           WindowUtils::GetProperty -- getting property _NET_CLIENT_LIST <0xb7752b90>
10      02/23/08 21:19:42.000           WindowUtils::GetProperty -- Got Property:  <0xb7752b90>
10      02/23/08 21:19:42.000           WindowUtils::GetClientList -- Got Client List:  <0xb7752b90>
01      02/23/08 21:19:42.001           WindowUtils::FindWindowMatching -- Fell all the way through! <0xb7752b90>
01      02/23/08 21:19:42.001           Couldn't find MAME Window <0xb7752b90>
12      02/23/08 21:19:42.001           Cancel Alarm by type: 1 <0xb7752b90>
12      02/23/08 21:19:47.000           Calling callback for alarm 0x808e798 id 1 param=(nil) entry->when: 1203819587 time: 1203819587 <0xb7752b90>
10      02/23/08 21:19:47.000           WindowUtils::GetProperty -- getting property _NET_CLIENT_LIST <0xb7752b90>
10      02/23/08 21:19:47.000           WindowUtils::GetProperty -- Got Property:  <0xb7752b90>
10      02/23/08 21:19:47.000           WindowUtils::GetClientList -- Got Client List:  <0xb7752b90>
10      02/23/08 21:19:47.000           WindowUtils::GetClientList -- Client List Fragment:  <0xb7752b90>
10      02/23/08 21:19:47.000           WindowUtils::GetClientList -- Client List converted to int: 0 <0xb7752b90>
10      02/23/08 21:19:47.000           WindowUtils::GetClientList -- Client List Fragment:  <0xb7752b90>
10      02/23/08 21:19:47.000           WindowUtils::GetClientList -- Client List converted to int: 0 <0xb7752b90>
10      02/23/08 21:19:47.000           WindowUtils::GetProperty -- getting property _NET_WM_NAME <0xb7752b90>
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  12
  Current serial number in output stream:  12

the code:

WindowUtils.cpp

Code: [Select]
/*
     Copyright (C) 2008 Locale|CONCEPT for the LinuxMCE project.

Author: Thomas Cherryhomes <thom.cherryhomes@localeconcept.com>


     This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License.
     This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

     See the GNU General Public License for more details.

This code was based in part on:

wmctrl
A command line tool to interact with an EWMH/NetWM compatible X Window Manager.

Author, current maintainer: Tomas Styblo <tripie@cpan.org>

Copyright (C) 2003

*/

#include "WindowUtils.h"
#include "PlutoUtils/CommonIncludes.h"
#include "DCE/Logger.h"

#include <vector>
#include <map>
#include <string>
#include <cstdlib>
 
#include <fcntl.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>
#include <sys/select.h>

extern int errno;

using namespace std;
using namespace DCE;

#include "PlutoUtils/StringUtils.h"
#include "PlutoUtils/FileUtils.h"
#include "PlutoUtils/PlutoDefs.h"

namespace WindowUtils
{
using std::map;
using std::vector;
using std::string;

}

// Quick little hack.
inline int stoi(std::string &s)
{
    return std::atoi(s.c_str());
}

/**
* GetProperty - Get an X Property.
*/
bool WindowUtils::GetProperty(Display *disp, Window win, Atom xa_prop_type, string s_PropertyName, string& s_Property)
{
Atom xa_prop_name;
Atom xa_ret_type;
int ret_format;
unsigned long ret_nitems;
unsigned long ret_bytes_after;
unsigned long tmp_size;
unsigned char *ret_prop;
        char *ret;

xa_prop_name = XInternAtom(disp, s_PropertyName.c_str(), False);
LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::GetProperty -- getting property %s",s_PropertyName.c_str());

    /* MAX_PROPERTY_VALUE_LEN / 4 explanation (XGetWindowProperty manpage):
      *
      * long_length = Specifies the length in 32-bit multiples of the
      *               data to be retrieved.
      */

if (XGetWindowProperty(disp, win, xa_prop_name, 0, MAX_PROPERTY_VALUE_LEN / 4, False,
    xa_prop_type, &xa_ret_type, &ret_format,     
            &ret_nitems, &ret_bytes_after, &ret_prop) != Success)
{
LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"Cannot get %s property.",s_PropertyName.c_str());
return false;
}

if (xa_ret_type != xa_prop_type)
{
LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"Invalid type of %s property.", s_PropertyName.c_str());
XFree(ret_prop);
return false;
}

XFree(ret_prop);

       /* null terminate the result to make string handling easier */
tmp_size = (ret_format / 8) * ret_nitems;
ret = (char *)malloc(tmp_size+1);

memcpy(ret, ret_prop, tmp_size);
ret[tmp_size] = '\0';

/* Then, convert it to a C++ string */

s_Property = string(ret);
LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::GetProperty -- Got Property: %s",s_Property.c_str());
return true;

}

/**
* GetClientList - Get the list of clients attached to display.
*/
bool WindowUtils::GetClientList(Display *disp,vector<Window>& v_wClientList)
{

string client_list;
unsigned int i;

if (!GetProperty(disp,DefaultRootWindow(disp),XA_WINDOW,"_NET_CLIENT_LIST",client_list)) 
{
if (!GetProperty(disp,DefaultRootWindow(disp), XA_CARDINAL, "_WIN_CLIENT_LIST",client_list))
{
LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"WindowUtils: Cannot Get Client List Properties");
return false;
}
}

string temp;
int win;

LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::GetClientList -- Got Client List: %s",client_list.c_str());

// Now transmorgrify it into a vector of Windows
for (i=0;i<client_list.size();i+=sizeof(Window))
{
temp = client_list.substr(i,sizeof(Window));
LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::GetClientList -- Client List Fragment: %s",temp.c_str());
win = stoi(temp);
LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::GetClientList -- Client List converted to int: %x",win);
v_wClientList.push_back(win);
}

return true;

}
 
/**
* GetWindowTitle - Get Window Title given Window ID
*/
bool WindowUtils::GetWindowTitle(Display *disp, Window win, string& s_Title)
{
string s_wm_name;
string s_Net_wm_name;

if (!GetProperty(disp, win, XInternAtom(disp, "UTF8_STRING", False), "_NET_WM_NAME", s_Net_wm_name))
{
// no _NET_WM property for window title, get it the old way.
LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"WindowUtils::GetWindowTitle -- no _NET_WM_Property, getting old way.");
if (!GetProperty(disp, win, XA_STRING, "WM_NAME", s_wm_name))
{
LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::GetWindowTitle -- no WM_NAME property either...bailing...");
return false;
} else {
LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::GetWindowTitle -- Setting Title to WM_NAME %s",s_wm_name.c_str());
s_Title = string(s_wm_name);
return true;
}
}
else
{
LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::GetWindowTitle -- Setting Title to _NET_WM_NAME %s",s_Net_wm_name.c_str());
s_Title = string(s_Net_wm_name);
return true;
}

}

/**
* FindWindowMatching - Return first Window ID matching a title fragment.
*/
bool WindowUtils::FindWindowMatching(Display *disp, string windowName, Window& win)
{
vector<Window> v_wClientList;
string title;
unsigned int i;

if (!GetClientList(disp,v_wClientList))
{
LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"WindowUtils::FindWindowMatching -- Could not get client list!");
return false;
}

for (i=0;i<v_wClientList.size();i++)
{
if (!GetWindowTitle(disp,v_wClientList[i],title))
{
LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"WindowUtils::FindWindowMatching -- Could not get window title for Window ID %x",v_wClientList[i]);
continue;
}
else
{
if (title.find_first_of(windowName) == string::npos)
{
LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"WindowUtils::FindWindowMatching -- Couldn't match window title %s",title.c_str());
continue;
}
else
{
win = (Window)v_wClientList[i];
LoggerWrapper::GetInstance()->Write(LV_STATUS,"WindowUtils::FindWindowMatching -- Title Matched %s to Window id %x",title.c_str(),win);
return true;
}
}
}

LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"WindowUtils::FindWindowMatching -- Fell all the way through!");
return false;

}

WindowUtils.h

Code: [Select]
/*
     Copyright (C) 2008 Locale|Concept

     www.localeconcept.com

     Phone: +1 (617) 245-1354

Author: Thom Cherryhomes <thom.cherryhomes@localeconcept.com>

     This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License.
     This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

     See the GNU General Public License for more details.

This code was based in part on:

wmctrl
A command line tool to interact with an EWMH/NetWM compatible X Window Manager.

Author, current maintainer: Tomas Styblo <tripie@cpan.org>

Copyright (C) 2003

*/

/** @file WindowUtils.h
 Header file for the Window Utils namespace
 */
#ifndef WINDOWUTILS
#define WINDOWUTILS

#include <string>
#include <vector>
#include <map>

#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#include <X11/Xmu/WinUtil.h>

#define _NET_WM_STATE_REMOVE        0    /* remove/unset property */
#define _NET_WM_STATE_ADD           1    /* add/set property */
#define _NET_WM_STATE_TOGGLE        2    /* toggle property  */
#define MAX_PROPERTY_VALUE_LEN     4096

/**
@namespace WindowUtils
For Window Management using EWMH semantics.
*/
namespace WindowUtils
{
using namespace std;
using std::map;
using std::vector;
using std::string;


/**
* GetProperty - Get an X Property.
*/
bool GetProperty(Display *disp, Window win, Atom xa_prop_type, string s_PropertyName, string& s_Property);

/**
* GetClientList - Get the list of clients attached to display.
*/
bool GetClientList(Display *disp,vector<Window>& v_wClientList);

/**
* GetWindowTitle - Get Window Title given Window ID
*/
bool GetWindowTitle(Display *disp, Window win, string& s_WindowTitle);

/**
* FindWindowMatching - Return first Window ID matching a title fragment.
*/
bool FindWindowMatching(Display *disp, string windowName, Window& win);

}
#endif

any ideas???  :-\ ??? I'm going to be whiddling through this until it works....

looks like i'm just mangling things a bit...

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on February 26, 2008, 08:01:45 am
all is good, windowutils is now properly matching windows, and I am getting back a proper window ID....now moving on to injecting window events.

Code: [Select]
12      02/26/08 0:47:27.000            Calling callback for alarm 0x808e798 id 1 param=(nil) entry->when: 1204004847 time: 1204004847 <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetClientList -- root window ID is 0x13a <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetProperty -- getting property _NET_CLIENT_LIST <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetProperty -- Got Property:  <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetClientList -- Client List Size 20 <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetClientList -- Client added: 0x00c00007 <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetClientList -- Client added: 0x0200000e <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetClientList -- Client added: 0x00e00002 <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetClientList -- Client added: 0x01800001 <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetClientList -- Client added: 0x01e0000e <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetWindowTitle -- Getting Window Title for Window 0xc00007 <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetProperty -- getting property _NET_WM_NAME <0xb779fb90>
10      02/26/08 0:47:27.000            WindowUtils::GetProperty -- Got Property: Linux MCE Launch Manager <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Setting Title to _NET_WM_NAME Linux MCE Launch Manager <0xb779fb90>
01      02/26/08 0:47:27.001            WindowUtils::FindWindowMatching -- Couldn't match window title Linux MCE Launch Manager <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Getting Window Title for Window 0x200000e <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- getting property _NET_WM_NAME <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- Got Property: PlutoGalleryViewer <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Setting Title to _NET_WM_NAME PlutoGalleryViewer <0xb779fb90>
01      02/26/08 0:47:27.001            WindowUtils::FindWindowMatching -- Couldn't match window title PlutoGalleryViewer <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Getting Window Title for Window 0xe00002 <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- getting property _NET_WM_NAME <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- Got Property: OrbiterGL <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Setting Title to _NET_WM_NAME OrbiterGL <0xb779fb90>
01      02/26/08 0:47:27.001            WindowUtils::FindWindowMatching -- Couldn't match window title OrbiterGL <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Getting Window Title for Window 0x1800001 <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- getting property _NET_WM_NAME <0xb779fb90>
01      02/26/08 0:47:27.001            Invalid type of _NET_WM_NAME property. <0xb779fb90>
01      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- no _NET_WM_Property, getting old way. <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- getting property WM_NAME <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- Got Property: pluto-xine-playback-window <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Setting Title to WM_NAME pluto-xine-playback-window <0xb779fb90>
01      02/26/08 0:47:27.001            WindowUtils::FindWindowMatching -- Couldn't match window title pluto-xine-playback-window <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Getting Window Title for Window 0x1e0000e <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- getting property _NET_WM_NAME <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetProperty -- Got Property: MAME: No Driver Loaded [empty] <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::GetWindowTitle -- Setting Title to _NET_WM_NAME MAME: No Driver Loaded [empty] <0xb779fb90>
10      02/26/08 0:47:27.001            WindowUtils::FindWindowMatching -- Position: 0, Title Matched MAME: No Driver Loaded [empty] to Window id 0x1e0000e <0xb779fb90>
10      02/26/08 0:47:27.001            MAME window found: Window ID 31457294 <0xb779fb90>
12      02/26/08 0:47:27.001            Cancel Alarm by type: 1 <0xb779fb90>

 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 02, 2008, 01:33:08 am
took a small sideline today, to implement the UI2 popup menu:

http://www.localeconcept.com/pub/scratch/games/now_with_ui2_menu.png

 ;D

still need to implement the DesignObjs for UI1, which is a bit more difficult.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 02, 2008, 05:18:32 am
How you like that? three major things in one day so far:

* The first bits of UI2 done (above)
* WindowUtils::SendKeyToWindow() now works properly.. I will need to add two more complimentary functions for dealing with held down keys in OSD mode
* and because of that.. I was able to implement GetVideoFrame, and as a side effect? ... Thumbnail works!

http://www.localeconcept.com/pub/scratch/games/now_with_get_video_frame.png (http://www.localeconcept.com/pub/scratch/games/now_with_get_video_frame.png)

I fight on.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 02, 2008, 08:06:53 am
and just when things couldn't get any better....

holy crap, I did it.

I managed to trigger frames (a la the DVD menu option) on the orbiter! see for yourselves!

the video says it all...

http://www.localeconcept.com/pub/scratch/games/Holy_Crap__Frames_on_the_Orbiter.mp4 (http://www.localeconcept.com/pub/scratch/games/Holy_Crap__Frames_on_the_Orbiter.mp4)
Title: Re: MAME Plugin Progress Thread
Post by: ddamron on March 02, 2008, 07:58:04 pm
you ROCK
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 02, 2008, 07:59:41 pm
I have added a youtube link:

http://www.youtube.com/watch?v=knachk4FcLc

 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: d3vice on March 02, 2008, 08:30:52 pm
Great stuff!!

Keep it up!!

Will it work with USB joysticks?

Best regards!
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 04, 2008, 07:18:06 am
Okay, more hacking.. Been adding DCE commands steadily, I am now implementing the UI for the Orbiters (UI1):

http://www.localeconcept.com/pub/scratch/games/games_remote_designer.png (http://www.localeconcept.com/pub/scratch/games/games_remote_designer.png)

*passing-out* later.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: bulek on March 04, 2008, 01:52:34 pm
Okay, more hacking.. Been adding DCE commands steadily, I am now implementing the UI for the Orbiters (UI1):

http://www.localeconcept.com/pub/scratch/games/games_remote_designer.png (http://www.localeconcept.com/pub/scratch/games/games_remote_designer.png)

*passing-out* later.

-Thom

Hi,

first thanks for great work... if I understood right, you have managed to create and add new screen to LMCE system using Designer ?

If that's true, could you possible devote some time and describe procedure to do it ? Iwanted to add two screens to LMCE some time ago, but never had a courage to battle with designer....

basically I wanted to create screens :
- for incoming call from doorphone (where I could add camera to incoming call screen so one can actually see person at the front door)
- for audio receivers (currently there is no screen for Audio receivers that have custom commands , so no "stock" screen matches it well enough....

Thanks in advance for any info,

regards,

Bulek....
Title: Re: MAME Plugin Progress Thread
Post by: gazlang on March 06, 2008, 02:10:27 pm
Is MAME likely to be integrated in the final 0710 release? Or does it need to be manually added by the user?

Would be great for the develpoers to integrate this as standard - as said previously, the ROMS can actually be bought in 'arcade packs' so theres no harm in having the emulator for them!
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 06, 2008, 03:12:27 pm
given the way Pluto's system is designed, there is no choice, but to integrate it into the stack. But it won't be in the 0710 release. I still have so many issues to resolve (I'm targeting a complete orbiter UI for ALL of the targets, even the Cisco phone!, as well as auto-configuring joysticks, moving media etc..etc..etc..), so it will most likely be put in at or after 0804.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 16, 2008, 04:39:50 am
Lots happened since I last wrote:

* The first DesignObjs for an orbiter UI have been created. Although I need to get them into the Build Process so that they will be part of the new orbiter, before they are Usable. http://www.localeconcept.com/pub/scratch/games/newcontroller1.png (http://www.localeconcept.com/pub/scratch/games/newcontroller1.png)
* Infrared remote control now works, if I set the FK_Screen_OSD to 128 (which is the PVR OSD remote), this has an OSD ScreenType, so all key presses that are recieved from Infra-red devices go to the local media player, which is precisely what I want to happen.
* MAME Config Creator and Parser. Currently, gets the correct rom path for the selected rom. This allows the roms to be placed anywhere that the system can find them. There is also an allowance to set the graphic accelleration method. In the future this should probably be gotten from the MD's device data.

I am currently working on trying to get the media file list views to properly display the popups for Sort, Filter, Source, and More. This is proving harder than I thought.... ugh.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 16, 2008, 05:42:07 pm
Has anyone here got experience with sql2cpp? I am trying to write a metadata bootstrap utility, and i think i'm just doing some things with it very wrong...but..meh...

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: totallymaxed on March 16, 2008, 06:02:34 pm
Has anyone here got experience with sql2cpp? I am trying to write a metadata bootstrap utility, and i think i'm just doing some things with it very wrong...but..meh...

-Thom


Hi Thom,

I can't help with sql2cpp... but I just wanted to say that what your up to with MAME sounds fantastic... and a mammoth piece of work. I always drop by this thread now and then to see how things are progressing and am always amazed at what your doing!

Its great to see someone doing this kind of development in the community :-)

All the best

Andrew
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 16, 2008, 06:17:15 pm
My current lmce_game_bootstrap code:

.cpp
Code: [Select]
//
// lmce_game_bootstrap.cpp - basic quick little utility I wrote to bootstrap the game database.
//
// Author: Thom Cherryhomes <thom.cherryhomes@localeconcept.com>
//
//

#include "lmce_game_bootstrap.h"

using namespace std;

bool get_game_list(vector<string> &v_sOutput)
{
                const char * const args[] = {"/usr/local/bin/mame", "-listfull", NULL};
string sOutput, sStdErr, sGameName;

                if (ProcessUtils::GetCommandOutput(args[0], args, sOutput, sStdErr) == 0)
{
vector<string> v_sOutputRows;
StringUtils::Tokenize(sOutput,"\n",v_sOutputRows);
for (unsigned int i=1; i < v_sOutputRows.size(); ++i) // skip over first line :-P
{
sGameName = v_sOutputRows[i].substr(0,8);
sGameName = StringUtils::TrimSpaces(sGameName);
v_sOutput.push_back(sGameName);
}

return true;
}
else
{
return false;
}

}

bool get_metadata_for(string sGameName, map <string,string> &m_sGameData)
{
const char * const args[] = {"/usr/bin/getRomInfo.pl",sGameName.c_str(),NULL};
string sOutput, sStdErr;

if (ProcessUtils::GetCommandOutput(args[0], args, sOutput, sStdErr) == 0)
{
vector<string> v_sOutputRows;
StringUtils::Tokenize(sOutput,"\n",v_sOutputRows);
if (v_sOutputRows[0] == "No Title")
{
return false;
} else
{
m_sGameData["title"] = v_sOutputRows[0];
m_sGameData["year"] = v_sOutputRows[1];
m_sGameData["manufacturer"] = v_sOutputRows[2];
m_sGameData["file"] = v_sOutputRows[3];
m_sGameData["genre"] = v_sOutputRows[4];
return true;
}
} else {
return false;
}
}

bool add_to_database(map<string,string> m_sGameData, class Database_lmce_game *myDatabase)
{

// First, add the file.
string sFilename = m_sGameData["file"] + ".zip";
Row_File *pRow_File = myDatabase->Table_File->AddRow();
pRow_File->FK_GameSystem_set(GAMESYSTEM_MAME_CONST);
pRow_File->Filename_set(sFilename);
myDatabase->Table_File->Commit();

// Then, add the Title Attribute->
Row_Attribute *pRow_Attribute = myDatabase->Table_Attribute->AddRow();
pRow_Attribute->FK_AttributeType_set(ATTRIBUTETYPE_title_CONST);
pRow_Attribute->FK_GameSystem_set(GAMESYSTEM_MAME_CONST);
pRow_Attribute->Name_set(m_sGameData["title"]);
myDatabase->Table_Attribute->Commit();

// Then, add the Title Attribute to the file->
Row_File_Attribute *pRow_File_Attribute = myDatabase->File_Attribute_get()->AddRow();
pRow_File_Attribute->FK_File_set(pRow_File->PK_File_get());
pRow_File_Attribute->FK_Attribute_set(pRow_Attribute->PK_Attribute_get());
myDatabase->Table_File_Attribute->Commit();

// Then, add the Year Attribute->
pRow_Attribute = myDatabase->Table_Attribute->AddRow();
pRow_Attribute->FK_AttributeType_set(ATTRIBUTETYPE_year_CONST);
pRow_Attribute->FK_GameSystem_set(GAMESYSTEM_MAME_CONST);
pRow_Attribute->Name_set(m_sGameData["year"]);
myDatabase->Table_Attribute->Commit();

// Then, add the Year Attribute to the file->
pRow_File_Attribute = myDatabase->Table_File_Attribute->AddRow();
pRow_File_Attribute->FK_File_set(pRow_File->PK_File_get());
pRow_File_Attribute->FK_Attribute_set(pRow_Attribute->PK_Attribute_get());
myDatabase->Table_File_Attribute->Commit();

// Then, add the Manufacturer Attribute->
pRow_Attribute = myDatabase->Table_Attribute->AddRow();
pRow_Attribute->FK_AttributeType_set(ATTRIBUTETYPE_manufacturer_CONST);
pRow_Attribute->FK_GameSystem_set(GAMESYSTEM_MAME_CONST);
pRow_Attribute->Name_set(m_sGameData["manufacturer"]);
myDatabase->Table_Attribute->Commit();

// Then, add the Manufacturer Attribute to the file->
pRow_File_Attribute = myDatabase->Table_File_Attribute->AddRow();
pRow_File_Attribute->FK_File_set(pRow_File->PK_File_get());
pRow_File_Attribute->FK_Attribute_set(pRow_Attribute->PK_Attribute_get());
myDatabase->Table_File_Attribute->Commit();

// Then, add the Genre Attribute->
pRow_Attribute = myDatabase->Table_Attribute->AddRow();
pRow_Attribute->FK_AttributeType_set(ATTRIBUTETYPE_genre_CONST);
pRow_Attribute->FK_GameSystem_set(GAMESYSTEM_MAME_CONST);
pRow_Attribute->Name_set(m_sGameData["genre"]);
myDatabase->Table_Attribute->Commit();

// Then, add the Genre Attribute to the file->
pRow_File_Attribute = myDatabase->Table_File_Attribute->AddRow();
pRow_File_Attribute->FK_File_set(pRow_File->PK_File_get());
pRow_File_Attribute->FK_Attribute_set(pRow_Attribute->PK_Attribute_get());
myDatabase->File_Attribute->Commit();

// delete(pRow_File);
// delete(pRow_Attribute);
// delete(pRow_File_Attribute);

return true;

}

int main(int argc, char* argv[])
{

vector<string> v_sGameList;
map<string,string> m_sGameData;

cout << "lmce_game_bootstrap 0.1" << endl;
cout << endl << endl;

Database_lmce_game *myDatabase;
    myDatabase = new Database_lmce_game(LoggerWrapper::GetInstance());

myDatabase->Connect("localhost","root","","lmce_game",3306);

if (!get_game_list(v_sGameList)) {
cout << "Unable to retrieve game list." << endl;
return 1;
}

// Main Loop
for (unsigned int i=0; i<v_sGameList.size(); ++i)
{
if (!get_metadata_for(v_sGameList[i],m_sGameData))
{
cout << "Unable to get game data for: " << v_sGameList[i] << endl;
}
else
{
if (!add_to_database(m_sGameData,myDatabase))
{
cout << "Unable to add game data for: " << v_sGameList[i] << " to database." << endl;
}
else
{
cout << "Added " << v_sGameList[i] << " to database." << endl;
}
}
}

cout << "Complete." << endl;

}

.h
Code: [Select]
//
// lmce_game_bootstrap.h - basic quick little utility I wrote to bootstrap the game database.
//

#include <string>
#include <map>
#include <vector>
#include <iostream>

#include "lmce_game/Database_lmce_game.h" 
#include "lmce_game/Define_AttributeType.h"
#include "lmce_game/Define_File_Attribute.h"
#include "lmce_game/TableRow.h"
#include "lmce_game/Table_AttributeType.h" 
#include "lmce_game/Table_File_Attribute.h"
#include "lmce_game/Define_Attribute.h"   
#include "lmce_game/Define_File.h"
#include "lmce_game/Define_GameSystem.h"     
#include "lmce_game/Table_Attribute.h" 
#include "lmce_game/Table_File.h"           
#include "lmce_game/Table_GameSystem.h"

#include "PlutoUtils/ProcessUtils.h"
#include "PlutoUtils/StringUtils.h"
#include "PlutoUtils/DBHelper.h"
#include "DCE/Logger.h"

bool get_game_list(vector<string> &v_sOutput);
bool get_metadata_for(string sGameName, map <string,string> &m_sGameData);
bool add_to_database(map<string,string> m_sGameData, class Database_lmce_game *myDatabase);
int main(int argc, char* argv[]);

and I get the following compiler output:
Code: [Select]
Computing dependencies for Main.cpp done
g++ -c -I.. -I../DCE -I/usr/include/mysql -DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I/opt/libxine1-pluto/include -I/opt/linphone-1.3.5/include  -Wall -fPIC -ggdb3  Main.cpp -o Main.o
Main.cpp: In function ‘bool add_to_database(std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, Database_lmce_game*)’:
Main.cpp:68: error: ‘class Database_lmce_game’ has no member named ‘Table_File’
Main.cpp:71: error: ‘class Database_lmce_game’ has no member named ‘Table_File’
Main.cpp:74: error: ‘class Database_lmce_game’ has no member named ‘Table_Attribute’
Main.cpp:78: error: ‘class Database_lmce_game’ has no member named ‘Table_Attribute’
Main.cpp:84: error: ‘class Database_lmce_game’ has no member named ‘Table_File_Attribute’
Main.cpp:87: error: ‘class Database_lmce_game’ has no member named ‘Table_Attribute’
Main.cpp:91: error: ‘class Database_lmce_game’ has no member named ‘Table_Attribute’
Main.cpp:94: error: ‘class Database_lmce_game’ has no member named ‘Table_File_Attribute’
Main.cpp:97: error: ‘class Database_lmce_game’ has no member named ‘Table_File_Attribute’
Main.cpp:100: error: ‘class Database_lmce_game’ has no member named ‘Table_Attribute’
Main.cpp:104: error: ‘class Database_lmce_game’ has no member named ‘Table_Attribute’
Main.cpp:107: error: ‘class Database_lmce_game’ has no member named ‘Table_File_Attribute’
Main.cpp:110: error: ‘class Database_lmce_game’ has no member named ‘Table_File_Attribute’
Main.cpp:113: error: ‘class Database_lmce_game’ has no member named ‘Table_Attribute’
Main.cpp:117: error: ‘class Database_lmce_game’ has no member named ‘Table_Attribute’
Main.cpp:120: error: ‘class Database_lmce_game’ has no member named ‘Table_File_Attribute’
Main.cpp:123: error: ‘class Database_lmce_game’ has no member named ‘File_Attribute’
make: *** [Main.o] Error 1

I am losing my mind..because I SEE THE FREAKIN MEMBERS IN THERE, BUT #@)$#@)$#@)$@#) WTH?!

:(

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Zaerc on March 16, 2008, 07:20:47 pm
Just for the people that might run into this as well (we've already sorted this in the chatroom).

Turned out that the "Table_File", "Table_Attribute" and "Table_File_Attribute" members are all defined as private, the accessor functions "File_get()", "Attribute_get()" and "File_Attribute_get()" had to be used instead.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 24, 2008, 01:24:51 am
Okay, a status update...

I finally have the Media Sort/Type/Filter/Genre bits working correctly. It took me four weeks to find the culprit...

Even though you can have your pluto_media information set up correctly telling which attributes to search/sort by, and made sure they are all mapped, the File Browser will not provide a working set of buttons below, or on the Options screen in UI1 UNLESS you modify OrbiterGen to state that this media type is searchable, the offending line is line 1596 of OrbiterGen.cpp

Code: [Select]
int iPK_MediaType_Searchable[] = {MEDIATYPE_pluto_StoredAudio_CONST,MEDIATYPE_pluto_StoredVideo_CONST,MEDIATYPE_pluto_Pictures_CONST,MEDIATYPE_np_Game_CONST,MEDIATYPE_misc_DocViewer_CONST,MEDIATYPE_misc_Playlist_CONST,MEDIATYPE_pluto_Game_CONST};

This needs to be filled with a value from Define_Mediatype.h from pluto_main ... and this code needs to be changed to populate the orbiter grids for all the media types that have DCE devices on the other end.. bmac2 seems to think the DCEAware column may help here... maybe...

Point being now, that this is one more notch down and the plugin is ready for alpha release.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 30, 2008, 10:12:19 pm
Lots of little things... am currently trying to however try and figure out how to get the orbiter to re-order the windows on screen after a Jump Position in Playlist command.

Currently the Media Plugin does the right thing, and re-spawns mame..however it seems apparent that Orbiter isn't designed for a situation where a window may disappear from the window ordering outside of orbiter's control (when a window appears and then disappears...)

when I click the orbiter to get a menu, and click back, the orbiter promptly reparents the window and resizes appropriately..so I am trying to find a way to trigger that action....

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on March 31, 2008, 08:48:44 am
I have implemented the first bits of a proof of concept for a second system.. Atari 800/5200.

I have made a video demonstrating it, playing both Ballblazer and Star Raiders (For you, Matthew...)

http://www.youtube.com/watch?v=Xx25HgCQt_U (http://www.youtube.com/watch?v=Xx25HgCQt_U)

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: Matthew on March 31, 2008, 08:14:04 pm
I have implemented the first bits of a proof of concept for a second system.. Atari 800/5200.

I have made a video demonstrating it, playing both Ballblazer and Star Raiders (For you, Matthew...)

http://www.youtube.com/watch?v=Xx25HgCQt_U (http://www.youtube.com/watch?v=Xx25HgCQt_U)

Thanks for the shout-out :). I might just get my old Atari joystick out of storage for Star Raiders, now that I can rip it in half in front of a 50" screen and 5.1 surround! I'll let y'all know when I've got an Orbiter running on an Atari 800...
Title: Re: MAME Plugin Progress Thread
Post by: skatingn330 on April 05, 2008, 05:59:06 pm
I use the wireless xbox 360 controller for all my roms i play on my windows box, are we going to be able to use this controller?? is there a linux driver or something?

http://www.bestbuy.com/site/olspage.jsp?skuId=8221471&st=xbox+360+controller&type=product&id=1166839533325 (http://www.bestbuy.com/site/olspage.jsp?skuId=8221471&st=xbox+360+controller&type=product&id=1166839533325)

Its great, you can have up to 4 controllers with one recevier, just like the xbox360.
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on April 05, 2008, 07:11:22 pm
don't have one, so i don't even know if it's physically interfaceable.

-THom
Title: Re: MAME Plugin Progress Thread
Post by: bmac2 on May 06, 2008, 10:58:30 pm
http://wiki.linuxmce.org/index.php/Mame_installation

there is the directions of how to install the mame system on lmce.  Still a test thing, but works great.  Please test and let me know of any issues with the install or TSCHAK with any problems.

bmac2
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on May 16, 2008, 08:26:15 am
As some of you may have seen, bmac2 and I worked together (with posde editing), to produce a set of installation instructions for the bold to install my MAME media type on the 0710 release.

The UI for the 0710 is not complete, the 0710 sqlcvs database does not have the designer changes I have been documenting in my screencasts over the last few weeks. But now that the UI work is relatively complete, I will be downloading an Autobuild from our build server, so that the UI changes I have been making can be fully tested. I will also build a copy of the nokia orbiter to test from my pad as well.

I am a bit nervous about doing this, because I know Pluto is working on a number of changes to the system to support both embedded operation, as well as skin modificaitons etc in designer for NuForce stuff....so I don't know how the stability of my system will be affected, but we'll see...

But hopefully, with everything working, I can test the UI together with the plugin completely for the first time, iron out any designer bugs, and then work on the final bits of features that I want for the 0806 release:

* Bookmarks
* stable moving of games from one MD to another
* cleaning up the database, making the metadata more presentable
* investigating what will need to really be done to support multiple emulator types.

I know I haven't written in a while, but I've been busy, mostly dealing with trying to come to grips with getting things like the package server set up, so that I can make test packages of mame stuff before release, and trying to get all the HADesigner stuff squared away (and dealing with sqlcvs in the middle of it all)

but i wanted everyone to know, that it's all proceeding quite nicely...and if you haven't seen them, go look at the HADesigner screencasts! they are a wonderful insight into creating a new UI for Orbiter:
http://forum.linuxmce.org/index.php?topic=5059.0

Ciao for now,
-Thom
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on July 28, 2008, 01:36:28 am
An Update...

After a bit of work, I have the first implementation of Bookmarks working.

What does this mean?

The bookmarks functionality present in both audio and video has now been extended to Games. This means that you can save your place in a game, and come back to it later.

I have a demonstration video of it, here:

http://www.localeconcept.com/private/bookmarks.ogg

The implementation is still very buggy, but I have proven that it can be done. Please note, that not all games under MAME support proper state saving/loading, and a lot of games will crash. Which ones? typically the games that have been in the MAME code-base longer will have a much higher chance of properly saving their state.

As soon as I fix a few XSendEvent issues, I will be uploading the code to the charon-merge SVN.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: hari on July 28, 2008, 05:03:02 pm
*deep breath*

GUY YOU ROCK :-)

best regards,
Hari
Title: Re: MAME Plugin Progress Thread
Post by: cirion on July 29, 2008, 10:06:46 am
I use the wireless xbox 360 controller for all my roms i play on my windows box, are we going to be able to use this controller?? is there a linux driver or something?

http://www.bestbuy.com/site/olspage.jsp?skuId=8221471&st=xbox+360+controller&type=product&id=1166839533325 (http://www.bestbuy.com/site/olspage.jsp?skuId=8221471&st=xbox+360+controller&type=product&id=1166839533325)

Its great, you can have up to 4 controllers with one recevier, just like the xbox360.

Yes there is a driver for linux :)
http://pingus.seul.org/~grumbel/xboxdrv/
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on July 29, 2008, 04:29:47 pm
can you please build a template for it? we have a joystick category now.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: colinjones on July 30, 2008, 08:29:53 am
Do any joysticks or gamepads currently work with LMCE? Aren't they just HID and so Linux will understand them (unless there is something very specific to one)?

Thom - in this case, if the interface already works, what does the template/device give us extra? Is it just so LMCE understands it exists, and perhaps how to use it in one room to control something in another? Wouldn't there have to be some code behind it, rather than just a device template? Just trying to understand how this all hangs together :)
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on July 30, 2008, 05:09:04 pm
for certain joysticks, the device template can be used to provide a ctrlr file for mame, or other emulators to do joystick mappings. This is critical to the plug and play aspect of the system.

I had to make one for my X-Arcade Tank-stick, because it is insanely custom (it appears as an HID keyboard, and requires a custom controller file to work with MAME).

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: colinjones on July 31, 2008, 12:10:30 am
Thom - does that mean you had to write some code to turn it into a DCE device as well? Doesn't everything that has a template also have to be a device and be able to connect to the router and send/receive commands, events etc? Is that how you do the mapping, though a DCE command to send the mapping data? What device to you send it to?
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on July 31, 2008, 01:08:13 am
no, if the device does not have implements dce checked, it is assumed to not be a dce device.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: colinjones on July 31, 2008, 01:40:12 am
ahhh.... hmm.... so how does LMCE use the data in the template? I presume it must be another device that uses it - is that the Orbiter device, and then that pipes the "mapped" commands to whatever device you are controlling at the time (in this case your MAME plugin device) or does the device itself have to take responsibility to grab the template data, and access the incoming HID data stream, translate and use it?
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on July 31, 2008, 01:44:18 am
my mame_player device merely looks at the device, grabs its device data, and reconstitutes it into a controller file to use with mame.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: colinjones on July 31, 2008, 01:50:37 am
so in this instance the template isn't actually an "active" component in LMCE, its more a convenient and standard "parking" place to hold the controller's mapping data. The active bit is in other devices that want to use this data, actively looking for the template, grabbing the data then using it however they want?
Title: Re: MAME Plugin Progress Thread
Post by: tschak909 on July 31, 2008, 02:07:35 am
correct. look at the mcr remote dongle and the go mouse 1005 dongle..same thing.

-Thom
Title: Re: MAME Plugin Progress Thread
Post by: colinjones on July 31, 2008, 02:26:06 am
ahhh, the light shines! Sorry for all the questions, desparately trying to understand the architecture of LMCE, learn C++ and Linux so I can actually start contributing rather than leaching :)