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: Suggestions?  (Read 4053 times)

0 Members and 1 Guest are viewing this topic.

Polecat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:May 25, 2005, 01:32:57 pm
  • I'm not the Llama!
    • The Clark Zoo
Suggestions?
« on: December 17, 2002, 02:09:11 pm »
In the frontends that people write, what are the emulators of choice?  For example, to people prefer driving MAME instead of MAME32?

I asking this mainly because I've run into issues where certain command options causes MAME32 to never get to the emulation; it simply exits out and I have no idea what option(s) it didn't like.  Is there a way to see what MAME32 had a cow about?

My frontend (a simple full screen that displays the game name, marquee, and whether it supports the cocktail formfactor) that responds to the joystick and the game start/fire buttons on the control panel.

The configuration data (image name, name, artwork path, options, etc) is contained in XML file that is loaded at run time.

If people are interested in have a copy of the code, I'm more than willing to share it.  It's written in Visual C#.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Suggestions?
« Reply #1 on: December 17, 2002, 03:35:10 pm »
First off don't confuse us.  There is mame (the standard command line windows version) , dmame (the dos port) and mame 32 (the guied version.)

I can tell you ahead of time that we ALL expect you to use mame.  Mame 32 has a gui and thus doesn't take command line arguments properly.  Although many of the front-ends around will run mame 32, they won't run it as well as they would mame.  If mame 32 gets an error of any kind when launching it via the command line, it simply exits.  When you get an error in mame as of the latest version it will try to proceed if the error is recoverable, but generally it exits as well.  These are errors exclusive to mame and in general (not always) have absolutely nothing to do with the front-end itself.  Of course I am really having to generalize here as you haven't given any specific examples.  

Also it's very generous to share your code with us but as of now I don't know of anyone who programs a fe in c#.  

The reason behind this is not only the newness and expense of the .net suite, but the fact that graphically, the standard for .net is far worse than visual studio 6 unless you use directx or open gl to run the gui.  That's not to frown upon your work, I'm just warning you that if you want to expand upon your fe easily you might have trouble unless you can program in directx.  

But with that being said, please sign up at fe.donkeyfly.com and submit your snippet there.  It's specifially for this sort of thing and we always appreciate any help and suggestions anyone might have. :)

Polecat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:May 25, 2005, 01:32:57 pm
  • I'm not the Llama!
    • The Clark Zoo
Re:Suggestions?
« Reply #2 on: December 17, 2002, 04:50:04 pm »
Quote
First off don't confuse us.  There is mame (the standard command line windows version) , dmame (the dos port) and mame 32 (the guied version.)

Okay, that clears up that bit of confusion.  

Quote
These are errors exclusive to mame and in general (not always) have absolutely nothing to do with the front-end itself.  Of course I am really having to generalize here as you haven't given any specific examples.

Oh yeah, I'm well aware of that.  Long before I wrote the first line of code I began tinkering with it from the command line and found those problems.

Quote
Also it's very generous to share your code with us but as of now I don't know of anyone who programs a fe in c#.

The reason behind this is not only the newness and expense of the .net suite, but the fact that graphically, the standard for .net is far worse than visual studio 6 unless you use directx or open gl to run the gui.  That's not to frown upon your work, I'm just warning you that if you want to expand upon your fe easily you might have trouble unless you can program in directx.

