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: Programming Frontend in Visual Basic -examples?  (Read 4992 times)

0 Members and 1 Guest are viewing this topic.

Carsten Carlos

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 579
  • Last login:June 28, 2014, 05:06:25 am
  • Projects: Centipede extended, Asteroids
    • Carlos' Centipede-extended
Programming Frontend in Visual Basic -examples?
« on: May 11, 2002, 07:50:02 am »
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!
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »



Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Programming Frontend in Visual Basic -examples
« Reply #1 on: May 11, 2002, 02:58:47 pm »
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
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Carsten Carlos

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 579
  • Last login:June 28, 2014, 05:06:25 am
  • Projects: Centipede extended, Asteroids
    • Carlos' Centipede-extended
Re: Programming Frontend in Visual Basic -examples
« Reply #2 on: May 11, 2002, 05:26:12 pm »
Quote
Secondly, forget about using xp/2000 unless you know how to write device drivers.

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.
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »



Mike

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 307
  • Last login:September 22, 2005, 01:22:14 pm
  • Umm, yea about the TPS report
Re: Programming Frontend in Visual Basic -examples
« Reply #3 on: May 13, 2002, 08:46:03 am »
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.
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Frobozz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Last login:November 15, 2002, 03:16:45 am
  • I've been sane, but then I got better.
Re: Programming Frontend in Visual Basic -examples
« Reply #4 on: May 13, 2002, 02:38:43 pm »
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.  
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Programming Frontend in Visual Basic -examples
« Reply #5 on: May 13, 2002, 03:17:59 pm »
Yeah it's way simplier in vb but as i said, forget about it in 2000/xp.  
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8183
  • Last login:April 12, 2023, 09:22:35 pm
  • The Bears Still Suck!
Re: Programming Frontend in Visual Basic -examples
« Reply #6 on: May 13, 2002, 11:09:30 pm »
no, you don't need to modify mame!!

My FE could probably do it when it comes out!
I plan on putting a relay on my serial port.  I found a commercial one that is programmable.
You;d have to make your own frontend.  You can get if the game is a vertical from one of the -list (-listdetails I think) from mame's commandline.  If it is verical send a signal to the serial relay to rotat monitor vertically.  Same with horizontal.  But switch it when  you select a game in the FE.

I am using it to control a qbert knocker sometime in the future.  I need to modify mame since that is an in game thing.

http://www.weedtech.com/Ask the company if this works in XP.  I'm using 98 so it will be easy for me.
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Carsten Carlos

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 579
  • Last login:June 28, 2014, 05:06:25 am
  • Projects: Centipede extended, Asteroids
    • Carlos' Centipede-extended
Re: Programming Frontend in Visual Basic -examples
« Reply #7 on: May 14, 2002, 03:34:18 am »
Thanx all!

Guess I'll start with the electronics-side. The solid-state-relay-PCB looks good, but I'll try to  make something on my own, their PCB is quite expensive, as I wouldn't need all the features it offers.

Quote
My FE could probably do it when it comes out!

Keep us informed, I can't do anything on my own ;)
I still got a motor-pcb lying around here that was supposed for my rotating mount, maybe I can found out how it shall work by drawing the circuits.
For a start, I'll deal with a simple pushbutton that I just need to trigger, so that it's easy to interface it later.

Quote
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.

Great, this was helpful! Thanx, you nearly made a completed program-code in your long posting ;D

