Main > Software Forum

Programming Frontend in Visual Basic -examples?

(1/4) > >>

Carsten Carlos:
Hi!

As my cabinet will feature a motor-rotated monitor, I'd like to happen this automatically whenever I choose a game with different orientation.
Is there some sourcecode written in VisualBasic out there, that I may have a look at, or some homepage that explains a bit which parameters and structures MAME uses, or does a frontend like this also exists?

I also wonder which could be the easiest and most compatibility-solution when using Win98 /W2K or XP to get the trigger-signals for the motor out of my PC. So far I guess I should use the printerport, or am I wrong?

Manx thanx in advance!

Howard_Casto:
Well first off, no there's not such a fe out there.  That's a very specialized feature though, so that figures.

Secondly, forget about using xp/2000 unless you know how to write device drivers.  Xp/2000 have a strangle hold on all your computer's interface ports and won't allow you to send signals without an actual device and drivers for said device being present.

There ae several 9X solutions around though.....  just search google for vb+parallel+interface and you should get some examples.

Good luck

Carsten Carlos:

--- Quote ---Secondly, forget about using xp/2000 unless you know how to write device drivers.
--- End quote ---

That what I've feared ::) For now I'm using Win98 anyway, but I'd like to have a a solution that lasts a bit longer, or, so to say, is compatible at least with the next 3 years OS.

Mike:
Your best bet is to go into the mame source and add the trigger there that would probably be the easiest. Just find where it reads in that it's a vertical monitor and then where it tells it that it's vertical then have it send a command out to your serial port. Serial ports I think are usually the easiest to work with. Thats just my opinion.

Frobozz:
No no no.... VERY easy with Visual Basic...

First, get FMAME32.  This version of MAME announces what game it's running when you start it for use with things like LED marquees.  It does this by Captioning the window with the romset name.

Write a Visual Basic program to scan all windows open on desktop and if it finds one labled "MAME: Game Name [romesetname]"  parse that info.  (Very easy to do, all windows opened are part of a collection.  Can be a 4 line For Each... loop.

check [romesetname] vs. a list of all vertical games.

If it matches, check if the monitor is already vertical.  This you can control in the program.  You don't need it to actually "check" to see if it's there or not.  Just as long as the program keeps track, you're alright.  Heck, you could save the last setting to disk so it remembers on next bootup.  A manual way to synchronize it would be highly recommended.

If the game matches one on the list, and the monitor is hoz, trigger.
If the game isn't on the list, and the monitor is vert, trigger.
All else, don't trigger.

Trigger is simple, there are about 10,000 Active X *.OCX files on the internet for simple Parallel port control via Visual Basic.  Get one.  They should be compatible with ALL versions of Windows.  Just drop it into your VB form, and send it the command you want.  It's a peice of cake.

You could even trigger it on a TCP/IP request with 3 lines of code and the WINSOCK.OCX if you wanted to...

Hell, have it scan every 3 seconds for a windows change.  If you close the game, make it turn back to horizontal so you can use FMame.  The only problem is constant degaussing though, unless you rig the degaussing circuit into the flip control (tricky to do, are you good with electronics?  I'm not :)  )

Test it with a LED or something before you hook it into your motor control.

This is all assuming your motor control circuit can be changed like flipping a light switch.

It's something I've been considering too, but havn't really looked into since I'm really good with VB and the project sounded very simple.  

Navigation

[0] Message Index

[#] Next page

Go to full version