The money thing I can understand, but I'm not with you there on the graphics end it of things.  So far, in my work with the .Net Frameworks, I've found that graphics manipulation has been far easier in .Net than in VB6 (and I've done a lot of VB in the past).  One graphics task (image resizing) that tooks 30 lines of code (both native VB6 and Win32 api calls) took me 3 with the frameworks.  Never mind the fact of what I'm doing right now could easily be in VB6 as well, so it's not anything fancy. :D

Quote
But with that being said, please sign up at fe.donkeyfly.com and submit your snippet there.  It's specifially for this sort of thing and we always appreciate any help and suggestions anyone might have. :)

Thanks.  Already did that when you mentioned it in an earlier post.  And thanks for pointing me in the right direction with MAME.  For some reason I was thinking straight MAME was 16bit...

Don't mind me, I'll go back to my cave now. :)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Suggestions?
« Reply #3 on: December 17, 2002, 07:39:49 pm »
The money thing I can understand, but I'm not with you there on the graphics end it of things.  So far, in my work with the .Net Frameworks, I've found that graphics manipulation has been far easier in .Net than in VB6 (and I've done a lot of VB in the past).  One graphics task (image resizing) that tooks 30 lines of code (both native VB6 and Win32 api calls) took me 3 with the frameworks.  Never mind the fact of what I'm doing right now could easily be in VB6 as well, so it's not anything fancy. :D

Well it's two steps forwards, and three steps back... they gave us nice features like the ability to display animated gifs and png files but they took away the crowning glory of vb6, namely controls with transparent backs.  What does that mean?  Well even though there is a "transparent" color you can assign, all it does is merely paint that portion of the backgroudn image to the back of the control.  In other words you can't do layering, so if i want to put a layer over top of a picture box i can do so, but if i make the back "transparent" it will not show the picture box behind it, but the background image of the form.  It doesn't seem like a big deal, but when you gradguate to complicated skins it's a HUGE deal.  Also they took away auto redraw in leu of making everything a persistant bitmap.  This would be fine except that you can't turn it of and on at will, which causes graphical glitches with some things.  Try making a picture box, put an animated gif in the box, put a background image down on the form, make the picture box "transparent" and make the box move slowly across the form.  You'll see what I mean.  

I'm really disapponted in the .net framework because they made so many nice features but yet they still managed to ship it with a set of useless controls.  Now they are just useless for other reasons is all. :(  If anyone knows of a .net solution to these problems please let me know.  I would like to port lazarus to vb.net but the .net control sets are just unacceptable the way Lazarus is designed right now.  

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 11:34:22 pm
  • The Bears Still Suck!
Re:Suggestions?
« Reply #4 on: December 17, 2002, 08:19:09 pm »
Also it's very generous to share your code with us but as of now I don't know of anyone who programs a fe in c#.  

I DO I DO!!  But not for FEs.  Visual C++ mame has been ported to .net now.  I use to use that port of mame because VC++ is SOOOOO much easier to debug than commandline c++ compilers.  But with some of the new features and extras I ended up putting into mame it because a chore to get them to work in vc++.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Suggestions?
« Reply #5 on: December 17, 2002, 11:15:48 pm »
C # man, not C++  there are some subtle differences ;)

Polecat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:May 25, 2005, 01:32:57 pm
  • I'm not the Llama!
    • The Clark Zoo
Re:Suggestions?
« Reply #6 on: December 19, 2002, 02:06:34 am »
Quote
Well it's two steps forwards, and three steps back... they gave us nice features like the ability to display animated gifs and png files but they took away the crowning glory of vb6, namely controls with transparent backs.  What does that mean?  Well even though there is a "transparent" color you can assign, all it does is merely paint that portion of the backgroudn image to the back of the control.  In other words you can't do layering, so if i want to put a layer over top of a picture box i can do so, but if i make the back "transparent" it will not show the picture box behind it, but the background image of the form.  It doesn't seem like a big deal, but when you gradguate to complicated skins it's a HUGE deal.  Also they took away auto redraw in leu of making everything a persistant bitmap.  This would be fine except that you can't turn it of and on at will, which causes graphical glitches with some things.  Try making a picture box, put an animated gif in the box, put a background image down on the form, make the picture box "transparent" and make the box move slowly across the form.  You'll see what I mean.  

Let me make sure I'm understanding what you're going for.  Which controls are you referring to?  Never having utilized transparent backgrounds before, I'm not sure which ones they are.  None the less, I couldn't get the picture box to have a transparent window.  However, subclassing the control to get a transparent window shouldn't be that hard, although I'm sure this could be done.

AutoRedraw?  If my understanding of it is correct, it's simply a response to a change event handled by the form engine in VB.  Why did it go away?  I don't know.  Probably because it was not a common feature in the other languages being written to the CLR.  That's just a guess, though.  However, that's not to say you can't achieve the same effects.  Off the top of my head, it would probably go something like this...

When you change something (say moving a graphic across the page), you fire a custom event.  By creating your own control classes that inherit from the base controls, you impliment them so they listen for that event.  When they hear, they call their own repaint event.  You could even make the algorithm smart enough to only repaint when the object in question is only in its air space.

Keep in mind, I haven't tried coding this, so it's only theory and very generalized. :)

I'll ask about the transparent control thing at work.  There's a couple of really smart .net devs on my team that might know.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Suggestions?
« Reply #7 on: December 19, 2002, 03:29:45 am »
hehe

Then obviously you haven't ever tried to code any graphic intensive programs using vc++ or vb with only the stock controls and some gdi calls.  

Transparent backstyles were introduced to controls I believe with vs4 or 5, were finally starting to be perfected in vs6 and for some stupid reason they dropped them in vs.net.  

In .net they don't exist at all, but you can make hte backcolor of any control to the webcolor "transparent" to fake it.

Also about the auto redraw property, it was almost exclusive to vb so that might be why you aren't familiar with it.  You CAN do it with straight code but it takes several pages of code to do it properly.  So why in the world did they remove it from vb .net?  

Also as far as I know the way .net is structured you can't make controls back's transparent via gdi or api calls.  You see once again they made a huge blunder by setting up .net so that only one hwnd on the form can take advantage of the .net framework's built in translucency/transparent regions functions.  If you adjust the values of one thing it seems to override the others.  

I would really like any info you can get from the techies because I have coded in vs 6(primarily vb) for about 5-6 years now and M$ has removed virtually every useful control or function that i used.  When I go to msdn and look at the vs6 to .net comparison chart all of these functions have "no .net equivelent available" on the chart of corresponding functions and controls.  


Polecat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:May 25, 2005, 01:32:57 pm
  • I'm not the Llama!
    • The Clark Zoo
Re:Suggestions?
« Reply #8 on: December 19, 2002, 10:07:47 am »
Moving this to the FE dev forums...

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:Suggestions?
« Reply #9 on: December 19, 2002, 01:46:12 pm »
btw, I wrote mine almost in c#.  I wrote it in java

c# is really java with some slight syntax changes... and removal of almost every useful feature... but you can access dll's easier.

So if you want to take some of the speed issues with java, and make it windows only, and add the ability to create blue screens of death, and you want to pay for a development system... Sure, go C#.

Otherwise there are a bunch of other options.  

Polecat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:May 25, 2005, 01:32:57 pm
  • I'm not the Llama!
    • The Clark Zoo
Re:Suggestions?
« Reply #10 on: December 19, 2002, 02:32:33 pm »
btw, I wrote mine almost in c#.  I wrote it in java

c# is really java with some slight syntax changes... and removal of almost every useful feature... but you can access dll's easier.

So if you want to take some of the speed issues with java, and make it windows only, and add the ability to create blue screens of death, and you want to pay for a development system... Sure, go C#.

Otherwise there are a bunch of other options.  

Glad to see you're well informed, Lilwolf.  

Speed issues?   Stop and think about this, CLR/C# compiles to native code before executing; Java compiles on the fly.  You leverage that how you want to.

Windows only?  I'm sorry to hear that.  Yeah, Mono and Rotor (BSD and Linux implementations of the CLI and C#, see http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/MSDN-FILES/027/001/901/msdncompositedoc.xml) are out there.  

Create blue screens?  You can do that in java?  Cool.  You have to be able to write down to the hardware in order to cause a blue screen, at least in the world of the NT kernel.  Unless you're writing device level drivers, why are you writing directly to the hardware?  

Pay for a development system?  Hmm.  Last time I checked, I didn't have to pay for the Frameworks, which comes with the C# compiler, the VB.Net compiler, and the JScript.Net compiler.  You can download that at http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml.  In the end, you pay for the tool that makes your life easiest.  If I wanted to, I could write code in notepad and compile from the command line.  I don't want to do that, so I pay for an IDE, whether that's Visual Studio.Net, Primal Script, HomeSite, or TextPad Pro.  Take your pick.

I know I'm biased about my tools as no doubt you are as well.  Now, I love debate.  But if you're going to make broad statements with nothing to back them up, then don't waste my time.

Thanks.


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Suggestions?
« Reply #11 on: December 19, 2002, 07:50:50 pm »
Actually I agree with Lilwolf, I was just being nice.  But with that being said just as c# is a watered down version of java, java is a watered down version of c++, yes each of these langauages has it's benefits and weaknesses over the other but in general c++ is the only thing worth coding in if you wish to make a windoze application.  Keep in mind that I code in vb though, but I still have enough sense to know that if I wanted to make anything serious that I would have to switch to c++  

But I've been into this discussion before so I'm not going to get into it, I just wanted to give an unbiased opinon on two languages that I don't have any attachment to.   You guys have fun.  :)

For the record can't we just agree to disagree on this one?

Polecat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:May 25, 2005, 01:32:57 pm
  • I'm not the Llama!
    • The Clark Zoo