Quote
(tricky to do, are you good with electronics?

Sort of, I'm a radio/tv-technician, well, used to be, now I'm working in a printing job, especially with plotters and things like that. Although I'm not so good as this guy who worked formerly at Disney's and repaired their arcade-machines, he got these great circuits designed also for the degaussing (you must make some protections, if you fire the coil to often it'll burn up) thing, I'll have to print these and think about it how it is supposed to work.
Is the degaussing coil easy unpluggable on the WG? I wouldn't like to void my warranty by doing soldering work on a brandnew monitor!
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »



Frobozz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Last login:November 15, 2002, 03:16:45 am
  • I've been sane, but then I got better.
Re: Programming Frontend in Visual Basic -examples
« Reply #8 on: May 14, 2002, 05:29:15 am »
Quote
Yeah it's way simplier in vb but as i said, forget about it in 2000/xp.


Bah, I find it hard to believe there doesn't exist a single simple parallel port OCX out there that doesn't work with the NT core.  

I even remember one that installs a fake printer driver to get it to work.

(You set it as the Printer object, and use:

Print "A", "B", "C"...

in VB for your pins.
I think the "Printer.Resolution" seting was for timing or something.  Was kinda weird.

Gotta re-find that one :)    )

« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8183
  • Last login:April 12, 2023, 09:22:35 pm
  • The Bears Still Suck!
Re: Programming Frontend in Visual Basic -examples
« Reply #9 on: May 14, 2002, 09:10:00 am »
Quote
Thanx all!

Keep us informed, I can't do anything on my own ;)

I said it could be done, but I probably won't do that as I don;t need it!  My FE is being made for me, I will release it to the public if ya want to try it (like PartyOn).
Quote

I still got a motor-pcb lying around here that was supposed for my rotating mount, maybe I can found out how it shall work by drawing the circuits.
For a start, I'll deal with a simple pushbutton that I just need to trigger, so that it's easy to interface it later.


If oyu make it with a single button it wouldn't be hard to hook it up to a relay that is controlls the switch.

Many examples out there
http://ourworld.compuserve.com/homepages/Bill_Bowden/page6.htm

http://www.hut.fi/Misc/Electronics/circuits/parallel_output.html
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Frobozz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Last login:November 15, 2002, 03:16:45 am
  • I've been sane, but then I got better.
Re: Programming Frontend in Visual Basic -examples
« Reply #10 on: May 14, 2002, 12:20:58 pm »
For all you Parallel Port programmers out there who are really pissy about 2000/XP's port security, go to the following site:

http://www.embeddedtronics.com/design&ideas.html

...and download "UserPort".  Kinda makes all your problems go away.    Examples are in C++ but they can be called in VB just as easilly.  It's a 100% transparent solution.  
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Carsten Carlos

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 579
  • Last login:June 28, 2014, 05:06:25 am
  • Projects: Centipede extended, Asteroids
    • Carlos' Centipede-extended
Re: Programming Frontend in Visual Basic -examples
« Reply #11 on: May 14, 2002, 02:35:07 pm »
Great, so XP&W2K are in again :D
If only my Atari XL-Emulator wouldn't stutter on XP... Could be the Soundblaster live, though.
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »



Frobozz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Last login:November 15, 2002, 03:16:45 am
  • I've been sane, but then I got better.
Re: Programming Frontend in Visual Basic -examples
« Reply #12 on: May 15, 2002, 08:48:17 am »
I have a lot of problems with my SB Live stuttering if it's not getting enough CPU time (and it seems to need a LOT sometimes).  I'm thinking about upgrading to an Audigy or an Extigy here in the near future to see if that solves anything.  
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Carsten Carlos

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 579
  • Last login:June 28, 2014, 05:06:25 am
  • Projects: Centipede extended, Asteroids
    • Carlos' Centipede-extended
Re: Programming Frontend in Visual Basic -examples
« Reply #13 on: May 15, 2002, 11:07:29 am »
Quote
I'm thinking about upgrading to an Audigy or an Extigy here in the near future to see if that solves anything.

I'm not that sure that this would help - if you ever try, keep me informed. The SB-live! real sucks with XP, under W98 no problems.
E.g. the game "Wiggles" looses every 1st second when a sound ist started. What drives me mad about this, everything works ok when you set hardware-acceleration down, but the Soundblaster live is definitely the only soundcard that makes problems!
I guess Creative WAS the best company to buy soundcards from, but now I really doubt that. Unfortunately you haven't got other possibilities when you wanna have the best 3D-sound available.
I though about trying a Terratec, but the have "only" EAX2, and not the EAX HD, which sounds certainly cooler -although I never heard it myself.
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »



Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Programming Frontend in Visual Basic -examples
« Reply #14 on: May 15, 2002, 03:43:31 pm »
fro is right, that's a resource issue not a sound card one.... it takes alot of ram/processing power to run a sound card and a good one like a sound blaster takes even more.....  the reason it works better in 98 is because 98 requires less resources than xp

i doubt upgrading cards would solve anything unfortunately

:(
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4946
  • Last login:July 31, 2022, 10:26:34 pm
Re: Programming Frontend in Visual Basic -examples
« Reply #15 on: May 16, 2002, 09:18:21 am »
As a quick note.  JFront used to have this option.  I could run a different mame (or mame arguments )based on video resolution.  Mainly because my monitor handles 3 video resolutions, and I thought it would be better to optimize each.

but with hwstretching so great!  I got rid of the option.  It would be VERY easy to add back in if someone needed.

As for the trigger... I would consider going serial.  Why?  MUCH easier to access in any development system / OS.

Anyway, JFront is open source and if you want an option, let me know.

« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »