Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: ActiveX component of Mame  (Read 1901 times)

0 Members and 1 Guest are viewing this topic.

PedroSilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 373
  • Last login:August 01, 2018, 08:37:57 am
  • Grettings !
ActiveX component of Mame
« on: April 30, 2004, 06:14:20 pm »
Hi,

Just finished my Java Course at Sun Microsystems.
Whene I saw the potencial of the language, on thing came to mind immediatly: That could make a great frontend for Mame.

Started asking some questions to the monitor and he said that it could be done:

- Having the game running on a window instead of a steady image, but we would need the component used by Mame.

Does anyone knows wich or what activeX component does Mame uses to graphicaly comunicate with Windows ?

Thanks and if anybody tried this before, love to ear about you experiences on the subject.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Yesterday at 08:25:56 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:ActiveX component of Mame
« Reply #1 on: April 30, 2004, 10:01:59 pm »
hehe I can tell you are new to programming.  Mame is cross-platform, which means it doesn't contain any active x controls.  

Besides you are looking at the issue completely wrong....  


All you have to do to make mame appear in a box in your fe is to use the "setwindowpos" and "setwindowstyleex"  api calls to remove mame's border, size the window to your box and plop it on top of the zorder.  

But what is the point exactly?  You could see the attract mode, but videos are available for that.  Interacting with the window would be silly as it'd have to be killed and then mame re-launched to play the game (because the resolution would have to be changed, ect upon entering fullscreen).  Also it would slow down your fe to a crawl because many newer games can take a LOT of memory to run, not to mention some have boot times of over 5 minutes!  

Long story short, eyecandy isn't always practical.  Make sure something will work no matter how "cool" it'd be. ;)

PedroSilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 373
  • Last login:August 01, 2018, 08:37:57 am
  • Grettings !
Re:ActiveX component of Mame
« Reply #2 on: May 01, 2004, 03:47:19 pm »
Well ... actually ... I've been programming for more than 12 years ...  ;D
It's indeed true that I've never programmed for Windows or DOS ... only in C (the pure one  :D ) on Unix systems  (mainly Solaris) with a Videotex interface (French stuff) ... and thats the reason why I really know very little about Windows graphical appearence ... the main part of my programming is the business core (banking) but I've looked a bit on Mame's code and it uses DirectDraw and Direct3d wich I believe are activeX components ... anyway the idea (if it works) is not to use mame (as is) for launchng games ... I agree with you it shouldn't be very performant ... the main idea was to make it work with java and the create a kinda mini version of Mame just for showing the demo ... just the video part ... no sound .. no inputs ...

The reason I asked was because the java expert guy to whom I asked said it would be necessary to have the library that implements Mame graphicaly on Windows ...

There are already some stuff made on java that can open a window for showing, for instance, the windows media player  ... it's emulating windows inside a java application ...

What do you think ?
 :)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Yesterday at 08:25:56 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:ActiveX component of Mame
« Reply #3 on: May 01, 2004, 06:08:08 pm »
if you want me to be honest....

I think it's a dumb idea, for the reasons I've already mentioned.

You can get video from... well videos... there are over 300 attract mode videos and the number is growing.  Why waste computer resources running mame?  Besides, if you've ever looked at the mame source code you'd realize that it's quite impossible to only run the video.  You have to emulate the entire system to display the video properly, so your idea flat out won't work.  The only way to get video from mame is to run mame; enough said.  


Windows programing and programming for other platforms are worlds apart.  ActiveX is a web (and optionally vb) only type of plugin.  What I find funny is that you don't know this... it's basically window's version of java script.  ;)  DirectX is part of the windows core.  You call it via the api, not plugins.  

To be honest, java is a bad choice for a programmer that has never programmed for windows.  Out of all the languages, it's the most unfriendly in terms of communicating with the windows core and other functions which are absolutely necessary for even the simplest of front ends.  

I'm not saying it can't be done, because it can and it has.... it's just that you have to really know java and really know the "windows version" of java to make a decent fe.  

 

PedroSilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 373
  • Last login:August 01, 2018, 08:37:57 am
  • Grettings !
Re:ActiveX component of Mame
« Reply #4 on: May 01, 2004, 07:08:45 pm »

... well ... java is not an option to me ...  ;D the top managemet decided to implement our application on a web based interface and java is not an option ... it's an obligation ...  ;D ... just tought I might have some fun with it ... since I'll have to learn it anyway ... whether I like it or not ...  :D

Thanks anyway for sharing your experience ...

nipsmg

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1753
  • Last login:July 11, 2025, 12:17:29 pm
  • ROONEY!! ERRGH!!
    • Arcadia
Re:ActiveX component of Mame
« Reply #5 on: May 03, 2004, 11:54:45 am »
You could also use SetParent to make it a child of your FE. It should then react correctly to any minimize/maximize actions on the parent. It does make VERY little sense tho.  

Your best bet would probably be to launch it from your app using the windows API and grab the hinstance and go from there.  The windows version does use directX to draw the video functions, but the other ports do not.  And I'd STRONGLY ADVISE AGAINST programming ANYTHING in Java for Windows that you expect to run fast and react in a timely manner to user input.  Especially w/ Sun selling out to MS lately, and not requiring MS to include a JVM in windows, it's kind of pointless to write java UIs in windows, unfortunately.

Take a look at C#, it's like a mix between C & Java & vb, it's pretty powerful and has a relatively low learning curve if you know java and/or C++.

If you want to play around and try it, go ahead, but it doesn't make much sense to me.  You'd be cranking the processor (depending on the game you'd be displaying in the FE..  Anything like CPS2 or the higher Neo Geo carts would make your FE Crawl...)  where you could just display a video of the attract mode.

--NipsMG

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:ActiveX component of Mame
« Reply #6 on: May 03, 2004, 02:45:06 pm »
JFront http://home.cinci.rr.com/drakewoodring/jfront.htm is a java based front end which is open source.

it has most of the options in most of the other frontends around these days.

I have almost completely rewritten the code twice since whats up there (one which is uses gl4java a opengl wrapper for java, and a new one with a bunch of new features... hopefully to be out soon).

Anyway... Forget about the speed issue above (I have had others say that mine is faster then most of the other high end / skinnable frontends out there).  

forget about C#.  It doesn't have a real market in real terms.  Its Java without the crossplatform aspect... Which is why people use java.

but remember... Java is a programming LANGUAGE.... not an web APPLET microlanguage...  

So yes... MS's Java VM sucks... but don't expect people to use it...  But you wont want people to run it in the browser anyway...

Launching apps... there are some issues... Give me a PM if you would like any advice... Or take a look at my source... I have an object which wraps most of the problems and hide it from the rest of the application.

As for controlling the window... I considered making a mame version which was a ActiveX component.  I still think it would be cool.  But no time...   If you find someone who is a windows expert, get them to do it and I will use it in a second!


PedroSilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 373
  • Last login:August 01, 2018, 08:37:57 am
  • Grettings !
Re:ActiveX component of Mame
« Reply #7 on: May 04, 2004, 07:06:31 am »
Thank you all ...

Plenty of material to go on ...  ;D

nipsmg

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1753
  • Last login:July 11, 2025, 12:17:29 pm
  • ROONEY!! ERRGH!!
    • Arcadia
Re:ActiveX component of Mame
« Reply #8 on: May 04, 2004, 09:30:01 am »
I probably should have rephrased:

Don't plan on speed using standard java UI components.

I'm not saying you can't write good/fast code in ANY language.. But almost every prorgam I've seen that uses standard java UI components in windows is SLOW :(

And C# is a perfectly viable programming language if you're planning on developing a WINDOWS application.  Granted I wouldn't use it as i'm now in Mandrake 10, but C# is good for people trying to write decently fast windows code and has a low learning curve, as well as the ability to easily use DirectX and windows managed functions to handle things that are normally done through somewhat complicated API Calls.

Didn't mean to directly insult java developers, however-- probably should have worded that differently.

--NipsMG