Re:Suggestions?
« Reply #12 on: December 24, 2002, 01:53:47 pm »
Quote
Actually I agree with Lilwolf, I was just being nice.  But with that being said just as c# is a watered down version of java, java is a watered down version of c++, yes each of these langauages has it's benefits and weaknesses over the other but in general c++ is the only thing worth coding in if you wish to make a windoze application.  Keep in mind that I code in vb though, but I still have enough sense to know that if I wanted to make anything serious that I would have to switch to c++

I don't know about being nice, but you were certainly being more rational about it. :)  

Any time you want the utmost performance, you're going to have to get as close to the metal as possible and that's C/C++.

Quote
But I've been into this discussion before so I'm not going to get into it, I just wanted to give an unbiased opinon on two languages that I don't have any attachment to.   You guys have fun.  :)

Hehe.  Thanks for the blessing. ;)

Quote
For the record can't we just agree to disagree on this one?

We can certainly disagree.  It's a lot more fun that way anyways.  8)

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 11:34:22 pm
  • The Bears Still Suck!
Re:Suggestions?
« Reply #13 on: December 24, 2002, 08:55:25 pm »
Speed issues?   Stop and think about this, CLR/C# compiles to native code before executing; Java compiles on the fly.  You leverage that how you want to.

(Disclaimer: This post is meant for educational purposes, not to start any fights)

I have to correct this statement, it's been driving me nuts.  Java does NOT compile on the fly.  It is NOT a scripting language.  Java does get compiled before you run the code.  It gets compiled into bytecode.  Which is an executable for the Java Virtual Machine.  Think of java like an emulator.  The Virtual Machine is being emulated on the native machine.  The .class file is the executable for that virtual machine.   The Virtual Machine is just that, a "ficticious" machine that Sun created that they create an "emulator" for existing machines.  Smalltalk does the same thing.  This isn't a new concept in the programming world.  Been around for along time.  Just java is MUCH faster virtual machine based language than any others that have existed.

But java code does get compiled to a .class file, which is a binary file that is ready to execute in the virtual machine.  So nno, it does not compile on the fly.  Scripting language like javascript (which is not related to java!!!), perl, and vbscript the code is interpreted (hence they use interpreters, not compilers) at runtime.

The sole purpose of java or any virtual machine based language is portability, being able to run on any machine without recompiling a seperate executable for each OS.If you plan on just making a windows version of something, java is not the best choice.  If you plan on making a mac, linux, os/2, windows, AIX, whatever version of an internet based software java is exactly what you want.

BTW, because the fact that java is VM based and C++ is compiled I would not say java is a watered down C++.  All java shares with C++ is some syntax, but that's it.  Making the syntax simular is a smart thing as C++ devs can pick up how to use java quickly.  Actually, alot of languages use very simular syntax.  Java does have ALOT better string handling capabilities than most other languages, so it definately isn't a watered down anything.  Perl and any language that uses regex is the ultimate for string handling, but oh wait, there is regex in java now but as third party :)  Perl's regex is just so freeking fast...
« Last Edit: December 24, 2002, 08:59:10 pm by SirPoonga »

Polecat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:May 25, 2005, 01:32:57 pm
  • I'm not the Llama!
    • The Clark Zoo
Re:Suggestions?
« Reply #14 on: December 24, 2002, 09:37:42 pm »
Thanks for the clarification on the Java execution.

Speaking of strings, the Frameworks has regular expressions built in. :)


SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 11:34:22 pm
  • The Bears Still Suck!
Re:Suggestions?
« Reply #15 on: December 25, 2002, 12:31:47 am »
Hehe, if you want the exact specifications of the java 1.1 VM (like how long the bytecodes are) I can give you that.  Hehe, I realize I know enough about java I could make my own java compiler,  dang it, I know too much!  :o

Dave Dribin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 152
  • Last login:May 26, 2007, 11:17:39 pm
  • ugh... yeah
    • Dave Dribin's Home Page
Re:Suggestions?
« Reply #16 on: December 25, 2002, 12:31:48 am »
Thanks for the clarification on the Java execution.

Java VM also does many run-time optimizations, including compilation down to native code, on the .class files.  Read up on the HotSpot virtual machine for all the goodies:

http://java.sun.com/products/hotspot/
Quote
Speaking of strings, the Frameworks has regular expressions built in. :)

For the record, Java has had regexp built in since 1.4.0:

http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/package-summary.html

-Dave

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 11:34:22 pm
  • The Bears Still Suck!
Re:Suggestions?
« Reply #17 on: December 25, 2002, 12:33:15 am »
For the record, Java has had regexp built in since 1.4.0:
I haven't done much with 1.4 as the industry is still at 1.3.  I didn;t realize that was there.